2 * Defines the COM interfaces and APIs related to structured data storage.
5 #ifndef __WINE_WINE_OBJ_STORAGE_H
6 #define __WINE_WINE_OBJ_STORAGE_H
10 #endif /* defined(__cplusplus) */
12 /*****************************************************************************
13 * Predeclare the structures
15 typedef enum tagLOCKTYPE
22 typedef struct tagStorageLayout
25 OLECHAR16* pwcsElementName;
26 LARGE_INTEGER cOffset;
30 typedef struct tagSTATSTG {
33 ULARGE_INTEGER cbSize;
38 DWORD grfLocksSupported;
44 typedef struct tagSTATSTG16 {
47 ULARGE_INTEGER cbSize;
52 DWORD grfLocksSupported;
58 typedef LPOLESTR16 *SNB16;
59 typedef LPOLESTR *SNB;
62 /*****************************************************************************
63 * Predeclare the interfaces
65 DEFINE_OLEGUID(IID_IEnumSTATSTG, 0x0000000dL, 0, 0);
66 typedef struct IEnumSTATSTG IEnumSTATSTG,*LPENUMSTATSTG;
68 DEFINE_GUID (IID_IFillLockBytes, 0x99caf010L, 0x415e, 0x11cf, 0x88, 0x14, 0x00, 0xaa, 0x00, 0xb5, 0x69, 0xf5);
69 typedef struct IFillLockBytes IFillLockBytes,*LPFILLLOCKBYTES;
71 DEFINE_GUID (IID_ILayoutStorage, 0x0e6d4d90L, 0x6738, 0x11cf, 0x96, 0x08, 0x00, 0xaa, 0x00, 0x68, 0x0d, 0xb4);
72 typedef struct ILayoutStorage ILayoutStorage,*LPLAYOUTSTORAGE;
74 DEFINE_OLEGUID(IID_ILockBytes, 0x0000000aL, 0, 0);
75 typedef struct ILockBytes ILockBytes,*LPLOCKBYTES;
77 DEFINE_OLEGUID(IID_IPersist, 0x0000010cL, 0, 0);
78 typedef struct IPersist IPersist,*LPPERSIST;
80 DEFINE_OLEGUID(IID_IPersistFile, 0x0000010bL, 0, 0);
81 typedef struct IPersistFile IPersistFile,*LPPERSISTFILE;
83 DEFINE_OLEGUID(IID_IPersistStorage, 0x0000010aL, 0, 0);
84 typedef struct IPersistStorage IPersistStorage,*LPPERSISTSTORAGE;
86 DEFINE_OLEGUID(IID_IPersistStream, 0x00000109L, 0, 0);
87 typedef struct IPersistStream IPersistStream,*LPPERSISTSTREAM;
89 DEFINE_GUID (IID_IProgressNotify, 0xa9d758a0L, 0x4617, 0x11cf, 0x95, 0xfc, 0x00, 0xaa, 0x00, 0x68, 0x0d, 0xb4);
90 typedef struct IProgressNotify IProgressNotify,*LPPROGRESSNOTIFY;
92 DEFINE_OLEGUID(IID_IRootStorage, 0x00000012L, 0, 0);
93 typedef struct IRootStorage IRootStorage,*LPROOTSTORAGE;
95 DEFINE_GUID (IID_ISequentialStream, 0x0c733a30L, 0x2a1c, 0x11ce, 0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d);
96 typedef struct ISequentialStream ISequentialStream,*LPSEQUENTIALSTREAM;
98 DEFINE_OLEGUID(IID_IStorage, 0x0000000bL, 0, 0);
99 typedef struct IStorage16 IStorage16,*LPSTORAGE16;
100 typedef struct IStorage IStorage,*LPSTORAGE;
102 DEFINE_OLEGUID(IID_IStream, 0x0000000cL, 0, 0);
103 typedef struct IStream16 IStream16,*LPSTREAM16;
104 typedef struct IStream IStream,*LPSTREAM;
107 /*****************************************************************************
110 * See IStorage and IStream
112 #define STGM_DIRECT 0x00000000
113 #define STGM_TRANSACTED 0x00010000
114 #define STGM_SIMPLE 0x08000000
115 #define STGM_READ 0x00000000
116 #define STGM_WRITE 0x00000001
117 #define STGM_READWRITE 0x00000002
118 #define STGM_SHARE_DENY_NONE 0x00000040
119 #define STGM_SHARE_DENY_READ 0x00000030
120 #define STGM_SHARE_DENY_WRITE 0x00000020
121 #define STGM_SHARE_EXCLUSIVE 0x00000010
122 #define STGM_PRIORITY 0x00040000
123 #define STGM_DELETEONRELEASE 0x04000000
124 #define STGM_CREATE 0x00001000
125 #define STGM_CONVERT 0x00020000
126 #define STGM_FAILIFTHERE 0x00000000
127 #define STGM_NOSCRATCH 0x00100000
128 #define STGM_NOSNAPSHOT 0x00200000
130 /*****************************************************************************
135 #define STGTY_STORAGE 1
136 #define STGTY_STREAM 2
137 #define STGTY_LOCKBYTES 3
138 #define STGTY_PROPERTY 4
140 /*****************************************************************************
141 * STATFLAG enumeration
143 * See IStorage and IStream
145 #define STATFLAG_DEFAULT 0
146 #define STATFLAG_NONAME 1
148 /*****************************************************************************
149 * STREAM_SEEK enumeration
153 #define STREAM_SEEK_SET 0
154 #define STREAM_SEEK_CUR 1
155 #define STREAM_SEEK_END 2
157 /*****************************************************************************
158 * IEnumSTATSTG interface
160 #define ICOM_INTERFACE IEnumSTATSTG
161 #define IEnumSTATSTG_METHODS \
162 ICOM_METHOD3(HRESULT,Next, ULONG,celt, STATSTG*,rgelt, ULONG*,pceltFethed) \
163 ICOM_METHOD1(HRESULT,Skip, ULONG,celt) \
164 ICOM_METHOD (HRESULT,Reset) \
165 ICOM_METHOD1(HRESULT,Clone, IEnumSTATSTG**,ppenum)
166 #define IEnumSTATSTG_IMETHODS \
169 ICOM_DEFINE(IEnumSTATSTG,IUnknown)
170 #undef ICOM_INTERFACE
172 /*** IUnknown methods ***/
173 #define IEnumSTATSTG_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
174 #define IEnumSTATSTG_AddRef(p) ICOM_CALL (AddRef,p)
175 #define IEnumSTATSTG_Release(p) ICOM_CALL (Release,p)
176 /*** IEnumSTATSTG methods ***/
177 #define IEnumSTATSTG_Next(p,a,b,c) ICOM_CALL3(Next,p,a,b,c)
178 #define IEnumSTATSTG_Skip(p,a) ICOM_CALL1(Skip,p,a)
179 #define IEnumSTATSTG_Reset(p) ICOM_CALL(Reset,p)
180 #define IEnumSTATSTG_Clone(p,a) ICOM_CALL1(Clone,p,a)
183 /*****************************************************************************
184 * IFillLockBytes interface
186 #define ICOM_INTERFACE IFillLockBytes
187 #define IFillLockBytes_METHODS \
188 ICOM_METHOD3(HRESULT,FillAppend, const void*,pv, ULONG,cb, ULONG*,pcbWritten) \
189 ICOM_METHOD4(HRESULT,FillAt, ULARGE_INTEGER,ulOffset, const void*,pv, ULONG,cb, ULONG*,pcbWritten) \
190 ICOM_METHOD1(HRESULT,SetFillSize, ULARGE_INTEGER,ulSize) \
191 ICOM_METHOD1(HRESULT,Terminate, BOOL,bCanceled)
192 #define IFillLockBytes_IMETHODS \
194 IFillLockBytes_METHODS
195 ICOM_DEFINE(IFillLockBytes,IUnknown)
196 #undef ICOM_INTERFACE
198 /*** IUnknown methods ***/
199 #define IFillLockBytes_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
200 #define IFillLockBytes_AddRef(p) ICOM_CALL (AddRef,p)
201 #define IFillLockBytes_Release(p) ICOM_CALL (Release,p)
202 /*** IFillLockBytes methods ***/
203 #define IFillLockBytes_FillAppend(p,a,b,c) ICOM_CALL3(FillAppend,p,a,b,c)
204 #define IFillLockBytes_FillAt(p,a,b,c,d) ICOM_CALL4(FillAt,p,a,b,c,d)
205 #define IFillLockBytes_SetFillSize(p,a) ICOM_CALL1(SetFillSize,p,a)
206 #define IFillLockBytes_Terminate(p,a) ICOM_CALL1(Terminate,p,a)
209 /*****************************************************************************
210 * ILayoutStorage interface
212 #define ICOM_INTERFACE ILayoutStorage
213 #define ILayoutStorage_METHODS \
214 ICOM_METHOD2(HRESULT,LayoutScript, DWORD,nEntries, DWORD,glfInterleavedFlag) \
215 ICOM_METHOD (HRESULT,BeginMonitor) \
216 ICOM_METHOD (HRESULT,EndMonitor) \
217 ICOM_METHOD1(HRESULT,ReLayoutDocfile, OLECHAR16*,pwcsNewDfName) \
218 ICOM_METHOD1(HRESULT,ReLayoutDocfileOnILockBytes, ILockBytes*,pILockBytes)
219 #define ILayoutStorage_IMETHODS \
221 ILayoutStorage_METHODS
222 ICOM_DEFINE(ILayoutStorage,IUnknown)
223 #undef ICOM_INTERFACE
225 /*** IUnknown methods ***/
226 #define ILayoutStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
227 #define ILayoutStorage_AddRef(p) ICOM_CALL (AddRef,p)
228 #define ILayoutStorage_Release(p) ICOM_CALL (Release,p)
229 /*** ILayoutStorage methods ***/
230 #define ILayoutStorage_LayoutScript(p,a,b) ICOM_CALL2(LayoutScript,p,a,b)
231 #define ILayoutStorage_BeginMonitor(p) ICOM_CALL (BeginMonitor,p)
232 #define ILayoutStorage_EndMonitor(p) ICOM_CALL (EndMonitor,p)
233 #define ILayoutStorage_ReLayoutDocfile(p,a) ICOM_CALL1(ReLayoutDocfile,p,a)
234 #define ILayoutStorage_ReLayoutDocfileOnILockBytes(p,a) ICOM_CALL1(ReLayoutDocfileOnILockBytes,p,a)
237 /*****************************************************************************
238 * ILockBytes interface
240 #define ICOM_INTERFACE ILockBytes
241 #define ILockBytes_METHODS \
242 ICOM_METHOD4(HRESULT,ReadAt, ULARGE_INTEGER,ulOffset, void*,pv, ULONG,cb, ULONG*,pcbRead) \
243 ICOM_METHOD4(HRESULT,WriteAt, ULARGE_INTEGER,ulOffset, const void*,pv, ULONG,cb, ULONG*,pcbWritten) \
244 ICOM_METHOD (HRESULT,Flush) \
245 ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,cb) \
246 ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
247 ICOM_METHOD3(HRESULT,UnlockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
248 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
249 #define ILockBytes_IMETHODS \
252 ICOM_DEFINE(ILockBytes,IUnknown)
253 #undef ICOM_INTERFACE
255 /*** IUnknown methods ***/
256 #define ILockBytes_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
257 #define ILockBytes_AddRef(p) ICOM_CALL (AddRef,p)
258 #define ILockBytes_Release(p) ICOM_CALL (Release,p)
259 /*** ILockBytes methods ***/
260 #define ILockBytes_ReadAt(p,a,b,c,d) ICOM_CALL4(ReadAt,p,a,b,c,d)
261 #define ILockBytes_WriteAt(p,a,b,c,d) ICOM_CALL4(WriteAt,p,a,b,c,d)
262 #define ILockBytes_Flush(p) ICOM_CALL (Flush,p)
263 #define ILockBytes_SetSize(p,a) ICOM_CALL1(SetSize,p,a)
264 #define ILockBytes_LockRegion(p,a,b,c) ICOM_CALL3(LockRegion,p,a,b,c)
265 #define ILockBytes_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
266 #define ILockBytes_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
269 /*****************************************************************************
272 #define ICOM_INTERFACE IPersist
273 #define IPersist_METHODS \
274 ICOM_METHOD1(HRESULT,GetClassID, CLSID*,pClassID)
275 #define IPersist_IMETHODS \
278 ICOM_DEFINE(IPersist,IUnknown)
279 #undef ICOM_INTERFACE
281 /*** IUnknown methods ***/
282 #define IPersist_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
283 #define IPersist_AddRef(p) ICOM_CALL (AddRef,p)
284 #define IPersist_Release(p) ICOM_CALL (Release,p)
285 /*** IPersist methods ***/
286 #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_METHOD (HRESULT,IsDirty) \
295 ICOM_METHOD2 (HRESULT,Load, LPCOLESTR,pszFileName, DWORD,dwMode) \
296 ICOM_METHOD2 (HRESULT,Save, LPCOLESTR,pszFileName, BOOL,fRemember) \
297 ICOM_METHOD1 (HRESULT,SaveCompleted, LPCOLESTR,pszFileName) \
298 ICOM_METHOD1(HRESULT,GetCurFile, LPOLESTR*,ppszFileName)
299 #define IPersistFile_IMETHODS \
302 ICOM_DEFINE(IPersistFile,IPersist)
303 #undef ICOM_INTERFACE
305 /*** IUnknown methods ***/
306 #define IPersistFile_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
307 #define IPersistFile_AddRef(p) ICOM_CALL (AddRef,p)
308 #define IPersistFile_Release(p) ICOM_CALL (Release,p)
309 /*** IPersist methods ***/
310 #define IPersistFile_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
311 /*** IPersistFile methods ***/
312 #define IPersistFile_IsDirty(p) ICOM_CALL(IsDirty,p)
313 #define IPersistFile_Load(p,a,b) ICOM_CALL2(Load,p,a,b)
314 #define IPersistFile_Save(p,a,b) ICOM_CALL2(Save,p,a,b)
315 #define IPersistFile_SaveCompleted(p,a) ICOM_CALL1(SaveCompleted,p,a)
316 #define IPersistFile_GetCurFile(p,a) ICOM_CALL1(GetCurFile,p,a)
319 /*****************************************************************************
320 * IPersistStorage interface
322 #define ICOM_INTERFACE IPersistStorage
323 #define IPersistStorage_METHODS \
324 ICOM_METHOD (HRESULT,IsDirty) \
325 ICOM_METHOD1(HRESULT,InitNew, IStorage*,pStg) \
326 ICOM_METHOD1(HRESULT,Load, IStorage*,pStg) \
327 ICOM_METHOD2(HRESULT,Save, IStorage*,pStg, BOOL,fSameAsLoad) \
328 ICOM_METHOD1(HRESULT,SaveCompleted, IStorage*,pStgNew) \
329 ICOM_METHOD (HRESULT,HandsOffStorage)
330 #define IPersistStorage_IMETHODS \
332 IPersistStorage_METHODS
333 ICOM_DEFINE(IPersistStorage,IPersist)
334 #undef ICOM_INTERFACE
336 /*** IUnknown methods ***/
337 #define IPersistStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
338 #define IPersistStorage_AddRef(p) ICOM_CALL (AddRef,p)
339 #define IPersistStorage_Release(p) ICOM_CALL (Release,p)
340 /*** IPersist methods ***/
341 #define IPersistStorage_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
342 /*** IPersistStorage methods ***/
343 #define IPersistStorage_IsDirty(p) ICOM_CALL (IsDirty,p)
344 #define IPersistStorage_InitNew(p,a) ICOM_CALL1(InitNew,p,a)
345 #define IPersistStorage_Load(p,a) ICOM_CALL1(Load,p,a)
346 #define IPersistStorage_Save(p,a,b) ICOM_CALL2(Save,p,a,b)
347 #define IPersistStorage_SaveCompleted(p,a) ICOM_CALL1(SaveCompleted,p,a)
348 #define IPersistStorage_HandsOffStorage(p) ICOM_CALL (HandsOffStorage,p)
351 /*****************************************************************************
352 * IPersistStream interface
354 #define ICOM_INTERFACE IPersistStream
355 #define IPersistStream_METHODS \
356 ICOM_METHOD (HRESULT,IsDirty) \
357 ICOM_METHOD1(HRESULT,Load, IStream*,pStm) \
358 ICOM_METHOD2(HRESULT,Save, IStream*,pStm, BOOL,fClearDirty) \
359 ICOM_METHOD1(HRESULT,GetSizeMax, ULARGE_INTEGER*,pcbSize)
360 #define IPersistStream_IMETHODS \
362 IPersistStream_METHODS
363 ICOM_DEFINE(IPersistStream,IPersist)
364 #undef ICOM_INTERFACE
366 /*** IUnknown methods ***/
367 #define IPersistStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
368 #define IPersistStream_AddRef(p) ICOM_CALL (AddRef,p)
369 #define IPersistStream_Release(p) ICOM_CALL (Release,p)
370 /*** IPersist methods ***/
371 #define IPersistStream_GetClassID(p,a) ICOM_CALL1(GetClassID,p,a)
372 /*** IPersistStream methods ***/
373 #define IPersistStream_IsDirty(p) ICOM_CALL (IsDirty,p)
374 #define IPersistStream_Load(p,a) ICOM_CALL1(Load,p,a)
375 #define IPersistStream_Save(p,a,b) ICOM_CALL2(Save,p,a,b)
376 #define IPersistStream_GetSizeMax(p,a) ICOM_CALL1(GetSizeMax,p,a)
379 /*****************************************************************************
380 * IProgressNotify interface
382 #define ICOM_INTERFACE IProgressNotify
383 #define IProgressNotify_METHODS \
384 ICOM_METHOD4(HRESULT,OnProgress, DWORD,dwProgressCurrent, DWORD,dwProgressMaximum, BOOL,fAccurate, BOOL,fOwner)
385 #define IProgressNotify_IMETHODS \
387 IProgressNotify_METHODS
388 ICOM_DEFINE(IProgressNotify,IUnknown)
389 #undef ICOM_INTERFACE
391 /*** IUnknown methods ***/
392 #define IProgressNotify_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
393 #define IProgressNotify_AddRef(p) ICOM_CALL (AddRef,p)
394 #define IProgressNotify_Release(p) ICOM_CALL (Release,p)
395 /*** IProgressNotify methods ***/
396 #define IProgressNotify_OnProgress(p,a,b,c,d) ICOM_CALL4(OnProgress,p,a,b,c,d)
399 /*****************************************************************************
400 * IRootStorage interface
402 #define ICOM_INTERFACE IRootStorage
403 #define IRootStorage_METHODS \
404 ICOM_METHOD1(HRESULT,SwitchToFile, LPOLESTR,pszFile)
405 #define IRootStorage_IMETHODS \
408 ICOM_DEFINE(IRootStorage,IUnknown)
409 #undef ICOM_INTERFACE
411 /*** IUnknown methods ***/
412 #define IRootStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
413 #define IRootStorage_AddRef(p) ICOM_CALL (AddRef,p)
414 #define IRootStorage_Release(p) ICOM_CALL (Release,p)
415 /*** IRootStorage methods ***/
416 #define IRootStorage_SwitchToFile(p,a) ICOM_CALLSwitchToFile(,p,a)
419 /*****************************************************************************
420 * ISequentialStream interface
422 #define ICOM_INTERFACE ISequentialStream
423 #define ISequentialStream_METHODS \
424 ICOM_METHOD3(HRESULT,Read, void*,pv, ULONG,cb, ULONG*,pcbRead) \
425 ICOM_METHOD3(HRESULT,Write, const void*,pv, ULONG,cb, ULONG*,pcbWritten)
426 #define ISequentialStream_IMETHODS \
428 ISequentialStream_METHODS
429 ICOM_DEFINE(ISequentialStream,IUnknown)
430 #undef ICOM_INTERFACE
432 /*** IUnknown methods ***/
433 #define ISequentialStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
434 #define ISequentialStream_AddRef(p) ICOM_CALL (AddRef,p)
435 #define ISequentialStream_Release(p) ICOM_CALL (Release,p)
436 /*** ISequentialStream methods ***/
437 #define ISequentialStream_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
438 #define ISequentialStream_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
441 /*****************************************************************************
444 #define ICOM_INTERFACE IStorage16
445 #define IStorage16_METHODS \
446 ICOM_METHOD5(HRESULT,CreateStream, LPCOLESTR16,pwcsName, DWORD,grfMode, DWORD,reserved1, DWORD,reserved2, IStream16**,ppstm) \
447 ICOM_METHOD5(HRESULT,OpenStream, LPCOLESTR16,pwcsName, void*,reserved1, DWORD,grfMode, DWORD,reserved2, IStream16**,ppstm) \
448 ICOM_METHOD5(HRESULT,CreateStorage, LPCOLESTR16,pwcsName, DWORD,grfMode, DWORD,dwStgFmt, DWORD,reserved2, IStorage16**,ppstg) \
449 ICOM_METHOD6(HRESULT,OpenStorage, LPCOLESTR16,pwcsName, IStorage16*,pstgPriority, DWORD,grfMode, SNB16,snb16Exclude, DWORD,reserved, IStorage16**,ppstg) \
450 ICOM_METHOD4(HRESULT,CopyTo, DWORD,ciidExclude, const IID*,rgiidExclude, SNB16,snb16Exclude, IStorage16*,pstgDest) \
451 ICOM_METHOD4(HRESULT,MoveElementTo, LPCOLESTR16,pwcsName, IStorage16*,pstgDest, LPCOLESTR16,pwcsNewName, DWORD,grfFlags) \
452 ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags) \
453 ICOM_METHOD (HRESULT,Revert) \
454 ICOM_METHOD4(HRESULT,EnumElements, DWORD,reserved1, void*,reserved2, DWORD,reserved3, IEnumSTATSTG**,ppenum) \
455 ICOM_METHOD1(HRESULT,DestroyElement, LPCOLESTR16,pwcsName) \
456 ICOM_METHOD2(HRESULT,RenameElement, LPCOLESTR16,pwcsOldName, LPOLESTR16,pwcsNewName) \
457 ICOM_METHOD4(HRESULT,SetElementTimes,LPCOLESTR16,pwcsName, const FILETIME*,pctime, const FILETIME*,patime, const FILETIME*,pmtime) \
458 ICOM_METHOD1(HRESULT,SetClass, REFCLSID,clsid) \
459 ICOM_METHOD2(HRESULT,SetStateBits, DWORD,grfStateBits, DWORD,grfMask) \
460 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
461 #define IStorage16_IMETHODS \
464 ICOM_DEFINE(IStorage16,IUnknown)
465 #undef ICOM_INTERFACE
467 /*** IUnknown methods ***/
468 #define IStorage16_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
469 #define IStorage16_AddRef(p) ICOM_CALL (AddRef,p)
470 #define IStorage16_Release(p) ICOM_CALL (Release,p)
471 /*** IStorage16 methods ***/
472 #define IStorage16_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
473 #define IStorage16_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
474 #define IStorage16_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
475 #define IStorage16_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
476 #define IStorage16_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
477 #define IStorage16_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
478 #define IStorage16_Commit(p,a) ICOM_CALL1(Commit,p,a)
479 #define IStorage16_Revert(p) ICOM_CALL (Revert,p)
480 #define IStorage16_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
481 #define IStorage16_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
482 #define IStorage16_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
483 #define IStorage16_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
484 #define IStorage16_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
485 #define IStorage16_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
486 #define IStorage16_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
489 #define ICOM_INTERFACE IStorage
490 #define IStorage_METHODS \
491 ICOM_METHOD5(HRESULT,CreateStream, LPCOLESTR,pwcsName, DWORD,grfMode, DWORD,reserved1, DWORD,reserved2, IStream**,ppstm) \
492 ICOM_METHOD5(HRESULT,OpenStream, LPCOLESTR,pwcsName, void*,reserved1, DWORD,grfMode, DWORD,reserved2, IStream**,ppstm) \
493 ICOM_METHOD5(HRESULT,CreateStorage, LPCOLESTR,pwcsName, DWORD,grfMode, DWORD,dwStgFmt, DWORD,reserved2, IStorage**,ppstg) \
494 ICOM_METHOD6(HRESULT,OpenStorage, LPCOLESTR,pwcsName, IStorage*,pstgPriority, DWORD,grfMode, SNB,snb16Exclude, DWORD,reserved, IStorage**,ppstg) \
495 ICOM_METHOD4(HRESULT,CopyTo, DWORD,ciidExclude, const IID*,rgiidExclude, SNB,snb16Exclude, IStorage*,pstgDest) \
496 ICOM_METHOD4(HRESULT,MoveElementTo, LPCOLESTR,pwcsName, IStorage*,pstgDest, LPCOLESTR,pwcsNewName, DWORD,grfFlags) \
497 ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags) \
498 ICOM_METHOD (HRESULT,Revert) \
499 ICOM_METHOD4(HRESULT,EnumElements, DWORD,reserved1, void*,reserved2, DWORD,reserved3, IEnumSTATSTG**,ppenum) \
500 ICOM_METHOD1(HRESULT,DestroyElement, LPCOLESTR,pwcsName) \
501 ICOM_METHOD2(HRESULT,RenameElement, LPCOLESTR,pwcsOldName, LPCOLESTR,pwcsNewName) \
502 ICOM_METHOD4(HRESULT,SetElementTimes,LPCOLESTR,pwcsName, const FILETIME*,pctime, const FILETIME*,patime, const FILETIME*,pmtime) \
503 ICOM_METHOD1(HRESULT,SetClass, REFCLSID,clsid) \
504 ICOM_METHOD2(HRESULT,SetStateBits, DWORD,grfStateBits, DWORD,grfMask) \
505 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag)
506 #define IStorage_IMETHODS \
509 ICOM_DEFINE(IStorage,IUnknown)
510 #undef ICOM_INTERFACE
512 /*** IUnknown methods ***/
513 #define IStorage_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
514 #define IStorage_AddRef(p) ICOM_CALL (AddRef,p)
515 #define IStorage_Release(p) ICOM_CALL (Release,p)
516 /*** IStorage methods ***/
517 #define IStorage_CreateStream(p,a,b,c,d,e) ICOM_CALL5(CreateStream,p,a,b,c,d,e)
518 #define IStorage_OpenStream(p,a,b,c,d,e) ICOM_CALL5(OpenStream,p,a,b,c,d,e)
519 #define IStorage_CreateStorage(p,a,b,c,d,e) ICOM_CALL5(CreateStorage,p,a,b,c,d,e)
520 #define IStorage_OpenStorage(p,a,b,c,d,e,f) ICOM_CALL6(OpenStorage,p,a,b,c,d,e,f)
521 #define IStorage_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
522 #define IStorage_MoveElementTo(p,a,b,c,d) ICOM_CALL4(MoveElementTo,p,a,b,c,d)
523 #define IStorage_Commit(p,a) ICOM_CALL1(Commit,p,a)
524 #define IStorage_Revert(p) ICOM_CALL (Revert,p)
525 #define IStorage_EnumElements(p,a,b,c,d) ICOM_CALL4(EnumElements,p,a,b,c,d)
526 #define IStorage_DestroyElement(p,a) ICOM_CALL1(DestroyElement,p,a)
527 #define IStorage_RenameElement(p,a,b) ICOM_CALL2(RenameElement,p,a,b)
528 #define IStorage_SetElementTimes(p,a,b,c,d) ICOM_CALL4(SetElementTimes,p,a,b,c,d)
529 #define IStorage_SetClass(p,a) ICOM_CALL1(SetClass,p,a)
530 #define IStorage_SetStateBits(p,a,b) ICOM_CALL2(SetStateBits,p,a,b)
531 #define IStorage_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
534 /*****************************************************************************
537 #define ICOM_INTERFACE IStream16
538 #define IStream16_METHODS \
539 ICOM_METHOD3(HRESULT,Seek, LARGE_INTEGER,dlibMove, DWORD,dwOrigin, ULARGE_INTEGER*,plibNewPosition) \
540 ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,libNewSize) \
541 ICOM_METHOD4(HRESULT,CopyTo, IStream16*,pstm, ULARGE_INTEGER,cb, ULARGE_INTEGER*,pcbRead, ULARGE_INTEGER*,pcbWritten) \
542 ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags) \
543 ICOM_METHOD (HRESULT,Revert) \
544 ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
545 ICOM_METHOD3(HRESULT,UnlockRegion,ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
546 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag) \
547 ICOM_METHOD1(HRESULT,Clone, IStream16**,ppstm)
548 #define IStream16_IMETHODS \
549 ISequentialStream_IMETHODS \
551 ICOM_DEFINE(IStream16,ISequentialStream)
552 #undef ICOM_INTERFACE
554 /*** IUnknown methods ***/
555 #define IStream16_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
556 #define IStream16_AddRef(p) ICOM_CALL (AddRef,p)
557 #define IStream16_Release(p) ICOM_CALL (Release,p)
558 /*** ISequentialStream methods ***/
559 #define IStream16_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
560 #define IStream16_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
561 /*** IStream16 methods ***/
562 #define IStream16_Seek(p) ICOM_CALL3(Seek,p)
563 #define IStream16_SetSize(p,a,b) ICOM_CALL1(SetSize,p,a,b)
564 #define IStream16_CopyTo(pa,b,c,d) ICOM_CALL4(CopyTo,pa,b,c,d)
565 #define IStream16_Commit(p,a) ICOM_CALL1(Commit,p,a)
566 #define IStream16_Revert(p) ICOM_CALL (Revert,p)
567 #define IStream16_LockRegion(pa,b,c) ICOM_CALL3(LockRegion,pa,b,c)
568 #define IStream16_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
569 #define IStream16_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
570 #define IStream16_Clone(p,a) ICOM_CALL1(Clone,p,a)
573 #define ICOM_INTERFACE IStream
574 #define IStream_METHODS \
575 ICOM_METHOD3(HRESULT,Seek, LARGE_INTEGER,dlibMove, DWORD,dwOrigin, ULARGE_INTEGER*,plibNewPosition) \
576 ICOM_METHOD1(HRESULT,SetSize, ULARGE_INTEGER,libNewSize) \
577 ICOM_METHOD4(HRESULT,CopyTo, IStream*,pstm, ULARGE_INTEGER,cb, ULARGE_INTEGER*,pcbRead, ULARGE_INTEGER*,pcbWritten) \
578 ICOM_METHOD1(HRESULT,Commit, DWORD,grfCommitFlags) \
579 ICOM_METHOD (HRESULT,Revert) \
580 ICOM_METHOD3(HRESULT,LockRegion, ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
581 ICOM_METHOD3(HRESULT,UnlockRegion,ULARGE_INTEGER,libOffset, ULARGE_INTEGER,cb, DWORD,dwLockType) \
582 ICOM_METHOD2(HRESULT,Stat, STATSTG*,pstatstg, DWORD,grfStatFlag) \
583 ICOM_METHOD1(HRESULT,Clone, IStream**,ppstm)
584 #define IStream_IMETHODS \
585 ISequentialStream_IMETHODS \
587 ICOM_DEFINE(IStream,ISequentialStream)
588 #undef ICOM_INTERFACE
590 /*** IUnknown methods ***/
591 #define IStream_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
592 #define IStream_AddRef(p) ICOM_CALL (AddRef,p)
593 #define IStream_Release(p) ICOM_CALL (Release,p)
594 /*** ISequentialStream methods ***/
595 #define IStream_Read(p,a,b,c) ICOM_CALL3(Read,p,a,b,c)
596 #define IStream_Write(p,a,b,c) ICOM_CALL3(Write,p,a,b,c)
597 /*** IStream methods ***/
598 #define IStream_Seek(p,a,b,c) ICOM_CALL3(Seek,p,a,b,c)
599 #define IStream_SetSize(p,a) ICOM_CALL1(SetSize,p,a)
600 #define IStream_CopyTo(p,a,b,c,d) ICOM_CALL4(CopyTo,p,a,b,c,d)
601 #define IStream_Commit(p,a) ICOM_CALL1(Commit,p,a)
602 #define IStream_Revert(p) ICOM_CALL (Revert,p)
603 #define IStream_LockRegion(p,a,b,c) ICOM_CALL3(LockRegion,p,a,b,c)
604 #define IStream_UnlockRegion(p,a,b,c) ICOM_CALL3(UnlockRegion,p,a,b,c)
605 #define IStream_Stat(p,a,b) ICOM_CALL2(Stat,p,a,b)
606 #define IStream_Clone(p,a) ICOM_CALL1(Clone,p,a)
609 /*****************************************************************************
612 /* FIXME: many functions are missing */
613 HRESULT WINAPI StgCreateDocFile16(LPCOLESTR16 pwcsName,DWORD grfMode,DWORD reserved,IStorage16 **ppstgOpen);
614 HRESULT WINAPI StgCreateDocfile(LPCOLESTR pwcsName,DWORD grfMode,DWORD reserved,IStorage **ppstgOpen);
616 HRESULT WINAPI StgIsStorageFile16(LPCOLESTR16 fn);
617 HRESULT WINAPI StgIsStorageFile(LPCOLESTR fn);
618 HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt);
620 HRESULT WINAPI StgOpenStorage16(const OLECHAR16* pwcsName,IStorage16* pstgPriority,DWORD grfMode,SNB16 snbExclude,DWORD reserved,IStorage16**ppstgOpen);
621 HRESULT WINAPI StgOpenStorage(const OLECHAR* pwcsName,IStorage* pstgPriority,DWORD grfMode,SNB snbExclude,DWORD reserved,IStorage**ppstgOpen);
623 HRESULT WINAPI WriteClassStg(IStorage* pStg, REFCLSID rclsid);
624 HRESULT WINAPI ReadClassStg(IStorage *pstg,CLSID *pclsid);
626 HRESULT WINAPI StgCreateDocfileOnILockBytes(ILockBytes *plkbyt,DWORD grfMode, DWORD reserved, IStorage** ppstgOpen);
627 HRESULT WINAPI StgOpenStorageOnILockBytes(ILockBytes *plkbyt, IStorage *pstgPriority, DWORD grfMode, SNB snbExclude, DWORD reserved, IStorage **ppstgOpen);
629 /*****************************************************************************
633 /* FIXME: not implemented */
634 BOOL WINAPI CoDosDateTimeToFileTime(WORD nDosDate, WORD nDosTime, FILETIME* lpFileTime);
636 /* FIXME: not implemented */
637 BOOL WINAPI CoFileTimeToDosDateTime(FILETIME* lpFileTime, WORD* lpDosDate, WORD* lpDosTime);
641 #endif /* defined(__cplusplus) */
643 #endif /* __WINE_WINE_OBJ_STORAGE_H */