This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Obtain an object reference using COM facilities of Windows.
Syntax
iDispatchVariable = GetCom(sProgID)
Returns
iDispatch Variable
Parameters
Name |
Type |
Optional |
Meaning |
sProgId |
String |
No |
Name on an external COM server |
Remarks
If the requested object is in a DLL (in-process server), you will always use the NewCom option, as you're asking for a new object. If the request is successful, the object reference is assigned to the iDispatchVariable.
If the requested object is in an EXE (out-of-process server), you may use any of the three options: NewCom, GetCom, AnyCom.
•with NewCom: a new instance of a COM application is created.
with GetCom: an interface will be opened on an existing, running application, which has been registered as the active automation object for its class.
•with AnyCom: first try to use an existing, running application if available, or a new instance if not.
Restrictions
See also
iDispatch, NewCom, GetCom, AnyCom, Nothing, IsComObject, IsComNothing, CreateObject
Examples