Whatever message this page gives is out now! Go check it out!
<cfobject
class="class name"
name="instance name"
type=".NET|dotnet"
action="create"
assembly="absolute path"
port="6086"
protocol="tcp|http"
secure="no|yes"
server = "localhost">Attribute | Req/Opt | Default | Description |
class | Required | Name of the .NET class to instantiate as an object. | |
name | Required | String; reference name of the component to use in your application. | |
type | Required for .NET | Object type. Must be .NET or dotnet for .NET objects. | |
action | Optional | create | Action to take. Must be create. |
assembly | Optional. | mscorlib.dll which contains the .NET core classes. | For local .NET assemblies, the absolute path or paths to the assembly or assemblies (EXE or DLL files) from which to access the .NET class and its supporting classes. If a class in an assembly requires supporting classes that are in other assemblies, you must also specify those assemblies. You can, however, omit the supporting assemblies for the following types of supporting classes:
|
port | Optional | 6086 | Port number at which the .NET-side agent is listening. |
protocol | Optional | tcp | Protocol to use for communication between ColdFusion and .NET. Must be one of the following values:
|
secure | Optional | false | Whether to secure communications with the .NET-side agent. If true, ColdFusion uses SSL to communicate with .NET. |
server | Optional | localhost | Host name or IP address of the server where the .NET-side agent is running. Can be in any of these forms:
|
<cfobject type=".NET" name="mathInstance" class="mathClass">
assembly="C:/Net/Assemblies/math.dll">
<cfset myVar=mathInstance.multiply(1,2)><cfobject type=".NET" class="com.foo.MyClass"
assembly="c:\temp\myLib.dll" name="myObj" >
<cfset myObj.init(10, 5)>Get_fieldName()
Set_fieldName()<cfobject type=".NET" name="proc" class="System.Diagnostics.Process">
<cfset processes = proc.GetProcesses()>
<cfset arrLen = arrayLen(processes)>
<table border=0 cellspacing="3" cellpadding="3">
<tr bgcolor="#33CCCC">
<td style="font-size:12px; font-weight:bold" nowrap>Process ID</td>
<td style="font-size:12px; font-weight:bold" nowrap>Name</td>
<td style="font-size:12px; font-weight:bold" nowrap>Memory (KB)</td>
<td style="font-size:12px; font-weight:bold" nowrap>Peak Memory (KB)</td>
<td style="font-size:12px; font-weight:bold" nowrap>Virtual Memory Size (KB)</td>
<td style="font-size:12px; font-weight:bold" nowrap>Start Time</td>
<td style="font-size:12px; font-weight:bold" nowrap>Total Processor Time</td>
</tr>
<cfloop from = 1 to="#arrLen#" index=i>
<cfset process = processes[i]>
<cfset id = process.Get_Id()>
<cfif id neq 0>
<cfoutput>
<tr>
<td align="right">#process.Get_Id()#</td>
<td>#process.Get_ProcessName()#</td>
<td align="right">#process.Get_PagedMemorySize()/1000#</td>
<td align="right">#process.Get_PeakPagedMemorySize()/1000#</td>
<td align="right">#process.Get_VirtualMemorySize()/1000#</td>
<td>#process.Get_StartTime()#</td>
<td>#process.Get_TotalProcessorTime()#</td>
</tr>
</cfoutput>
</cfif>
</cfloop>
</table>