📄 mycomobjectimpl.h
字号:
// MYCOMOBJECTIMPL.H : Declaration of the TMyComObjectImpl
#ifndef MyComObjectImplH
#define MyComObjectImplH
#include "ComDll_TLB.H"
/////////////////////////////////////////////////////////////////////////////
// TMyComObjectImpl Implements IMyComObject, default interface of MyComObject
// ThreadingModel : Apartment
// Dual Interface : FALSE
// Event Support : FALSE
// Default ProgID : ComDll.MyComObject
// Description : MyComObject
/////////////////////////////////////////////////////////////////////////////
class ATL_NO_VTABLE TMyComObjectImpl :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<TMyComObjectImpl, &CLSID_MyComObject>,
public IMyComObject
{
public:
TMyComObjectImpl()
{
}
// Data used when registering Object
//
DECLARE_THREADING_MODEL(otApartment);
DECLARE_PROGID("ComDll.MyComObject");
DECLARE_DESCRIPTION("MyComObject");
// Function invoked to (un)register object
//
static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
{
TTypedComServerRegistrarT<TMyComObjectImpl>
regObj(GetObjectCLSID(), GetProgID(), GetDescription());
return regObj.UpdateRegistry(bRegister);
}
BEGIN_COM_MAP(TMyComObjectImpl)
COM_INTERFACE_ENTRY(IMyComObject)
END_COM_MAP()
// IMyComObject
public:
STDMETHOD(ShowDialog());
};
#endif //MyComObjectImplH
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -