Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
4.1 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // File: oleobj.hxx
  4. //
  5. // Contents: COleObject declarations
  6. //
  7. // History: 24-Nov-92 DeanE Created
  8. //
  9. //---------------------------------------------------------------------
  10. #ifndef __OLEOBJ_HXX__
  11. #define __OLEOBJ_HXX__
  12. //+-------------------------------------------------------------------
  13. // Class: COleObject
  14. //
  15. // Synopsis: COleObject implements the IOleObject interface for OLE
  16. // objects within the server. There will be one instantiation
  17. // per OLE object.
  18. //
  19. // Methods: QueryInterface IUnknown
  20. // AddRef IUnknown
  21. // Release IUnknown
  22. // SetClientSite IOleObject
  23. // GetClientSite IOleObject
  24. // SetHostNames IOleObject
  25. // Close IOleObject
  26. // SetMoniker IOleObject
  27. // GetMoniker IOleObject
  28. // InitFromData IOleObject
  29. // GetClipboardData IOleObject
  30. // DoVerb IOleObject
  31. // EnumVerbs IOleObject
  32. // Update IOleObject
  33. // IsUpToDate IOleObject
  34. // GetUserType IOleObject
  35. // SetExtent IOleObject
  36. // GetExtent IOleObject
  37. // Advise IOleObject
  38. // Unadvise IOleObject
  39. // EnumAdvise IOleObject
  40. // GetMiscStatus IOleObject
  41. // SetColorScheme IOleObject
  42. //
  43. // History: 17-Dec-92 DeanE Created
  44. //--------------------------------------------------------------------
  45. class FAR COleObject : public IOleObject
  46. {
  47. public:
  48. // Constructor/Destructor
  49. COleObject(CTestEmbed *pteObject);
  50. ~COleObject();
  51. // IUnknown
  52. STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR *ppv);
  53. STDMETHODIMP_(ULONG) AddRef (void);
  54. STDMETHODIMP_(ULONG) Release (void);
  55. // IOleObject
  56. STDMETHODIMP SetClientSite (LPOLECLIENTSITE pClientSite);
  57. STDMETHODIMP GetClientSite (LPOLECLIENTSITE FAR *ppClientSite);
  58. STDMETHODIMP SetHostNames (LPCOLESTR szContainerApp, LPCOLESTR szContainerObj);
  59. STDMETHODIMP Close (DWORD dwSaveOption);
  60. STDMETHODIMP SetMoniker (DWORD dwWhichMoniker, LPMONIKER pmk);
  61. STDMETHODIMP GetMoniker (DWORD dwAssign,
  62. DWORD dwWhichMoniker,
  63. LPMONIKER FAR *ppmk);
  64. STDMETHODIMP InitFromData (LPDATAOBJECT pDataObject,
  65. BOOL fCreation,
  66. DWORD dwReserved);
  67. STDMETHODIMP GetClipboardData(
  68. DWORD dwReserved,
  69. LPDATAOBJECT FAR *ppDataObject);
  70. STDMETHODIMP DoVerb (LONG iVerb,
  71. LPMSG pMsg,
  72. LPOLECLIENTSITE pActiveSite,
  73. LONG lReserved,
  74. HWND hwndParent,
  75. LPCRECT lprcPosRect);
  76. STDMETHODIMP EnumVerbs (IEnumOLEVERB FAR* FAR* ppenmOleVerb);
  77. STDMETHODIMP Update (void);
  78. STDMETHODIMP IsUpToDate (void);
  79. STDMETHODIMP GetUserClassID(CLSID FAR* pClsid);
  80. STDMETHODIMP GetUserType (DWORD dwFormOfType, LPOLESTR FAR *pszUserType);
  81. STDMETHODIMP SetExtent (DWORD dwDrawAspect, LPSIZEL lpsizel);
  82. STDMETHODIMP GetExtent (DWORD dwDrawAspect, LPSIZEL lpsizel);
  83. STDMETHODIMP Advise (IAdviseSink FAR *pAdvSink,
  84. DWORD FAR *pdwConnection);
  85. STDMETHODIMP Unadvise (DWORD dwConnection);
  86. STDMETHODIMP EnumAdvise (LPENUMSTATDATA FAR *ppenmAdvise);
  87. STDMETHODIMP GetMiscStatus (DWORD dwAspect, DWORD FAR *pdwStatus);
  88. STDMETHODIMP SetColorScheme(LPLOGPALETTE lpLogpal);
  89. private:
  90. ULONG _cRef; // Reference count
  91. IOleAdviseHolder FAR *_pOAHolder; // Advise Holder
  92. IOleClientSite FAR *_pocs; // This objects client site
  93. CTestEmbed *_pteObject; // Object we're associated with
  94. IMoniker * _pmkContainer;
  95. };
  96. #endif // __OLEOBJ_HXX__