MyStruct.h
上传用户:weisheen
上传日期:2022-07-09
资源大小:19390k
文件大小:1k
- // MyStruct.h : Declaration of the CMyStruct
- #ifndef __MYSTRUCT_H_
- #define __MYSTRUCT_H_
- #include "resource.h" // main symbols
- /////////////////////////////////////////////////////////////////////////////
- // CMyStruct
- class ATL_NO_VTABLE CMyStruct :
- public CComObjectRootEx<CComSingleThreadModel>,
- public CComCoClass<CMyStruct, &CLSID_MyStruct>,
- public IDispatchImpl<IMyStruct, &IID_IMyStruct, &LIBID_STRUCTDEMOLib>
- {
- public:
- CMyStruct()
- {
- m_uid=NULL;
- }
- DECLARE_REGISTRY_RESOURCEID(IDR_MYSTRUCT)
- DECLARE_PROTECT_FINAL_CONSTRUCT()
- BEGIN_COM_MAP(CMyStruct)
- COM_INTERFACE_ENTRY(IMyStruct)
- COM_INTERFACE_ENTRY(IDispatch)
- END_COM_MAP()
- // IMyStruct
- public:
- STDMETHOD(get_UID)(/*[out, retval]*/ BSTR* *pVal);
- STDMETHOD(put_UID)(/*[in]*/ BSTR* newVal);
- STDMETHOD(GetPersonById)(UINT id,StPerson** Result);
- STDMETHOD(GetAllPerson)(UINT* number,StPerson** Result);
- STDMETHOD(SavePerson)(UINT number,StPerson* Result, UINT* pResult);
- private:
- BSTR m_uid;
- };
- #endif //__MYSTRUCT_H_