RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
ComObj.CreateRemoteComObject Function

Creates a Com object on another machine and returns an IUnknown interface for it.

Pascal
function CreateRemoteComObject(const MachineName: WideString; const ClassID: TGUID): IUnknown;
C++
IUnknown CreateRemoteComObject(const BSTR MachineName, const TGUID ClassID);

ComObj

Use CreateRemoteComObject to create an object on a remote server. CreateRemoteComObject creates a single uninitialized object of the class associated with the CLSID specified by the ClassID parameter. The MachineName parameter specifies the machine that lists the ClassID in its type library.  

Usually, MachineName is the UNC name of the machine, which can be obtained by looking up its Machine Name under the Network settings in the Windows control panel. However, under some configurations of COM, MachineName is the IP address or Host name of the remote system. 

CreateRemoteComObject returns a reference to the IUnknown interface for the object. Use this interface to obtain information about other interfaces supported by the object.

Tip: If the interface returned by CreateRemoteComObject is assigned to a Variant, you can release the interface by assigning the Unassigned constant to that Variant.
 

 

CreateComObject 

Unassigned

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!