Microsoft Specific
HRESULT CreateInstance( const CLSID& rclsid, IUnknown* pOuter=NULL, DWORD dwClsContext = CLSCTX_ALL ) throw( );
HRESULT CreateInstance( LPOLESTR clsidString, IUnknown* pOuter=NULL, DWORD dwClsContext = CLSCTX_ALL ) throw( );
HRESULT CreateInstance( LPCSTR clsidStringA, IUnknown* pOuter=NULL, DWORD dwClsContext = CLSCTX_ALL ) 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
dwClsContext
context for running executable code
pOuter
the outer unknown for aggregation
Remarks
Creates a new running instance of an object given a CLSID or ProgID. These member functions call CoCreateInstance to create a new COM object and then queries for this smart pointers 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.
END Microsoft Specific