/////////////////////////////////////////////////////////////// // Demo7.h - Declarations for custom class that defines // // component's functionality // // // // Jim Fawcett, CSE775 - Distributed Objects, Spring 2003 // /////////////////////////////////////////////////////////////// #pragma once #include "resource.h" // main symbols #include "ATLDemo7.h" // CDemo7 class ATL_NO_VTABLE CDemo7 : public CComObjectRootEx, public CComCoClass, public IDispatchImpl { public: CDemo7() { } DECLARE_REGISTRY_RESOURCEID(IDR_DEMO7) DECLARE_NOT_AGGREGATABLE(CDemo7) BEGIN_COM_MAP(CDemo7) COM_INTERFACE_ENTRY(IDemo7) COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() DECLARE_PROTECT_FINAL_CONSTRUCT() HRESULT FinalConstruct() { return S_OK; } void FinalRelease() { } public: STDMETHOD(putString)(BSTR str); STDMETHOD(getString)(BSTR* str); private: CComBSTR _str; }; OBJECT_ENTRY_AUTO(__uuidof(Demo7), CDemo7)