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