1 | ' 暫定措置 |
---|
2 | |
---|
3 | #require <api_winerror.sbp> |
---|
4 | |
---|
5 | #require <objbase.sbp> |
---|
6 | #require <oleauto.ab> |
---|
7 | |
---|
8 | ' View OBJECT Error Codes |
---|
9 | |
---|
10 | Const E_DRAW = VIEW_E_DRAW |
---|
11 | |
---|
12 | ' IDataObject Error Codes |
---|
13 | Const DATA_E_FORMATETC = DV_E_FORMATETC |
---|
14 | |
---|
15 | ' Common stuff gleamed from OLE.2, |
---|
16 | |
---|
17 | /* verbs */ |
---|
18 | Const OLEIVERB_PRIMARY = (0) |
---|
19 | Const OLEIVERB_SHOW = (-1) |
---|
20 | Const OLEIVERB_OPEN = (-2) |
---|
21 | Const OLEIVERB_HIDE = (-3) |
---|
22 | Const OLEIVERB_UIACTIVATE = (-4) |
---|
23 | Const OLEIVERB_INPLACEACTIVATE = (-5) |
---|
24 | Const OLEIVERB_DISCARDUNDOSTATE = (-6) |
---|
25 | |
---|
26 | ' for OleCreateEmbeddingHelper flags; roles in low word; options in high word |
---|
27 | Const EMBDHLP_INPROC_HANDLER = &h0000 |
---|
28 | Const EMBDHLP_INPROC_SERVER = &h0001 |
---|
29 | Const EMBDHLP_CREATENOW = &h00000000 |
---|
30 | Const EMBDHLP_DELAYCREATE = &h00010000 |
---|
31 | |
---|
32 | /* extended create function flags */ |
---|
33 | Const OLECREATE_LEAVERUNNING = &h00000001 |
---|
34 | |
---|
35 | /* pull in the MIDL generated header */ |
---|
36 | |
---|
37 | #require <oleidl.ab> |
---|
38 | |
---|
39 | /****** DV APIs ***********************************************************/ |
---|
40 | |
---|
41 | /* |
---|
42 | #if !defined(ISOLATION_AWARE_ENABLED) \ |
---|
43 | || !ISOLATION_AWARE_ENABLED \ |
---|
44 | || !defined(_OBJBASE_H_) \ |
---|
45 | || !defined(CreateDataAdviseHolder) |
---|
46 | WINOLEAPI CreateDataAdviseHolder(OUT LPDATAADVISEHOLDER FAR* ppDAHolder); |
---|
47 | #endif |
---|
48 | */ |
---|
49 | |
---|
50 | /****** OLE API Prototypes ************************************************/ |
---|
51 | |
---|
52 | Declare Function OleBuildVersion Lib "ole32.dll" () As DWord |
---|
53 | |
---|
54 | /* helper functions */ |
---|
55 | Declare Function ReadClassStg Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef clsid As CLSID) As HRESULT |
---|
56 | Declare Function WriteClassStg Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage, /*IN*/ ByRef clsid As CLSID) As HRESULT |
---|
57 | Declare Function ReadClassStm Lib "ole32.dll" (/*IN*/ ByVal pStm As *IStream, /*OUT*/ ByRef clsid As CLSID) As HRESULT |
---|
58 | Declare Function WriteClassStm Lib "ole32.dll" (/*IN*/ ByVal pStm As *IStream, /*IN*/ ByRef clsid As CLSID) As HRESULT |
---|
59 | Declare Function WriteFmtUserTypeStg Lib "ole32.dll" (/*IN*/ ByVal pstg As *IStorage, /*IN*/ ByVal cf As CLIPFORMAT, /*IN*/ ByVal pszUserType As *OLECHAR) As HRESULT |
---|
60 | Declare Function ReadFmtUserTypeStg Lib "ole32.dll" (/*IN*/ ByVal pstg As *IStorage, /*OUT*/ ByRef cf As CLIPFORMAT, /*OUT*/ ByRef rpszUserType As *OLECHAR) As HRESULT |
---|
61 | |
---|
62 | |
---|
63 | /* init/term */ |
---|
64 | |
---|
65 | Declare Function OleInitialize Lib "ole32" (pvReserved As VoidPtr) As HRESULT |
---|
66 | Declare Sub OleUninitialize Lib "ole32" () |
---|
67 | |
---|
68 | |
---|
69 | /* APIs to query whether (Embedded/Linked) object can be created from |
---|
70 | the data object */ |
---|
71 | |
---|
72 | Declare Function OleQueryLinkFromData Lib "ole32" (/*IN*/ ByVal pSrcDataObject As *IDataObject) As HRESULT |
---|
73 | Declare Function OleQueryCreateFromData Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObject As *IDataObject) As HRESULT |
---|
74 | |
---|
75 | |
---|
76 | /* Object creation APIs */ |
---|
77 | |
---|
78 | Declare Function OleCreate Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByRef riid As IID, /*IN*/ ByVal renderopt As DWord, _ |
---|
79 | /*IN*/ ByVal pFormatEtc As *FORMATETC, /*IN*/ ByVal pClientSite As *IOleClientSite, _ |
---|
80 | /*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
81 | |
---|
82 | Declare Function OleCreateEx Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByRef riid As IID, /*IN*/ ByVal dwFlags As DWord, |
---|
83 | /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord, |
---|
84 | /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink, |
---|
85 | /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite, |
---|
86 | /*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
87 | |
---|
88 | Declare Function OleCreateFromData Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID, |
---|
89 | /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC, |
---|
90 | /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pStg As *IStorage, |
---|
91 | /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
92 | |
---|
93 | Declare Function OleCreateFromDataEx Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID, |
---|
94 | /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord, |
---|
95 | /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink, |
---|
96 | /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite, |
---|
97 | /*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
98 | |
---|
99 | Declare Function OleCreateLinkFromData Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID, |
---|
100 | /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC, |
---|
101 | /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pStg As *IStorage, |
---|
102 | /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
103 | |
---|
104 | Declare Function OleCreateLinkFromDataEx Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID, |
---|
105 | /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord, |
---|
106 | /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink, |
---|
107 | /*OUT IN*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite, |
---|
108 | /*IN*/ ByVal pStg As *IStorage, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
109 | |
---|
110 | Declare Function OleCreateStaticFromData Lib "ole32.dll" (/*IN*/ ByVal pSrcDataObj As *IDataObject, /*IN*/ ByRef riid As IID, |
---|
111 | /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC, |
---|
112 | /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pStg As *IStorage, |
---|
113 | /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
114 | |
---|
115 | |
---|
116 | Declare Function OleCreateLink Lib "ole32.dll" (/*IN*/ ByVal pmkLinkSrc As *IMoniker, /*IN*/ ByRef riid As IID, |
---|
117 | /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC, |
---|
118 | /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
119 | |
---|
120 | Declare Function OleCreateLinkEx Lib "ole32.dll" (/*IN*/ ByVal pmkLinkSrc As *IMoniker, /*IN*/ ByRef riid As IID, |
---|
121 | /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord, |
---|
122 | /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink, |
---|
123 | /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite, |
---|
124 | /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
125 | |
---|
126 | Declare Function OleCreateLinkToFile Lib "ole32.dll" (/*IN*/ ByVal lpszFileName As LPCOLESTR, /*IN*/ ByRef riid As IID, |
---|
127 | /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC, |
---|
128 | /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
129 | |
---|
130 | Declare Function OleCreateLinkToFileEx Lib "ole32.dll" (/*IN*/ ByVal lpszFileName As LPCOLESTR, /*IN*/ ByRef riid As IID, |
---|
131 | /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord, |
---|
132 | /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink, |
---|
133 | /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite, |
---|
134 | /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
135 | |
---|
136 | Declare Function OleCreateFromFile Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal lpszFileName As LPOLESTR, /*IN*/ ByRef riid As IID, |
---|
137 | /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal pFormatEtc As *FORMATETC, |
---|
138 | /*IN*/ ByVal pClientSite As *IOleClientSite, /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
139 | |
---|
140 | Declare Function OleCreateFromFileEx Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal lpszFileName As LPOLESTR, /*IN*/ ByRef riid As IID, |
---|
141 | /*IN*/ ByVal dwFlags As DWord, /*IN*/ ByVal renderopt As DWord, /*IN*/ ByVal cFormats As DWord, /*IN*/ ByVal rgAdvf As *DWord, |
---|
142 | /*IN*/ ByVal rgFormatEtc As *FORMATETC, /*IN*/ ByVal pAdviseSink As *IAdviseSink, |
---|
143 | /*OUT*/ ByVal rgdwConnection As *DWord, /*IN*/ ByVal pClientSite As *IOleClientSite, |
---|
144 | /*IN*/ ByVal pDataObj As *IDataObject, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
145 | |
---|
146 | Declare Function OleLoad Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage, /*IN*/ ByRef riid As IID, /*IN*/ ByVal pClientSite As *IOleClientSite, |
---|
147 | /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
148 | |
---|
149 | Declare Function OleSave Lib "ole32.dll" (/*IN*/ ByVal pPS As *IPersistStorage, /*IN*/ ByVal pStg As *IStorage, /*IN*/ fSameAsLoad As BOOL) As HRESULT |
---|
150 | |
---|
151 | Declare Function OleLoadFromStream Lib "ole32.dll" ( /*IN*/ ByVal pStm As *IStream, /*IN*/ ByRef iidInterface As IID, /*OUT*/ ByRef ppvObj As Any) As HRESULT |
---|
152 | Declare Function OleSaveToStream Lib "ole32.dll" ( /*IN*/ ByVal pPStm As *IPersistStream, /*IN*/ ByVal pStm As *IStream) As HRESULT |
---|
153 | |
---|
154 | |
---|
155 | Declare Function OleSetContainedObject Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown, /*IN*/ ByVal fContained As BOOL) As HRESULT |
---|
156 | Declare Function OleNoteObjectVisible Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown, /*IN*/ ByVal fContained As BOOL) As HRESULT |
---|
157 | |
---|
158 | |
---|
159 | /* Drag/Drop APIs */ |
---|
160 | |
---|
161 | Declare Function RegisterDragDrop Lib "ole32.dll" (/*IN*/ ByVal hwnd As HWND, /*IN*/ ByVal pDropTarget As *IDropTarget) As HRESULT |
---|
162 | Declare Function RevokeDragDrop Lib "ole32.dll" (/*IN*/ ByVal hwnd As HWND) As HRESULT |
---|
163 | Declare Function DoDragDrop Lib "ole32.dll" (/*IN*/ ByVal pDataObj As *IDataObject, /*IN*/ ByVal pDropSource As *IDropSource, |
---|
164 | /*IN*/ ByVal dwOKEffects As DWord, /*OUT*/ ByRef dwEffect As DWord) As HRESULT |
---|
165 | |
---|
166 | /* Clipboard APIs */ |
---|
167 | |
---|
168 | Declare Function OleSetClipboard Lib "ole32.dll" (/*IN*/ ByVal pDataObj As *IDataObject) As HRESULT |
---|
169 | Declare Function OleGetClipboard Lib "ole32.dll" (/*OUT*/ ByRef pDataObj As *IDataObject) As HRESULT |
---|
170 | Declare Function OleFlushClipboard Lib "ole32.dll" () As HRESULT |
---|
171 | Declare Function OleIsCurrentClipboard Lib "ole32.dll" (/*IN*/ ByVal pDataObj As *IDataObject) As HRESULT |
---|
172 | |
---|
173 | |
---|
174 | /* InPlace Editing APIs */ |
---|
175 | |
---|
176 | TypeDef HOLEMENU = HGLOBAL ' oleidl.h |
---|
177 | Type OLEMENUGROUPWIDTHS ' oleidl.h |
---|
178 | width[ELM(6)] As Long |
---|
179 | End Type |
---|
180 | Type OLEINPLACEFRAMEINFO ' oleidl.h |
---|
181 | cb As DWord |
---|
182 | fMDIApp As BOOL |
---|
183 | hwndFrame As HWND |
---|
184 | haccel As HACCEL |
---|
185 | cAccelEntries As DWord |
---|
186 | End Type |
---|
187 | Declare Function OleCreateMenuDescriptor Lib "ole32.dll" (/*IN*/ ByVal hmenuCombined As HMENU, |
---|
188 | /*IN*/ ByRef MenuWidths As OLEMENUGROUPWIDTHS) As HOLEMENU |
---|
189 | Declare Function OleSetMenuDescriptor Lib "ole32.dll" (/*IN*/ ByVal holemenu As HOLEMENU, /*IN*/ ByVal hwndFrame As HWND, |
---|
190 | /*IN*/ ByVal hwndActiveObject As HWND, |
---|
191 | /*IN*/ ByVal pFrame As *IOleInPlaceFrame, |
---|
192 | /*IN*/ ByVal pActiveObj As *IOleInPlaceActiveObject) As HRESULT |
---|
193 | Declare Function OleDestroyMenuDescriptor Lib "ole32.dll" (/*IN*/ ByVal holemenu As HOLEMENU) As HRESULT |
---|
194 | |
---|
195 | Declare Function OleTranslateAccelerator Lib "ole32.dll" (/*IN*/ ByVal pFrame As *IOleInPlaceFrame, |
---|
196 | /*IN*/ ByRef FrameInfo As OLEINPLACEFRAMEINFO, /*IN*/ ByRef msg As MSG) As HRESULT |
---|
197 | |
---|
198 | |
---|
199 | /* Helper APIs */ |
---|
200 | Declare Function OleDuplicateData Lib "ole32.dll" (/*IN*/ ByVal hSrc As HANDLE, /*IN*/ ByVal cfFormat As CLIPFORMAT, |
---|
201 | /*IN*/ ByVal uiFlags As DWord) As HANDLE |
---|
202 | |
---|
203 | Declare Function OleDraw Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown, /*IN*/ ByVal dwAspect As DWord, /*IN*/ ByVal hdcDraw As HDC, |
---|
204 | /*IN*/ ByRef rcBounds As RECT) As HRESULT |
---|
205 | |
---|
206 | Declare Function OleRun Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown) As HRESULT |
---|
207 | Declare Function OleIsRunning Lib "ole32.dll" (/*IN*/ ByVal pObject As *IOleObject) As BOOL |
---|
208 | Declare Function OleLockRunning Lib "ole32.dll" (/*IN*/ ByVal pUnknown As *IUnknown, /*IN*/ ByVal fLock As BOOL, /*IN*/ ByVal fLastUnlockCloses As BOOL) As HRESULT |
---|
209 | Declare Sub ReleaseStgMedium Lib "ole32.dll" (/*IN*/ ByRef medium As STGMEDIUM) |
---|
210 | Declare Function CreateOleAdviseHolder Lib "ole32.dll" (/*OUT*/ ByRef pOAHolder As *IOleAdviseHolder) As HRESULT |
---|
211 | |
---|
212 | Declare Function OleCreateDefaultHandler Lib "ole32.dll" (/*IN*/ ByRef clsid As CLSID, /*IN*/ ByVal pUnkOuter As *IUnknown, |
---|
213 | /*IN*/ ByRef riid As IID, /*OUT*/ ByRef pObj As Any) As HRESULT |
---|
214 | |
---|
215 | Declare Function OleCreateEmbeddingHelper Lib "ole32.dll" (/*IN*/ ByRef clsid As CLSID, /*IN*/ ByVal pUnkOuter As *IUnknown, |
---|
216 | /*IN*/ ByVal flags As DWord, /*IN*/ ByVal pCF As *IClassFactory, |
---|
217 | /*IN*/ ByRef riid As IID, /*OUT*/ ByRef pObj As Any) As HRESULT |
---|
218 | |
---|
219 | Declare Function IsAccelerator Lib "ole32.dll" (/*IN*/ ByVal hAccel As HACCEL, /*IN*/ ByVal cAccelEntries As Long, /*IN*/ ByRef msg As MSG, |
---|
220 | /*OUT*/ ByVal pwCmd As *Word) As BOOL |
---|
221 | /* Icon extraction Helper APIs */ |
---|
222 | |
---|
223 | Declare Function OleGetIconOfFile Lib "ole32.dll" (/*IN*/ ByVal lpszPath As LPOLESTR, /*IN*/ ByVal fUseFileAsLabel As BOOL) As HGLOBAL |
---|
224 | |
---|
225 | Declare Function OleGetIconOfClass Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal lpszLabel As LPOLESTR, |
---|
226 | /*IN*/ ByVal fUseTypeAsLabel As BOOL) As HGLOBAL |
---|
227 | |
---|
228 | Declare Function OleMetafilePictFromIconAndLabel Lib "ole32.dll" (/*IN*/ ByVal hIcon As HICON, /*IN*/ ByVal lpszLabel As LPOLESTR, |
---|
229 | /*IN*/ ByVal lpszSourceFile As LPOLESTR, /*IN*/ ByVal iIconIndex As DWord) As HGLOBAL |
---|
230 | |
---|
231 | |
---|
232 | |
---|
233 | /* Registration Database Helper APIs */ |
---|
234 | |
---|
235 | Declare Function OleRegGetUserType Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal dwFormOfType As DWord, |
---|
236 | /*OUT*/ ByVal pszUserType As LPOLESTR) As HRESULT |
---|
237 | |
---|
238 | Declare Function OleRegGetMiscStatus Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal dwAspect As DWord, |
---|
239 | /*OUT*/ ByRef dwStatus As DWord) As HRESULT |
---|
240 | |
---|
241 | Declare Function OleRegEnumFormatEtc Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*IN*/ ByVal dwDirection As DWord, |
---|
242 | /*OUT*/ ByRef penum As *IEnumFORMATETC) As HRESULT |
---|
243 | |
---|
244 | Declare Function OleRegEnumVerbs Lib "ole32.dll" (/*IN*/ ByRef rclsid As CLSID, /*OUT*/ ByRef penum As *IEnumOLEVERB) As HRESULT |
---|
245 | |
---|
246 | /* OLE 1.0 conversion APIS */ |
---|
247 | |
---|
248 | /***** OLE 1.0 OLESTREAM declarations *************************************/ |
---|
249 | |
---|
250 | |
---|
251 | Interface OleStream |
---|
252 | Function Get(p As VoidPtr, dw As DWord) As DWord |
---|
253 | Function Put(p As VoidPtr, dw As DWord) As DWord |
---|
254 | End Interface |
---|
255 | TypeDef LPOLESTREAM = *OleStream |
---|
256 | |
---|
257 | |
---|
258 | Declare Function OleConvertOLESTREAMToIStorage Lib "ole32.dll" ( _ |
---|
259 | /*IN*/ ByVal lpolestream As LPOLESTREAM, |
---|
260 | /*OUT*/ ByVal pstg As *IStorage, |
---|
261 | /*IN*/ ByRef td As DVTARGETDEVICE) As HRESULT |
---|
262 | |
---|
263 | Declare Function OleConvertIStorageToOLESTREAM Lib "ole32.dll" ( _ |
---|
264 | /*IN*/ ByVal pstg As *IStorage, |
---|
265 | /*OUT*/ ByVal lpolestream As LPOLESTREAM) As HRESULT |
---|
266 | |
---|
267 | |
---|
268 | /* Storage Utility APIs */ |
---|
269 | Declare Function GetHGlobalFromILockBytes Lib "ole32.dll" (/*IN*/ ByVal plkbyt As *ILockBytes, /*OUT*/ ByRef hglobal As HGLOBAL) As HRESULT |
---|
270 | Declare Function CreateILockBytesOnHGlobal Lib "ole32.dll" (/*IN*/ ByVal hGlobal As HGLOBAL, /*IN*/ ByVal fDeleteOnRelease As BOOL, |
---|
271 | /*OUT*/ ByRef pplkbyt As *ILockBytes) As HRESULT |
---|
272 | |
---|
273 | Declare Function GetHGlobalFromStream Lib "ole32.dll" (/*IN*/ ByVal pstm As *IStream, /*OUT*/ ByRef hglobal As HGLOBAL) As HRESULT |
---|
274 | Declare Function CreateStreamOnHGlobal Lib "ole32.dll" (/*IN*/ ByVal hGlobal As HGLOBAL, /*IN*/ ByVal fDeleteOnRelease As BOOL, |
---|
275 | /*OUT*/ ByRef pstm As *IStream) As HRESULT |
---|
276 | |
---|
277 | |
---|
278 | /* ConvertTo APIS */ |
---|
279 | |
---|
280 | Declare Function OleDoAutoConvert Lib "ole32.dll" (/*IN*/ ByRef pStg As *IStorage, /*OUT*/ ByRef ClsidNew As CLSID) As HRESULT |
---|
281 | Declare Function OleGetAutoConvert Lib "ole32.dll" (/*IN*/ ByRef clsidOld As CLSID, /*OUT*/ ByRef ClsidNew As CLSID) As HRESULT |
---|
282 | Declare Function OleSetAutoConvert Lib "ole32.dll" (/*IN*/ ByRef clsidOld As CLSID, /*IN*/ ByRef ClsidNew As CLSID) As HRESULT |
---|
283 | Declare Function GetConvertStg Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage) As HRESULT |
---|
284 | Declare Function SetConvertStg Lib "ole32.dll" (/*IN*/ ByVal pStg As *IStorage, /*IN*/ fConvert As BOOL) As HRESULT |
---|
285 | |
---|
286 | |
---|
287 | Declare Function OleConvertIStorageToOLESTREAMEx Lib "ole32.dll" ( _ |
---|
288 | /*IN*/ ByVal pstg As *IStorage, ' Presentation data to OLESTREAM |
---|
289 | /*IN*/ ByVal cfFormat As CLIPFORMAT, ' format |
---|
290 | /*IN*/ ByVal lWidth As Long, ' width |
---|
291 | /*IN*/ ByVal lHeight As Long, ' height |
---|
292 | /*IN*/ ByVal dwSize As DWORD, ' size in bytes |
---|
293 | /*IN*/ ByRef medium As STGMEDIUM, ' bits |
---|
294 | /*OUT*/ ByVal polestm As LPOLESTREAM) As HRESULT |
---|
295 | |
---|
296 | Declare Function OleConvertOLESTREAMToIStorageEx Lib "ole32.dll" ( _ |
---|
297 | /*IN*/ ByVal polestm As LPOLESTREAM, |
---|
298 | /*OUT*/ ByVal pstg As *IStorage,' Presentation data from OLESTREAM |
---|
299 | /*OUT*/ ByRef pcfFormat As CLIPFORMAT, ' format |
---|
300 | /*OUT*/ ByRef plwWidth As Long, ' width |
---|
301 | /*OUT*/ ByRef plHeight As Long, ' height |
---|
302 | /*OUT*/ ByRef pdwSize As DWord, ' size in bytes |
---|
303 | /*OUT*/ ByRef medium As STGMEDIUM) As HRESULT ' bits |
---|
304 | |
---|
305 | ' olectl.h |
---|
306 | Declare Function OleLoadPicture Lib "olepro32" (pStream As *IStream, lSize As Long, fRunmode As BOOL, ByRef riid As IID, ppvObj As VoidPtr) As HRESULT |
---|