对于tlh和tli如何封装COM组件类为C++类,我举一个例子,ADO中的Connection类的例子。
在msado15.dll中有一个COM组件类:
struct
__declspec(uuid(
"
00000550-0000-0010-8000-00aa006d2ea4
"
))
_Connection : Connection15
{
//
// Wrapper methods for error-handling
//
HRESULT Cancel ( );
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall raw_Cancel ( ) = 0;
} ;
该
_Connection : Connection15
{
//
// Wrapper methods for error-handling
//
HRESULT Cancel ( );
//
// Raw methods provided by interface
//
virtual HRESULT __stdcall raw_Cancel ( ) = 0;
} ;