/////////////////////////////////////////////////////////////////////// // MarshalIFPtr.h - declarations for component MarshalInterfacePtr // // // // Platform: Dell Dimension 8100, Windows 2000, SP2 // // Application: Demonstration of Marshaling Interface Pointers // // CSE775 - Distributed Objects, Spring 2004 // // Modified: Jim Fawcett, Syracuse Univ, CST 2-187 // // (315) 443-3948, fawcett@ecs.syr.edu // /////////////////////////////////////////////////////////////////////// #pragma once #include "resource.h" // main symbols #include "MarshalInterfacePtr.h" class ATL_NO_VTABLE CMarshalIFPtr : public CComObjectRootEx, public CComCoClass, public IDispatchImpl { public: CMarshalIFPtr() { } DECLARE_REGISTRY_RESOURCEID(IDR_MARSHALIFPTR) BEGIN_COM_MAP(CMarshalIFPtr) COM_INTERFACE_ENTRY(IMarshalIFPtr) COM_INTERFACE_ENTRY(IDispatch) END_COM_MAP() DECLARE_PROTECT_FINAL_CONSTRUCT() HRESULT FinalConstruct() { return S_OK; } void FinalRelease() { } public: STDMETHOD(getString)(BSTR* pBstr); STDMETHOD(putString)(BSTR bstr); private: CComBSTR _bstr; }; OBJECT_ENTRY_AUTO(__uuidof(MarshalIFPtr), CMarshalIFPtr)