ole2.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /*
  2. * Declarations for OLE2
  3. *
  4. * Copyright (C) the Wine project
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. #ifndef __WINE_OLE2_H
  21. #define __WINE_OLE2_H
  22. #include <winerror.h>
  23. #include <objbase.h>
  24. #include <oleauto.h>
  25. #include <oleidl.h>
  26. struct tagMSG;
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif /* defined(__cplusplus) */
  30. #define E_DRAW VIEW_E_DRAW
  31. #define DATA_E_FORMATETC DV_E_FORMATETC
  32. #define OLEIVERB_PRIMARY (0L)
  33. #define OLEIVERB_SHOW (-1L)
  34. #define OLEIVERB_OPEN (-2L)
  35. #define OLEIVERB_HIDE (-3L)
  36. #define OLEIVERB_UIACTIVATE (-4L)
  37. #define OLEIVERB_INPLACEACTIVATE (-5L)
  38. #define OLEIVERB_DISCARDUNDOSTATE (-6L)
  39. #define OLEIVERB_PROPERTIES (-7L)
  40. /*
  41. * API declarations
  42. */
  43. HRESULT WINAPI RegisterDragDrop(HWND,LPDROPTARGET);
  44. HRESULT WINAPI RevokeDragDrop(HWND);
  45. HRESULT WINAPI DoDragDrop(LPDATAOBJECT,LPDROPSOURCE,DWORD,DWORD*);
  46. HRESULT WINAPI OleLoadFromStream(IStream *pStm,REFIID iidInterface,void** ppvObj);
  47. HRESULT WINAPI OleSaveToStream(IPersistStream *pPStm,IStream *pStm);
  48. HOLEMENU WINAPI OleCreateMenuDescriptor(HMENU hmenuCombined,LPOLEMENUGROUPWIDTHS lpMenuWidths);
  49. HRESULT WINAPI OleDestroyMenuDescriptor(HOLEMENU hmenuDescriptor);
  50. HRESULT WINAPI OleSetMenuDescriptor(HOLEMENU hmenuDescriptor,HWND hwndFrame,HWND hwndActiveObject,LPOLEINPLACEFRAME lpFrame,LPOLEINPLACEACTIVEOBJECT lpActiveObject);
  51. HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid);
  52. HRESULT WINAPI WriteClassStm(IStream *pStm,REFCLSID rclsid);
  53. HRESULT WINAPI ReadClassStm(IStream *pStm,CLSID *pclsid);
  54. HRESULT WINAPI OleSave(LPPERSISTSTORAGE pPS, LPSTORAGE pStg, BOOL fSameAsLoad);
  55. HRESULT WINAPI OleRegGetUserType(REFCLSID clsid,
  56. DWORD dwFormOfType,
  57. LPOLESTR* pszUserType);
  58. HRESULT WINAPI OleRegGetMiscStatus (REFCLSID clsid, DWORD dwAspect, DWORD* pdwStatus);
  59. HRESULT WINAPI OleRegEnumFormatEtc (REFCLSID clsid,
  60. DWORD dwDirection,
  61. LPENUMFORMATETC* ppenumFormatetc);
  62. HRESULT WINAPI CreateStreamOnHGlobal (HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM* ppstm);
  63. HRESULT WINAPI GetHGlobalFromStream(LPSTREAM pstm, HGLOBAL* phglobal);
  64. HRESULT WINAPI OleRegEnumVerbs (REFCLSID clsid, LPENUMOLEVERB* ppenum);
  65. BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject);
  66. HRESULT WINAPI OleCreateLinkFromData(LPDATAOBJECT pSrcDataObj, REFIID riid,
  67. DWORD renderopt, LPFORMATETC pFormatEtc,
  68. LPOLECLIENTSITE pClientSite, LPSTORAGE pStg,
  69. LPVOID* ppvObj);
  70. HRESULT WINAPI OleSetContainedObject(LPUNKNOWN pUnknown, BOOL fContained);
  71. HRESULT WINAPI OleQueryLinkFromData(IDataObject* pSrcDataObject);
  72. HRESULT WINAPI OleQueryCreateFromData(LPDATAOBJECT pSrcDataObject);
  73. HRESULT WINAPI OleRun(LPUNKNOWN pUnknown);
  74. VOID WINAPI ReleaseStgMedium(LPSTGMEDIUM);
  75. HRESULT WINAPI OleGetClipboard(IDataObject** ppDataObj);
  76. HRESULT WINAPI OleIsCurrentClipboard(LPDATAOBJECT);
  77. HRESULT WINAPI OleSetClipboard(LPDATAOBJECT);
  78. HRESULT WINAPI OleCreateStaticFromData(LPDATAOBJECT pSrcDataObj, REFIID iid,
  79. DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
  80. LPSTORAGE pStg, LPVOID* ppvObj);
  81. HRESULT WINAPI ReadFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT* pcf, LPOLESTR* lplpszUserType);
  82. HRESULT WINAPI OleLoad(LPSTORAGE pStg, REFIID riid, LPOLECLIENTSITE pClientSite, LPVOID* ppvObj);
  83. HRESULT WINAPI GetHGlobalFromILockBytes(LPLOCKBYTES plkbyt, HGLOBAL* phglobal);
  84. HRESULT WINAPI CreateILockBytesOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPLOCKBYTES* pplkbyt);
  85. HRESULT WINAPI CreateDataAdviseHolder(LPDATAADVISEHOLDER* ppDAHolder);
  86. HGLOBAL WINAPI OleGetIconOfClass(REFCLSID rclsid, LPOLESTR lpszLabel, BOOL fUseTypeAsLabel);
  87. HRESULT WINAPI OleLockRunning(LPUNKNOWN pUnknown, BOOL fLock, BOOL fLastUnlockCloses);
  88. HRESULT WINAPI OleCreateFromFile(REFCLSID rclsid, LPCOLESTR lpszFileName, REFIID riid,
  89. DWORD renderopt, LPFORMATETC lpFormatEtc, LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
  90. HRESULT WINAPI OleCreateLink(LPMONIKER pmkLinkSrc, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
  91. LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
  92. HRESULT WINAPI OleCreate(REFCLSID rclsid, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc, LPOLECLIENTSITE pClientSite,
  93. LPSTORAGE pStg, LPVOID* ppvObj);
  94. HRESULT WINAPI OleFlushClipboard(void);
  95. HRESULT WINAPI SetConvertStg(LPSTORAGE pStg, BOOL fConvert);
  96. BOOL WINAPI IsAccelerator(HACCEL hAccel, int cAccelEntries, struct tagMSG* lpMsg, WORD* lpwCmd);
  97. HRESULT WINAPI OleCreateLinkToFile(LPCOLESTR lpszFileName, REFIID riid, DWORD renderopt, LPFORMATETC lpFormatEtc,
  98. LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
  99. HANDLE WINAPI OleDuplicateData(HANDLE hSrc, CLIPFORMAT cfFormat, UINT uiFlags);
  100. HRESULT WINAPI WriteFmtUserTypeStg(LPSTORAGE pstg, CLIPFORMAT cf, LPOLESTR lpszUserType);
  101. HRESULT WINAPI OleTranslateAccelerator (LPOLEINPLACEFRAME lpFrame, LPOLEINPLACEFRAMEINFO lpFrameInfo, struct tagMSG* lpmsg);
  102. HRESULT WINAPI OleCreateFromData(LPDATAOBJECT pSrcDataObj, REFIID riid, DWORD renderopt, LPFORMATETC pFormatEtc,
  103. LPOLECLIENTSITE pClientSite, LPSTORAGE pStg, LPVOID* ppvObj);
  104. HRESULT WINAPI OleCreateDefaultHandler(REFCLSID clsid,
  105. LPUNKNOWN pUnkOuter,
  106. REFIID riid,
  107. LPVOID* ppvObj);
  108. HRESULT WINAPI CreateOleAdviseHolder (LPOLEADVISEHOLDER *ppOAHolder);
  109. HRESULT WINAPI OleInitialize(LPVOID pvReserved);
  110. void WINAPI OleUninitialize(void);
  111. BOOL WINAPI IsValidInterface(LPUNKNOWN punk);
  112. /*
  113. * OLE version conversion declarations
  114. */
  115. typedef struct _OLESTREAM* LPOLESTREAM;
  116. typedef struct _OLESTREAMVTBL {
  117. DWORD (CALLBACK *Get)(LPOLESTREAM,LPSTR,DWORD);
  118. DWORD (CALLBACK *Put)(LPOLESTREAM,LPSTR,DWORD);
  119. } OLESTREAMVTBL;
  120. typedef OLESTREAMVTBL* LPOLESTREAMVTBL;
  121. typedef struct _OLESTREAM {
  122. LPOLESTREAMVTBL lpstbl;
  123. } OLESTREAM;
  124. HRESULT WINAPI OleConvertOLESTREAMToIStorage( LPOLESTREAM lpolestream, LPSTORAGE pstg, const DVTARGETDEVICE* ptd);
  125. HRESULT WINAPI OleConvertIStorageToOLESTREAM( LPSTORAGE pstg, LPOLESTREAM lpolestream);
  126. HRESULT WINAPI OleGetAutoConvert( REFCLSID clsidOld, LPCLSID pClsidNew );
  127. HRESULT WINAPI OleSetAutoConvert( REFCLSID clsidOld, REFCLSID clsidNew );
  128. #ifdef __cplusplus
  129. } /* extern "C" */
  130. #endif /* defined(__cplusplus) */
  131. #endif /* __WINE_OLE2_H */