CreateOleObject
Creates an instance of an OLE object, returning a variant containing a reference to the object’s IDispatch interface.
type(VARIANT) function CreateOleObject (ObjRef, iRet)
{
character(len=*),intent(in):: ObjRef |
type(GUID),intent(in):: ObjRef
}
integer(HRESULT_KIND),intent(out),optional:: iRet
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.