Script functions reference > Script functions in alphabetical order > C > COMCreateObject

COMCreateObject
Syntax
COMCreateObject(strObjHandl, strProgId);
strObjHandl
strProgId
Description
Loads the COM component with the specified ProgID and associates it with the specified handle. Only components that support the IDispatch interface can be loaded using the COMCreateObject function.
Returns
A number indicating whether the component was successfully loaded.
0
-1
Example
$iRetVal=COMCreateObject("objTest", "COMCall.ITest");
OpenText StreamServe 5.6 Updated: 2013-03-01