2 * Defines the COM interfaces and APIs related to structured data storage.
4 * Depends on 'obj_base.h'.
7 #ifndef __WINE_WINE_OBJ_STORAGE_H
8 #define __WINE_WINE_OBJ_STORAGE_H
14 /*****************************************************************************
15 * Predeclare the structures
17 typedef LPOLESTR16
*SNB16
;
18 typedef LPOLESTR32
*SNB32
;
19 DECL_WINELIB_TYPE(SNB
)
21 typedef struct STATSTG STATSTG
;
24 /*****************************************************************************
25 * Predeclare the interfaces
27 DEFINE_OLEGUID(IID_IEnumSTATSTG
, 0x0000000dL
, 0, 0);
28 typedef struct IEnumSTATSTG IEnumSTATSTG
,*LPENUMSTATSTG
;
30 DEFINE_GUID (IID_IFillLockBytes
, 0x99caf010L
, 0x415e, 0x11cf, 0x88, 0x14, 0x00, 0xaa, 0x00, 0xb5, 0x69, 0xf5);
31 typedef struct IFillLockBytes IFillLockBytes
,*LPFILLLOCKBYTES
;
33 DEFINE_GUID (IID_ILayoutStorage
, 0x0e6d4d90L
, 0x6738, 0x11cf, 0x96, 0x08, 0x00, 0xaa, 0x00, 0x68, 0x0d, 0xb4);
34 typedef struct ILayoutStorage ILayoutStorage
,*LPLAYOUTSTORAGE
;
36 DEFINE_OLEGUID(IID_ILockBytes
, 0x0000000aL
, 0, 0);
37 typedef struct ILockBytes ILockBytes
,*LPLOCKBYTES
;
39 DEFINE_OLEGUID(IID_IPersist
, 0x0000010cL
, 0, 0);
40 typedef struct IPersist IPersist
,*LPPERSIST
;
42 DEFINE_OLEGUID(IID_IPersistFile
, 0x0000010bL
, 0, 0);
43 typedef struct IPersistFile IPersistFile
,*LPPERSISTFILE
;
45 DEFINE_OLEGUID(IID_IPersistStorage
, 0x0000010aL
, 0, 0);
46 typedef struct IPersistStorage IPersistStorage
,*LPPERSISTSTORAGE
;
48 DEFINE_OLEGUID(IID_IPersistStream
, 0x00000109L
, 0, 0);
49 typedef struct IPersistStream IPersistStream
,*LPPERSISTSTREAM
;
51 DEFINE_GUID (IID_IProgressNotify
, 0xa9d758a0L
, 0x4617, 0x11cf, 0x95, 0xfc, 0x00, 0xaa, 0x00, 0x68, 0x0d, 0xb4);
52 typedef struct IProgressNotify IProgressNotify
,*LPPROGRESSNOTIFY
;
54 DEFINE_OLEGUID(IID_IRootStorage
, 0x00000012L
, 0, 0);
55 typedef struct IRootStorage IRootStorage
,*LPROOTSTORAGE
;
57 DEFINE_GUID (IID_ISequentialStream
, 0x0c733a30L
, 0x2a1c, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
58 typedef struct ISequentialStream ISequentialStream
,*LPSEQUENTIALSTREAM
;
60 DEFINE_OLEGUID(IID_IStorage
, 0x0000000bL
, 0, 0);
61 typedef struct IStorage16 IStorage16
,*LPSTORAGE16
;
62 typedef struct IStorage32 IStorage32
,*LPSTORAGE32
;
63 DECL_WINELIB_TYPE(IStorage
)
64 DECL_WINELIB_TYPE(LPSTORAGE
)
66 DEFINE_OLEGUID(IID_IStream
, 0x0000000cL
, 0, 0);
67 typedef struct IStream16 IStream16
,*LPSTREAM16
;
68 typedef struct IStream32 IStream32
,*LPSTREAM32
;
69 DECL_WINELIB_TYPE(IStream
)
70 DECL_WINELIB_TYPE(LPSTREAM
)
73 /*****************************************************************************
76 * See IStorage and IStream
78 #define STGM_DIRECT 0x00000000
79 #define STGM_TRANSACTED 0x00010000
80 #define STGM_SIMPLE 0x08000000
81 #define STGM_READ 0x00000000
82 #define STGM_WRITE 0x00000001
83 #define STGM_READWRITE 0x00000002
84 #define STGM_SHARE_DENY_NONE 0x00000040
85 #define STGM_SHARE_DENY_READ 0x00000030
86 #define STGM_SHARE_DENY_WRITE 0x00000020
87 #define STGM_SHARE_EXCLUSIVE 0x00000010
88 #define STGM_PRIORITY 0x00040000
89 #define STGM_DELETEONRELEASE 0x04000000
90 #define STGM_CREATE 0x00001000
91 #define STGM_CONVERT 0x00020000
92 #define STGM_FAILIFTHERE 0x00000000
93 #define STGM_NOSCRATCH 0x00100000
94 #define STGM_NOSNAPSHOT 0x00200000
96 /*****************************************************************************
101 #define STGTY_STORAGE 1
102 #define STGTY_STREAM 2
104 /*****************************************************************************
105 * STATFLAG enumeration
107 * See IStorage and IStream
109 #define STATFLAG_DEFAULT 0
110 #define STATFLAG_NONAME 1
112 /*****************************************************************************
113 * STREAM_SEEK enumeration
117 #define STREAM_SEEK_SET 0
118 #define STREAM_SEEK_CUR 1
119 #define STREAM_SEEK_END 2
121 /*****************************************************************************
127 ULARGE_INTEGER cbSize
;
132 DWORD grfLocksSupported
;
139 /*****************************************************************************
140 * IEnumSTATSTG interface
142 #define ICOM_INTERFACE IEnumSTATSTG
143 #define IEnumSTATSTG_METHODS \
144 ICOM_METHOD3(HRESULT,Next, ULONG,celt, STATSTG*,rgelt, ULONG*,pceltFethed) \
145 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
146 ICOM_METHOD (HRESULT,Reset) \
147 ICOM_METHOD1(HRESULT,Clone, IEnumSTATSTG**,ppenum)
148 #define IEnumSTATSTG_IMETHODS \
151 ICOM_DEFINE(IEnumSTATSTG
,IUnknown
)
152 #undef ICOM_INTERFACE
154 #ifdef ICOM_CINTERFACE
155 /*** IUnknown methods ***/
156 #define IEnumSTATSTG_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
157 #define IEnumSTATSTG_AddRef(p) ICOM_CALL (AddRef,p)
158 #define IEnumSTATSTG_Release(p) ICOM_CALL (Release,p)
159 /*** IEnumSTATSTG methods ***/
160 #define IEnumSTATSTG_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
161 #define IEnumSTATSTG_Skip(p,a) ICOM_CALL1(Skip,p,a)
162 #define IEnumSTATSTG_Reset(p) ICOM_CALL(Reset,p)
163 #define IEnumSTATSTG_Clone(p,a) ICOM_CALL1(Clone,p,a)
167 /*****************************************************************************
168 * IFillLockBytes interface
170 #define ICOM_INTERFACE IFillLockBytes
171 #define IFillLockBytes_METHODS \
172 ICOM_METHOD3(HRESULT,FillAppend, const void*,pv, ULONG,cb, ULONG*,pcbWritten) \
173 ICOM_METHOD4(HRESULT,FillAt, ULARGE_INTEGER,ulOffset, const void*,pv, ULONG,cb, ULONG*,pcbWritten) \
174 ICOM_METHOD1(HRESULT,SetFillSize, ULARGE_INTEGER,ulSize) \
175 ICOM_METHOD1(HRESULT,Terminate, BOOL32,bCanceled)
176 #define IFillLockBytes_IMETHODS \
178 IFillLockBytes_METHODS
179 ICOM_DEFINE(IFillLockBytes
,IUnknown
)
180 #undef ICOM_INTERFACE
182 #ifdef ICOM_CINTERFACE
183 /*** IUnknown methods ***/
184 #define IFillLockBytes_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
185 #define IFillLockBytes_AddRef(p) ICOM_CALL (AddRef,p)
186 #define IFillLockBytes_Release(p) ICOM_CALL (Release,p)
187 /*** IFillLockBytes methods ***/
188 #define IFillLockBytes_FillAppend(p,a,b,c) ICOM_CALL3(FillAppend,p,a,b,c)
189 #define IFillLockBytes_FillAt(p,a,b,c,d) ICOM_CALL4(FillAt,p,a,b,c,d)
190 #define IFillLockBytes_SetFillSize(p,a) ICOM_CALL1(SetFillSize,p,a)
191 #define IFillLockBytes_Terminate(p,a) ICOM_CALL1(Terminate,p,a)
195 /*****************************************************************************
196 * ILayoutStorage interface
198 typedef struct tagStorageLayout
201 OLECHAR16
* pwcsElementName
;
202 LARGE_INTEGER cOffset
;
203 LARGE_INTEGER cBytes
;
206 #define ICOM_INTERFACE ILayoutStorage
207 #define ILayoutStorage_METHODS \
208 ICOM_METHOD2(HRESULT,LayoutScript, DWORD,nEntries, DWORD,glfInterleavedFlag) \
209 ICOM_METHOD (HRESULT,BeginMonitor) \
210 ICOM_METHOD (HRESULT,EndMonitor) \
211 ICOM_METHOD1(HRESULT,ReLayoutDocfile, OLECHAR16*,pwcsNewDfName) \
212 ICOM_METHOD1(HRESULT,ReLayoutDocfileOnILockBytes, ILockBytes*,pILockBytes)
213 #define ILayoutStorage_IMETHODS \
215 ILayoutStorage_METHODS
216 ICOM_DEFINE(ILayoutStorage
,IUnknown
)
217 #undef ICOM_INTERFACE
219 #ifdef ICOM_CINTERFACE
220 /*** IUnknown methods ***/
221 #define ILayoutStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
222 #define ILayoutStorage_AddRef(p) ICOM_CALL (AddRef,p)
223 #define ILayoutStorage_Release(p) ICOM_CALL (Release,p)
224 /*** ILayoutStorage methods ***/
225 #define ILayoutStorage_LayoutScript(p,a,b) ICOM_CALL2(LayoutScript,p,a,b)
226 #define ILayoutStorage_BeginMonitor(p) ICOM_CALL (BeginMonitor,p)
227 #define ILayoutStorage_EndMonitor(p) ICOM_CALL (EndMonitor,p)
228 #define ILayoutStorage_ReLayoutDocfile(p,a) ICOM_CALL1(ReLayoutDocfile,p,a)
229 #define ILayoutStorage_ReLayoutDocfileOnILockBytes(p,a) ICOM_CALL1(ReLayoutDocfileOnILockBytes,p,a)
233 /*****************************************************************************
234 * ILockBytes interface
236 #define ICOM_INTERFACE ILockBytes
237 #define ILockBytes_METHODS \
238 ICOM_METHOD4(HRESULT,ReadAt, ULARGE_INTEGER,ulOffset, void*,pv, ULONG,cb, ULONG*,pcbRead) \
239 ICOM_METHOD4(HRESULT,WriteAt, ULARGE_INTEGER,ulOffset, const void*,pv, ULONG,cb, ULONG*,pcbWritten) \
240 ICOM_METHOD (HRESULT,Flush); \
241 ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,cb) \
242 ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
243 ICOM_METHOD3(HRESULT,UnlockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
244 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
245 #define ILockBytes_IMETHODS \
248 ICOM_DEFINE(ILockBytes
,IUnknown
)
249 #undef ICOM_INTERFACE
251 #ifdef ICOM_CINTERFACE
252 /*** IUnknown methods ***/
253 #define ILockBytes_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
254 #define ILockBytes_AddRef(p) ICOM_CALL (AddRef,p)
255 #define ILockBytes_Release(p) ICOM_CALL (Release,p)
256 /*** ILockBytes methods ***/
257 #define ILockBytes_ReadAt(p,a,b,c,d) ICOM_CALL4(ReadAt,p,a,b,c,d)
258 #define ILockBytes_WriteAt(p,a,b,c,d) ICOM_CALL4(WriteAt,p,a,b,c,d)
259 #define ILockBytes_Flush(p) ICOM_CALL (Flush,p)
260 #define ILockBytes_SetSize(p,a) ICOM_CALL1(SetSize,p,a)
261 #define ILockBytes_LockRegion(p,a,b,c) ICOM_CALL3(LockRegion,p,a,b,c)
262 #define ILockBytes_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
263 #define ILockBytes_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
267 /*****************************************************************************
270 #define ICOM_INTERFACE IPersist
271 #define IPersist_METHODS \
272 ICOM_CMETHOD1(HRESULT,GetClassID, CLSID*,pClassID)
273 #define IPersist_IMETHODS \
276 ICOM_DEFINE(IPersist
,IUnknown
)
277 #undef ICOM_INTERFACE
279 #ifdef ICOM_CINTERFACE
280 /*** IUnknown methods ***/
281 #define IPersist_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
282 #define IPersist_AddRef(p) ICOM_CALL (AddRef,p)
283 #define IPersist_Release(p) ICOM_CALL (Release,p)
284 /*** IPersist methods ***/
285 #define IPersist_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
289 /*****************************************************************************
290 * IPersistFile interface
292 #define ICOM_INTERFACE IPersistFile
293 #define IPersistFile_METHODS \
294 ICOM_CMETHOD (HRESULT,IsDirty) \
295 ICOM_METHOD2 (HRESULT,Load, LPCOLESTR32,pszFileName, DWORD,dwMode) \
296 ICOM_METHOD2 (HRESULT,Save, LPCOLESTR32,pszFileName, BOOL32,fRemember) \
297 ICOM_METHOD1 (HRESULT,SaveCompleted, LPCOLESTR32,pszFileName) \
298 ICOM_CMETHOD1(HRESULT,GetCurFile, LPOLESTR32*,ppszFileName)
299 #define IPersistFile_IMETHODS \
302 ICOM_DEFINE(IPersistFile
,IPersist
)
303 #undef ICOM_INTERFACE
305 #ifdef ICOM_CINTERFACE
306 /*** IUnknown methods ***/
307 #define IPersistFile_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
308 #define IPersistFile_AddRef(p) ICOM_CALL (AddRef,p)
309 #define IPersistFile_Release(p) ICOM_CALL (Release,p)
310 /*** IPersist methods ***/
311 #define IPersistFile_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
312 /*** IPersistFile methods ***/
313 #define IPersistFile_IsDirty(p) ICOM_CALL(IsDirty,p)
314 #define IPersistFile_Load(p,a,b) ICOM_CALL2(Load,p,a,b)
315 #define IPersistFile_Save(p,a,b) ICOM_CALL2(Save,p,a,b)
316 #define IPersistFile_SaveCompleted(p,a) ICOM_CALL1(SaveCompleted,p,a)
317 #define IPersistFile_GetCurFile(p,a) ICOM_CALL1(GetCurFile,p,a)
321 /*****************************************************************************
322 * IPersistStorage interface
324 #define ICOM_INTERFACE IPersistStorage
325 #define IPersistStorage_METHODS \
326 ICOM_METHOD (HRESULT,IsDirty) \
327 ICOM_METHOD1(HRESULT,InitNew, IStorage32*,pStg) \
328 ICOM_METHOD1(HRESULT,Load, IStorage32*,pStg) \
329 ICOM_METHOD2(HRESULT,Save, IStorage32*,pStg, BOOL32,fSameAsLoad) \
330 ICOM_METHOD1(HRESULT,SaveCompleted, IStorage32*,pStgNew) \
331 ICOM_METHOD (HRESULT,HandsOffStorage)
332 #define IPersistStorage_IMETHODS \
334 IPersistStorage_METHODS
335 ICOM_DEFINE(IPersistStorage
,IPersist
)
336 #undef ICOM_INTERFACE
338 #ifdef ICOM_CINTERFACE
339 /*** IUnknown methods ***/
340 #define IPersistStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
341 #define IPersistStorage_AddRef(p) ICOM_CALL (AddRef,p)
342 #define IPersistStorage_Release(p) ICOM_CALL (Release,p)
343 /*** IPersist methods ***/
344 #define IPersistStorage_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
345 /*** IPersistStorage methods ***/
346 #define IPersistStorage_IsDirty(p) ICOM_CALL (IsDirty,p)
347 #define IPersistStorage_InitNew(p,a) ICOM_CALL1(InitNew,p,a)
348 #define IPersistStorage_Load(p,a) ICOM_CALL1(Load,p,a)
349 #define IPersistStorage_Save(p,a,b) ICOM_CALL2(Save,p,a,b)
350 #define IPersistStorage_SaveCompleted(p,a) ICOM_CALL1(SaveCompleted,p,a)
351 #define IPersistStorage_HandsOffStorage(p) ICOM_CALL (HandsOffStorage,p)
355 /*****************************************************************************
356 * IPersistStream interface
358 #define ICOM_INTERFACE IPersistStream
359 #define IPersistStream_METHODS \
360 ICOM_METHOD (HRESULT,IsDirty) \
361 ICOM_METHOD1(HRESULT,Load, IStream32*,pStm) \
362 ICOM_METHOD2(HRESULT,Save, IStream32*,pStm, BOOL32,fClearDirty) \
363 ICOM_METHOD1(HRESULT,GetSizeMax, ULARGE_INTEGER*,pcbSize)
364 #define IPersistStream_IMETHODS \
366 IPersistStream_METHODS
367 ICOM_DEFINE(IPersistStream
,IPersist
)
368 #undef ICOM_INTERFACE
370 #ifdef ICOM_CINTERFACE
371 /*** IUnknown methods ***/
372 #define IPersistStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
373 #define IPersistStream_AddRef(p) ICOM_CALL (AddRef,p)
374 #define IPersistStream_Release(p) ICOM_CALL (Release,p)
375 /*** IPersist methods ***/
376 #define IPersistStream_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
377 /*** IPersistStream methods ***/
378 #define IPersistStream_IsDirty(p) ICOM_CALL (IsDirty,p)
379 #define IPersistStream_Load(p,a) ICOM_CALL1(Load,p,a)
380 #define IPersistStream_Save(p,a,b) ICOM_CALL2(Save,p,a,b)
381 #define IPersistStream_GetSizeMax(p,a) ICOM_CALL1(GetSizeMax,p,a)
385 /*****************************************************************************
386 * IProgressNotify interface
388 #define ICOM_INTERFACE IProgressNotify
389 #define IProgressNotify_METHODS \
390 ICOM_METHOD4(HRESULT,OnProgress, DWORD,dwProgressCurrent, DWORD,dwProgressMaximum, BOOL32,fAccurate, BOOL32,fOwner)
391 #define IProgressNotify_IMETHODS \
393 IProgressNotify_METHODS
394 ICOM_DEFINE(IProgressNotify
,IUnknown
)
395 #undef ICOM_INTERFACE
397 #ifdef ICOM_CINTERFACE
398 /*** IUnknown methods ***/
399 #define IProgressNotify_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
400 #define IProgressNotify_AddRef(p) ICOM_CALL (AddRef,p)
401 #define IProgressNotify_Release(p) ICOM_CALL (Release,p)
402 /*** IProgressNotify methods ***/
403 #define IProgressNotify_OnProgress(p,a,b,c,d) ICOM_CALL4(OnProgress,p,a,b,c,d)
407 /*****************************************************************************
408 * IRootStorage interface
410 #define ICOM_INTERFACE IRootStorage
411 #define IRootStorage_METHODS \
412 ICOM_METHOD1(HRESULT,SwitchToFile, LPOLESTR32,pszFile)
413 #define IRootStorage_IMETHODS \
416 ICOM_DEFINE(IRootStorage
,IUnknown
)
417 #undef ICOM_INTERFACE
419 #ifdef ICOM_CINTERFACE
420 /*** IUnknown methods ***/
421 #define IRootStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
422 #define IRootStorage_AddRef(p) ICOM_CALL (AddRef,p)
423 #define IRootStorage_Release(p) ICOM_CALL (Release,p)
424 /*** IRootStorage methods ***/
425 #define IRootStorage_SwitchToFile(p,a) ICOM_CALLSwitchToFile(,p,a)
429 /*****************************************************************************
430 * ISequentialStream interface
432 #define ICOM_INTERFACE ISequentialStream
433 #define ISequentialStream_METHODS \
434 ICOM_METHOD3(HRESULT,Read, void*,pv, ULONG,cb, ULONG*,pcbRead) \
435 ICOM_METHOD3(HRESULT,Write, const void*,pv, ULONG,cb, ULONG*,pcbWritten)
436 #define ISequentialStream_IMETHODS \
438 ISequentialStream_METHODS
439 ICOM_DEFINE(ISequentialStream
,IUnknown
)
440 #undef ICOM_INTERFACE
442 #ifdef ICOM_CINTERFACE
443 /*** IUnknown methods ***/
444 #define ISequentialStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
445 #define ISequentialStream_AddRef(p) ICOM_CALL (AddRef,p)
446 #define ISequentialStream_Release(p) ICOM_CALL (Release,p)
447 /*** ISequentialStream methods ***/
448 #define ISequentialStream_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
449 #define ISequentialStream_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
453 /*****************************************************************************
456 #define ICOM_INTERFACE IStorage16
457 #define IStorage16_METHODS \
458 ICOM_METHOD5(HRESULT,CreateStream, LPCOLESTR16,pwcsName, DWORD,grfMode, DWORD,reserved1, DWORD,reserved2, IStream16**,ppstm) \
459 ICOM_METHOD5(HRESULT,OpenStream, LPCOLESTR16,pwcsName, void*,reserved1, DWORD,grfMode, DWORD,reserved2, IStream16**,ppstm) \
460 ICOM_METHOD5(HRESULT,CreateStorage, LPCOLESTR16,pwcsName, DWORD,grfMode, DWORD,dwStgFmt, DWORD,reserved2, IStorage16**,ppstg) \
461 ICOM_METHOD6(HRESULT,OpenStorage, LPCOLESTR16,pwcsName, IStorage16*,pstgPriority, DWORD,grfMode, SNB16,snb16Exclude, DWORD,reserved, IStorage16**,ppstg) \
462 ICOM_METHOD4(HRESULT,CopyTo, DWORD,ciidExclude, const IID*,rgiidExclude, SNB16,snb16Exclude, IStorage16*,pstgDest) \
463 ICOM_METHOD4(HRESULT,MoveElementTo, LPCOLESTR16,pwcsName, IStorage16*,pstgDest, LPCOLESTR16,pwcsNewName, DWORD,grfFlags) \
464 ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags) \
465 ICOM_METHOD (HRESULT,Revert) \
466 ICOM_METHOD4(HRESULT,EnumElements, DWORD,reserved1, void*,reserved2, DWORD,reserved3, IEnumSTATSTG**,ppenum) \
467 ICOM_METHOD1(HRESULT,DestroyElement, LPCOLESTR16,pwcsName) \
468 ICOM_METHOD2(HRESULT,RenameElement, LPCOLESTR16,pwcsOldName, LPCOLESTR16,pwcsNewName) \
469 ICOM_METHOD4(HRESULT,SetElementTimes,LPCOLESTR16,pwcsName, const FILETIME*,pctime, const FILETIME*,patime, const FILETIME*,pmtime) \
470 ICOM_METHOD1(HRESULT,SetClass, REFCLSID,clsid) \
471 ICOM_METHOD2(HRESULT,SetStateBits, DWORD,grfStateBits, DWORD,grfMask) \
472 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
473 #define IStorage16_IMETHODS \
476 ICOM_DEFINE(IStorage16
,IUnknown
)
477 #undef ICOM_INTERFACE
479 #ifdef ICOM_CINTERFACE
480 /*** IUnknown methods ***/
481 #define IStorage16_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
482 #define IStorage16_AddRef(p) ICOM_CALL (AddRef,p)
483 #define IStorage16_Release(p) ICOM_CALL (Release,p)
484 /*** IStorage16 methods ***/
485 #define IStorage16_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
486 #define IStorage16_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
487 #define IStorage16_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
488 #define IStorage16_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
489 #define IStorage16_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
490 #define IStorage16_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
491 #define IStorage16_Commit(p,a) ICOM_CALL1(Commit,p,a)
492 #define IStorage16_Revert(p) ICOM_CALL (Revert,p)
493 #define IStorage16_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
494 #define IStorage16_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
495 #define IStorage16_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
496 #define IStorage16_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
497 #define IStorage16_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
498 #define IStorage16_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
499 #define IStorage16_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
503 #define ICOM_INTERFACE IStorage32
504 #define IStorage32_METHODS \
505 ICOM_METHOD5(HRESULT,CreateStream, LPCOLESTR32,pwcsName, DWORD,grfMode, DWORD,reserved1, DWORD,reserved2, IStream32**,ppstm) \
506 ICOM_METHOD5(HRESULT,OpenStream, LPCOLESTR32,pwcsName, void*,reserved1, DWORD,grfMode, DWORD,reserved2, IStream32**,ppstm) \
507 ICOM_METHOD5(HRESULT,CreateStorage, LPCOLESTR32,pwcsName, DWORD,grfMode, DWORD,dwStgFmt, DWORD,reserved2, IStorage32**,ppstg) \
508 ICOM_METHOD6(HRESULT,OpenStorage, LPCOLESTR32,pwcsName, IStorage32*,pstgPriority, DWORD,grfMode, SNB32,snb16Exclude, DWORD,reserved, IStorage32**,ppstg) \
509 ICOM_METHOD4(HRESULT,CopyTo, DWORD,ciidExclude, const IID*,rgiidExclude, SNB32,snb16Exclude, IStorage32*,pstgDest) \
510 ICOM_METHOD4(HRESULT,MoveElementTo, LPCOLESTR32,pwcsName, IStorage32*,pstgDest, LPCOLESTR32,pwcsNewName, DWORD,grfFlags) \
511 ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags) \
512 ICOM_METHOD (HRESULT,Revert) \
513 ICOM_METHOD4(HRESULT,EnumElements, DWORD,reserved1, void*,reserved2, DWORD,reserved3, IEnumSTATSTG**,ppenum) \
514 ICOM_METHOD1(HRESULT,DestroyElement, LPCOLESTR32,pwcsName) \
515 ICOM_METHOD2(HRESULT,RenameElement, LPCOLESTR32,pwcsOldName, LPCOLESTR32,pwcsNewName) \
516 ICOM_METHOD4(HRESULT,SetElementTimes,LPCOLESTR32,pwcsName, const FILETIME*,pctime, const FILETIME*,patime, const FILETIME*,pmtime) \
517 ICOM_METHOD1(HRESULT,SetClass, REFCLSID,clsid) \
518 ICOM_METHOD2(HRESULT,SetStateBits, DWORD,grfStateBits, DWORD,grfMask) \
519 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
520 #define IStorage32_IMETHODS \
523 ICOM_DEFINE(IStorage32
,IUnknown
)
524 #undef ICOM_INTERFACE
526 #ifdef ICOM_CINTERFACE
527 /*** IUnknown methods ***/
528 #define IStorage32_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
529 #define IStorage32_AddRef(p) ICOM_CALL (AddRef,p)
530 #define IStorage32_Release(p) ICOM_CALL (Release,p)
531 /*** IStorage32 methods ***/
532 #define IStorage32_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
533 #define IStorage32_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
534 #define IStorage32_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
535 #define IStorage32_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
536 #define IStorage32_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
537 #define IStorage32_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
538 #define IStorage32_Commit(p,a) ICOM_CALL1(Commit,p,a)
539 #define IStorage32_Revert(p) ICOM_CALL (Revert,p)
540 #define IStorage32_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
541 #define IStorage32_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
542 #define IStorage32_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
543 #define IStorage32_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
544 #define IStorage32_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
545 #define IStorage32_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
546 #define IStorage32_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
549 /* Duplicated for WINELIB */
550 /*** IUnknown methods ***/
551 #define IStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
552 #define IStorage_AddRef(p) ICOM_CALL (AddRef,p)
553 #define IStorage_Release(p) ICOM_CALL (Release,p)
554 /*** IStorage methods ***/
555 #define IStorage_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
556 #define IStorage_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
557 #define IStorage_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
558 #define IStorage_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
559 #define IStorage_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
560 #define IStorage_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
561 #define IStorage_Commit(p,a) ICOM_CALL1(Commit,p,a)
562 #define IStorage_Revert(p) ICOM_CALL (Revert,p)
563 #define IStorage_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
564 #define IStorage_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
565 #define IStorage_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
566 #define IStorage_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
567 #define IStorage_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
568 #define IStorage_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
569 #define IStorage_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
574 /*****************************************************************************
577 #define ICOM_INTERFACE IStream16
578 #define IStream16_METHODS \
579 ICOM_METHOD3(HRESULT,Seek, LARGE_INTEGER,dlibMove, DWORD,dwOrigin, ULARGE_INTEGER*,plibNewPosition) \
580 ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,libNewSize) \
581 ICOM_METHOD4(HRESULT,CopyTo, IStream16*,pstm, ULARGE_INTEGER,cb, ULARGE_INTEGER*,pcbRead, ULARGE_INTEGER*,pcbWritten) \
582 ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags) \
583 ICOM_METHOD (HRESULT,Revert) \
584 ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
585 ICOM_METHOD3(HRESULT,UnlockRegion,ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
586 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag) \
587 ICOM_METHOD1(HRESULT,Clone, IStream16**,ppstm)
588 #define IStream16_IMETHODS \
589 ISequentialStream_IMETHODS \
591 ICOM_DEFINE(IStream16
,ISequentialStream
)
592 #undef ICOM_INTERFACE
594 #ifdef ICOM_CINTERFACE
595 /*** IUnknown methods ***/
596 #define IStream16_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
597 #define IStream16_AddRef(p) ICOM_CALL (AddRef,p)
598 #define IStream16_Release(p) ICOM_CALL (Release,p)
599 /*** ISequentialStream methods ***/
600 #define IStream16_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
601 #define IStream16_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
602 /*** IStream16 methods ***/
603 #define IStream16_Seek(p) ICOM_CALL3(Seek,p)
604 #define IStream16_SetSize(p,a,b) ICOM_CALL1(SetSize,p,a,b)
605 #define IStream16_CopyTo(pa,b,c,d) ICOM_CALL4(CopyTo,pa,b,c,d)
606 #define IStream16_Commit(p,a) ICOM_CALL1(Commit,p,a)
607 #define IStream16_Revert(p) ICOM_CALL (Revert,p)
608 #define IStream16_LockRegion(pa,b,c) ICOM_CALL3(LockRegion,pa,b,c)
609 #define IStream16_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
610 #define IStream16_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
611 #define IStream16_Clone(p,a) ICOM_CALL1(Clone,p,a)
615 #define ICOM_INTERFACE IStream32
616 #define IStream32_METHODS \
617 ICOM_METHOD3(HRESULT,Seek, LARGE_INTEGER,dlibMove, DWORD,dwOrigin, ULARGE_INTEGER*,plibNewPosition) \
618 ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,libNewSize) \
619 ICOM_METHOD4(HRESULT,CopyTo, IStream32*,pstm, ULARGE_INTEGER,cb, ULARGE_INTEGER*,pcbRead, ULARGE_INTEGER*,pcbWritten) \
620 ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags) \
621 ICOM_METHOD (HRESULT,Revert) \
622 ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
623 ICOM_METHOD3(HRESULT,UnlockRegion,ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
624 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag) \
625 ICOM_METHOD1(HRESULT,Clone, IStream32**,ppstm)
626 #define IStream32_IMETHODS \
627 ISequentialStream_IMETHODS \
629 ICOM_DEFINE(IStream32
,ISequentialStream
)
630 #undef ICOM_INTERFACE
632 #ifdef ICOM_CINTERFACE
633 /*** IUnknown methods ***/
634 #define IStream32_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
635 #define IStream32_AddRef(p) ICOM_CALL (AddRef,p)
636 #define IStream32_Release(p) ICOM_CALL (Release,p)
637 /*** ISequentialStream methods ***/
638 #define IStream32_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
639 #define IStream32_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
640 /*** IStream32 methods ***/
641 #define IStream32_Seek(p,a,b,c) ICOM_CALL3(Seek,p,a,b,c)
642 #define IStream32_SetSize(p,a) ICOM_CALL1(SetSize,p,a)
643 #define IStream32_CopyTo(pa,b,c,d) ICOM_CALL4(CopyTo,pa,b,c,d)
644 #define IStream32_Commit(p,a) ICOM_CALL1(Commit,p,a)
645 #define IStream32_Revert(p) ICOM_CALL (Revert,p)
646 #define IStream32_LockRegion(pa,b,c) ICOM_CALL3(LockRegion,pa,b,c)
647 #define IStream32_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
648 #define IStream32_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
649 #define IStream32_Clone(p,a) ICOM_CALL1(Clone,p,a)
652 /* Duplicated for WINELIB */
653 /*** IUnknown methods ***/
654 #define IStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
655 #define IStream_AddRef(p) ICOM_CALL (AddRef,p)
656 #define IStream_Release(p) ICOM_CALL (Release,p)
657 /*** ISequentialStream methods ***/
658 #define IStream_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
659 #define IStream_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
660 /*** IStream methods ***/
661 #define IStream_Seek(p,a,b,c) ICOM_CALL3(Seek,p,a,b,c)
662 #define IStream_SetSize(p,a) ICOM_CALL1(SetSize,p,a)
663 #define IStream_CopyTo(pa,b,c,d) ICOM_CALL4(CopyTo,pa,b,c,d)
664 #define IStream_Commit(p,a) ICOM_CALL1(Commit,p,a)
665 #define IStream_Revert(p) ICOM_CALL (Revert,p)
666 #define IStream_LockRegion(pa,b,c) ICOM_CALL3(LockRegion,pa,b,c)
667 #define IStream_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
668 #define IStream_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
669 #define IStream_Clone(p,a) ICOM_CALL1(Clone,p,a)
674 /*****************************************************************************
677 /* FIXME: many functions are missing */
678 HRESULT WINAPI
StgCreateDocFile16(LPCOLESTR16 pwcsName
,DWORD grfMode
,DWORD reserved
,IStorage16
**ppstgOpen
);
679 HRESULT WINAPI
StgCreateDocfile32(LPCOLESTR32 pwcsName
,DWORD grfMode
,DWORD reserved
,IStorage32
**ppstgOpen
);
680 #define StgCreateDocfile WINELIB_NAME(StgCreateDocfile)
682 HRESULT WINAPI
StgIsStorageFile16(LPCOLESTR16 fn
);
683 HRESULT WINAPI
StgIsStorageFile32(LPCOLESTR32 fn
);
684 #define StgIsStorageFile WINELIB_NAME(StgIsStorageFile)
686 HRESULT WINAPI
StgOpenStorage16(const OLECHAR16
* pwcsName
,IStorage16
* pstgPriority
,DWORD grfMode
,SNB16 snbExclude
,DWORD reserved
,IStorage16
**ppstgOpen
);
687 HRESULT WINAPI
StgOpenStorage32(const OLECHAR32
* pwcsName
,IStorage32
* pstgPriority
,DWORD grfMode
,SNB32 snbExclude
,DWORD reserved
,IStorage32
**ppstgOpen
);
688 #define StgOpenStorage WINELIB_NAME(StgOpenStorage)
690 HRESULT WINAPI
WriteClassStg32(IStorage32
* pStg
, REFCLSID rclsid
);
691 #define WriteClassStg WINELIB_NAME(WriteClassStg)
694 /*****************************************************************************
698 /* FIXME: not implemented */
699 BOOL32 WINAPI
CoDosDateTimeToFileTime(WORD nDosDate
, WORD nDosTime
, FILETIME
* lpFileTime
);
701 /* FIXME: not implemented */
702 BOOL32 WINAPI
CoFileTimeToDosDateTime(FILETIME
* lpFileTime
, WORD
* lpDosDate
, WORD
* lpDosTime
);
705 #endif /* __WINE_WINE_OBJ_STORAGE_H */