CreateOleObject
f90VB Modules
f90VBDefs, f90VBVariants, f90VBAutomation
Summary
Creates an instance of an OLE object, returning a variant containing a reference to the object’s IDispatch interface.
Syntax
| type(VARIANT) function CreateOleObject | (ObjRef, iRet) |
| { | |
| character(len=*),intent(in):: | ObjRef | |
| type(GUID),intent(in):: | ObjRef |
| } | |
| integer(HRESULT_KIND),intent(out),optional:: | iRet |
Arguments
ObjRef [Input]
Can be either the Programmatic Identifier (ProgID) of the object or the CoClass Identifier (CLSID) of the object.
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, CreateOleObject 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.
Examples
See examples in Chapter 6 - User Manual
Related Topics
| For information about: | See: | |
| Creating a remote object | CreateRemoteOleObject | |