CreateRemoteOleObject
f90VB Modules
f90VBDefs, f90VBVariants, f90VBAutomation
Summary
Creates an instance of a remote OLE object, returning a variant containing a reference to the object’s IDispatch interface.
Syntax
| type(VARIANT) function CreateRemoteOleObject | (MachineName, ObjCLSID, iRet) |
| character(len=*),intent(in):: | MachineName |
| type(GUID),intent(in):: | ObjCLSID |
| integer(HRESULT_KIND),intent(out),optional:: | iRet |
Arguments
MachineName [Input]
The name of the networked computer where the OLE server resides.
ObjCLSID [Input]
The CoClass Identifier (CLSID) of the object to be created.
iRet [Output/Optional]
Upon return, iRet contains S_OK or a negative error code. See comments for more information.
Comments
If the object is created successfully, CreateRemoteOleObject returns a variant containing a pointer to the IDispatch interface of the object, and iRet is set to S_OK. Otherwise, the returned variant is of undetermined value, and iRet contains a negative number indicating the nature of the error.
Use CreateRemoteOleObject to create an object on a remote server. CreateRemoteOleObject creates a single uninitialized object of the class associated with the CLSID specified by the ObjCLSID 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.
CreateRemoteOleObject returns a reference to the IDispatch interface for the object. If the object does not support this interface, an error condition occurs.
Related Topics
| For information about: | See: | |
| Creating a local object | CreateOleObject | |