Posts Tagged ‘CComObject’
Using CComCreator
May 30, 2007
Leave a comment
Easiest way to construct a COM interface from it’s co class.
ISomeInterfacePtr sipPtr; HRESULT hRes = CComCreator< CComObject< CSomeCoClass > >::CreateInstance( 0, IID_ISomeInterface, reinterpret_cast( void**, &sipPtr )); ASSERT( SUCCEEDED( hRes ));
Must be an ATL/COM Project.
Categories: COM
ATL, CComCreator, CComObject, COM