#ifndef _PROTO_CSIMPLEOBJECT_HPP_ #define _PROTO_CSIMPLEOBJECT_HPP_ #ifndef _COM_OLE2_HPP_ #include #endif #ifndef _PROTO_INTERFACE_HPP_ #include #endif #ifndef _PROTO_DLLSERVER_HPP_ #include #endif #ifndef _COM_DISPATCH_HPP_ #include #endif #ifndef _COM_MESSAGEHANDLER_HPP_ #include #endif #ifndef _COM_IOLEINPLACEOBJECTWINDOWLESS_HPP_ #include #endif #ifndef _COM_IOLEOBJECT_HPP_ #include #endif #ifndef _PROTO_GUIDS_HPP_ #include #endif #ifndef _COM_IIDLIB_HPP_ #include #endif #ifndef _COM_IVIEWOBJECT_HPP_ #include #endif class CSimpleObject; class CImpIViewObject : public IViewObjectCmn { public: CImpIViewObject(SmartPointer &backObj,PIUnknown &unkOuter); ~CImpIViewObject(); HRESULT __stdcall QueryInterface(REFIID riid,PPVOID ppv); ULONG __stdcall AddRef(void); ULONG __stdcall Release(); private: }; class CImpIOleInPlaceObjectWindowless : public IOleInPlaceObjectWindowlessCmn { public: CImpIOleInPlaceObjectWindowless(SmartPointer &backObj,PIUnknown &unkOuter); ~CImpIOleInPlaceObjectWindowless(); HRESULT __stdcall QueryInterface(REFIID riid,PPVOID ppv); ULONG __stdcall AddRef(void); ULONG __stdcall Release(void); private: }; class CImpIOleObject : public IOleObjectCmn { public: CImpIOleObject(SmartPointer &backObj,PIUnknown &unkOuter); ~CImpIOleObject(); HRESULT __stdcall QueryInterface(REFIID riid,PPVOID ppv); ULONG __stdcall AddRef(void); ULONG __stdcall Release(void); private: }; class CImpISimpleObject : public IDispatchCmn { public: CImpISimpleObject(SmartPointer &pBackObj,PIUnknown &pUnkOuter); ~CImpISimpleObject(); HRESULT __stdcall QueryInterface(REFIID riid,PPVOID ppv); ULONG __stdcall AddRef(void); ULONG __stdcall Release(void); HRESULT __stdcall setByte(BYTE someBYTE); private: SmartPointer mBackObj; PIUnknown mUnkOuter; ULONG mRefCount; }; class CSimpleObject : public ISimpleObject { public: CSimpleObject(PIUnknown &pUnkOuter,SmartPointer &server); ~CSimpleObject(); HRESULT __stdcall QueryInterface(REFIID riid,PPVOID ppv); ULONG __stdcall AddRef(void); ULONG __stdcall Release(void); HRESULT __stdcall setByte(BYTE someByte); private: CImpISimpleObject mImpISimpleObject; CImpIOleInPlaceObjectWindowless mImpIOleInPlaceObjectWindowless; CImpIOleObject mImpIOleObject; CImpIViewObject mImpIViewObject; SmartPointer mDLLServer; IIDLib mIIDLib; PIUnknown mUnkOuter; ULONG mRefCount; }; typedef CSimpleObject *PCSimpleObject; #endif