_com_ptr_t::GetActiveObject
Microsoft Specific
HRESULT GetActiveObject( const CLSID& rclsid ) throw( );
HRESULT GetActiveObject( LPOLESTR clsidString ) throw( );
HRESULT GetActiveObject( LPCSTR clsidStringA ) throw( );
Parameters
rclsid
the CLSID of an object
clsidString
a Unicode string that holds either a CLSID (starting with “{“) or a ProgID
clsidStringA
a multibyte string that holds either a CLSID (starting with “{“) or a ProgID
Remarks
Attaches to an existing instance of an object given a CLSID or ProgID. These member functions call to retrieve a pointer to a running object that has been registered with OLE and then queries for this smart pointer’s interface type. The resulting pointer is then encapsulated within this _com_ptr_t object. Release is called to decrement the reference count for the previously encapsulated pointer. This routine returns the HRESULT to indicate success or failure.
GetActiveObject( rclsid ) Attaches to an existing instance of an object given a CLSID.
GetActiveObject( clsidString ) Attaches to an existing instance of an object given a Unicode string which holds either a CLSID (starting with “{“) or a ProgID.
GetActiveObject( clsidStringA ) Attaches to an existing instance of an object given a multibyte character string which holds either a CLSID (starting with “{“) or a ProgID. Calls , which assumes that the string is in the ANSI code page rather than an OEM code page.
END Microsoft Specific