|
CreateObject: COM object
DescriptionThe CreateObject function
can create a Component Object Model (COM) object.
To create
a COM object, provide the following information:
The
object’s program ID or filename
The methods and properties available to the object through
the IDispatch interface
The arguments and return types of the object’s methods
For
most objects, you can get this information from the OLEView utility.
Note: On UNIX, this function does not support COM objects.
Function syntaxCreateObject(type, class, context, serverName)
Parameters
Parameter
|
Description
|
type
|
Type of object to create.
com
corba
java
component
webservice
|
class
|
Component ProgID for the object to invoke.
|
context
|
|
serverName
|
Server name, using UNC or DNS convention,
in one of these forms:
If context = "remote",
this parameter is required.
|
UsageThe following
example creates the Windows Collaborative Data Objects (CDO) for
NTS NewMail object to send mail. You use this code in a cfscript tag.
Mailer = CreateObject("COM", "CDONTS.NewMail");
|