Doc 和 Bill 都是 C++ class,再做一个 COM, ITest
classdo
c {
//intdo
cId;
};
class Bill {
//int BillId;
};
class ATL_NO_VTABLE CTest1 :
public Bill,
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CTest1, &CLSID_Test1>,
public IDispatchImpl<ITest1, &IID_ITest1, &LIBID_TESTLib>
{
public:
CTest1()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_TEST1)
DECLARE_PROTECT_FINAL_CONSTRUCT()
begin
_COM_MAP(CTest1)
COM_INTERFACE_ENTRY(ITest1)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
// ITest1
public:
};