1 /** 2 * Windows API header module 3 * 4 * Translated from MinGW Windows headers 5 * 6 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) 7 * Source: $(DRUNTIMESRC core/sys/windows/_ole2.d) 8 */ 9 module core.sys.windows.ole2; 10 version (Windows): 11 pragma(lib, "ole32"); 12 13 public import core.sys.windows.basetyps, core.sys.windows.objbase, core.sys.windows.oleauto, core.sys.windows.olectlid, 14 core.sys.windows.oleidl, core.sys.windows.unknwn, core.sys.windows.winerror, core.sys.windows.uuid; 15 import core.sys.windows.objfwd, core.sys.windows.objidl, core.sys.windows.windef, core.sys.windows.wtypes; 16 import core.sys.windows.winuser; // for LPMSG 17 18 enum E_DRAW = VIEW_E_DRAW; 19 20 enum DATA_E_FORMATETC = DV_E_FORMATETC; 21 22 enum { 23 OLEIVERB_PRIMARY = 0, 24 OLEIVERB_SHOW = -1, 25 OLEIVERB_OPEN = -2, 26 OLEIVERB_HIDE = -3, 27 OLEIVERB_UIACTIVATE = -4, 28 OLEIVERB_INPLACEACTIVATE = -5, 29 OLEIVERB_DISCARDUNDOSTATE = -6 30 } 31 32 enum EMBDHLP_INPROC_HANDLER = 0x0000L; 33 enum EMBDHLP_INPROC_SERVER = 0x0001L; 34 enum EMBDHLP_CREATENOW = 0x00000000L; 35 enum EMBDHLP_DELAYCREATE = 0x00010000L; 36 37 align(8): 38 struct OLESTREAM { 39 LPOLESTREAMVTBL lpstbl; 40 } 41 alias OLESTREAM* LPOLESTREAM; 42 43 extern (Windows) { 44 struct OLESTREAMVTBL { 45 DWORD function (LPOLESTREAM, void*, DWORD) Get; 46 DWORD function (LPOLESTREAM, const(void)*, DWORD) Put; 47 } 48 } 49 alias OLESTREAMVTBL* LPOLESTREAMVTBL; 50 51 extern (Windows) { 52 HRESULT CreateDataAdviseHolder(LPDATAADVISEHOLDER*); 53 DWORD OleBuildVersion(); 54 HRESULT ReadClassStg(LPSTORAGE, CLSID*); 55 HRESULT WriteClassStg(LPSTORAGE, REFCLSID); 56 HRESULT ReadClassStm(LPSTREAM, CLSID*); 57 HRESULT WriteClassStm(LPSTREAM, REFCLSID); 58 HRESULT WriteFmtUserTypeStg(LPSTORAGE, CLIPFORMAT, LPOLESTR); 59 HRESULT ReadFmtUserTypeStg(LPSTORAGE, CLIPFORMAT*, LPOLESTR*); 60 HRESULT OleInitialize(PVOID); 61 void OleUninitialize(); 62 HRESULT OleQueryLinkFromData(LPDATAOBJECT); 63 HRESULT OleQueryCreateFromData(LPDATAOBJECT); 64 HRESULT OleCreate(REFCLSID, REFIID, DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, PVOID*); 65 HRESULT OleCreateFromData(LPDATAOBJECT, REFIID, DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, PVOID*); 66 HRESULT OleCreateLinkFromData(LPDATAOBJECT, REFIID, DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, PVOID*); 67 HRESULT OleCreateStaticFromData(LPDATAOBJECT, REFIID, DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, PVOID*); 68 HRESULT OleCreateLink(LPMONIKER, REFIID, DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, PVOID*); 69 HRESULT OleCreateLinkToFile(LPCOLESTR, REFIID, DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, PVOID*); 70 HRESULT OleCreateFromFile(REFCLSID, LPCOLESTR, REFIID, DWORD, LPFORMATETC, LPOLECLIENTSITE, LPSTORAGE, PVOID*); 71 HRESULT OleLoad(LPSTORAGE, REFIID, LPOLECLIENTSITE, PVOID*); 72 HRESULT OleSave(LPPERSISTSTORAGE, LPSTORAGE, BOOL); 73 HRESULT OleLoadFromStream(LPSTREAM, REFIID, PVOID*); 74 HRESULT OleSaveToStream(LPPERSISTSTREAM, LPSTREAM); 75 HRESULT OleSetContainedObject(LPUNKNOWN, BOOL); 76 HRESULT OleNoteObjectVisible(LPUNKNOWN, BOOL); 77 HRESULT RegisterDragDrop(HWND, LPDROPTARGET); 78 HRESULT RevokeDragDrop(HWND); 79 HRESULT DoDragDrop(LPDATAOBJECT, LPDROPSOURCE, DWORD, PDWORD); 80 HRESULT OleSetClipboard(LPDATAOBJECT); 81 HRESULT OleGetClipboard(LPDATAOBJECT*); 82 HRESULT OleFlushClipboard(); 83 HRESULT OleIsCurrentClipboard(LPDATAOBJECT); 84 HOLEMENU OleCreateMenuDescriptor(HMENU, LPOLEMENUGROUPWIDTHS); 85 HRESULT OleSetMenuDescriptor(HOLEMENU, HWND, HWND, LPOLEINPLACEFRAME, LPOLEINPLACEACTIVEOBJECT); 86 HRESULT OleDestroyMenuDescriptor(HOLEMENU); 87 HRESULT OleTranslateAccelerator(LPOLEINPLACEFRAME, LPOLEINPLACEFRAMEINFO, LPMSG); 88 HANDLE OleDuplicateData(HANDLE, CLIPFORMAT, UINT); 89 HRESULT OleDraw(LPUNKNOWN, DWORD, HDC, LPCRECT); 90 HRESULT OleRun(LPUNKNOWN); 91 BOOL OleIsRunning(LPOLEOBJECT); 92 HRESULT OleLockRunning(LPUNKNOWN, BOOL, BOOL); 93 void ReleaseStgMedium(LPSTGMEDIUM); 94 HRESULT CreateOleAdviseHolder(LPOLEADVISEHOLDER*); 95 HRESULT OleCreateDefaultHandler(REFCLSID, LPUNKNOWN, REFIID, PVOID*); 96 HRESULT OleCreateEmbeddingHelper(REFCLSID, LPUNKNOWN, DWORD, LPCLASSFACTORY, REFIID, PVOID*); 97 BOOL IsAccelerator(HACCEL, int, LPMSG, WORD*); 98 HGLOBAL OleGetIconOfFile(LPOLESTR, BOOL); 99 HGLOBAL OleGetIconOfClass(REFCLSID, LPOLESTR, BOOL); 100 HGLOBAL OleMetafilePictFromIconAndLabel(HICON, LPOLESTR, LPOLESTR, UINT); 101 HRESULT OleRegGetUserType(REFCLSID, DWORD, LPOLESTR*); 102 HRESULT OleRegGetMiscStatus(REFCLSID, DWORD, DWORD*); 103 HRESULT OleRegEnumFormatEtc (REFCLSID, DWORD, LPENUMFORMATETC*); 104 HRESULT OleRegEnumVerbs (REFCLSID, LPENUMOLEVERB*); 105 HRESULT OleConvertOLESTREAMToIStorage(LPOLESTREAM, LPSTORAGE, const(DVTARGETDEVICE)*); 106 HRESULT OleConvertIStorageToOLESTREAM(LPSTORAGE, LPOLESTREAM); 107 HRESULT GetHGlobalFromILockBytes(LPLOCKBYTES, HGLOBAL*); 108 HRESULT CreateILockBytesOnHGlobal(HGLOBAL, BOOL, LPLOCKBYTES*); 109 HRESULT GetHGlobalFromStream(LPSTREAM, HGLOBAL*); 110 HRESULT CreateStreamOnHGlobal(HGLOBAL, BOOL, LPSTREAM*); 111 HRESULT OleDoAutoConvert(LPSTORAGE, LPCLSID); 112 HRESULT OleGetAutoConvert(REFCLSID, LPCLSID); 113 HRESULT OleSetAutoConvert(REFCLSID, REFCLSID); 114 HRESULT GetConvertStg(LPSTORAGE); 115 HRESULT SetConvertStg(LPSTORAGE, BOOL); 116 HRESULT OleConvertIStorageToOLESTREAMEx(LPSTORAGE, CLIPFORMAT, LONG, LONG, DWORD, LPSTGMEDIUM, LPOLESTREAM); 117 HRESULT OleConvertOLESTREAMToIStorageEx(LPOLESTREAM, LPSTORAGE, CLIPFORMAT*, LONG*, LONG*, DWORD*, LPSTGMEDIUM); 118 }