0313e9794c20afed620870962e885c32172689bd
[reactos.git] / reactos / dll / win32 / ole32 / storage32.h
1 /*
2 * Compound Storage (32 bit version)
3 *
4 * Implemented using the documentation of the LAOLA project at
5 * <URL:http://wwwwbs.cs.tu-berlin.de/~schwartz/pmh/index.html>
6 * (Thanks to Martin Schwartz <schwartz@cs.tu-berlin.de>)
7 *
8 * This include file contains definitions of types and function
9 * prototypes that are used in the many files implementing the
10 * storage functionality
11 *
12 * Copyright 1998,1999 Francis Beaudet
13 * Copyright 1998,1999 Thuy Nguyen
14 * Copyright 2010 Vincent Povirk for CodeWeavers
15 *
16 * This library is free software; you can redistribute it and/or
17 * modify it under the terms of the GNU Lesser General Public
18 * License as published by the Free Software Foundation; either
19 * version 2.1 of the License, or (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
24 * Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public
27 * License along with this library; if not, write to the Free Software
28 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
29 */
30 #ifndef __STORAGE32_H__
31 #define __STORAGE32_H__
32
33 /*
34 * Definitions for the file format offsets.
35 */
36 static const ULONG OFFSET_MINORVERSION = 0x00000018;
37 static const ULONG OFFSET_MAJORVERSION = 0x0000001a;
38 static const ULONG OFFSET_BYTEORDERMARKER = 0x0000001c;
39 static const ULONG OFFSET_BIGBLOCKSIZEBITS = 0x0000001e;
40 static const ULONG OFFSET_SMALLBLOCKSIZEBITS = 0x00000020;
41 static const ULONG OFFSET_DIRSECTORCOUNT = 0x00000028;
42 static const ULONG OFFSET_BBDEPOTCOUNT = 0x0000002C;
43 static const ULONG OFFSET_ROOTSTARTBLOCK = 0x00000030;
44 static const ULONG OFFSET_SMALLBLOCKLIMIT = 0x00000038;
45 static const ULONG OFFSET_SBDEPOTSTART = 0x0000003C;
46 static const ULONG OFFSET_SBDEPOTCOUNT = 0x00000040;
47 static const ULONG OFFSET_EXTBBDEPOTSTART = 0x00000044;
48 static const ULONG OFFSET_EXTBBDEPOTCOUNT = 0x00000048;
49 static const ULONG OFFSET_BBDEPOTSTART = 0x0000004C;
50 static const ULONG OFFSET_PS_NAME = 0x00000000;
51 static const ULONG OFFSET_PS_NAMELENGTH = 0x00000040;
52 static const ULONG OFFSET_PS_STGTYPE = 0x00000042;
53 static const ULONG OFFSET_PS_LEFTCHILD = 0x00000044;
54 static const ULONG OFFSET_PS_RIGHTCHILD = 0x00000048;
55 static const ULONG OFFSET_PS_DIRROOT = 0x0000004C;
56 static const ULONG OFFSET_PS_GUID = 0x00000050;
57 static const ULONG OFFSET_PS_CTIMELOW = 0x00000064;
58 static const ULONG OFFSET_PS_CTIMEHIGH = 0x00000068;
59 static const ULONG OFFSET_PS_MTIMELOW = 0x0000006C;
60 static const ULONG OFFSET_PS_MTIMEHIGH = 0x00000070;
61 static const ULONG OFFSET_PS_STARTBLOCK = 0x00000074;
62 static const ULONG OFFSET_PS_SIZE = 0x00000078;
63 static const WORD DEF_BIG_BLOCK_SIZE_BITS = 0x0009;
64 static const WORD MIN_BIG_BLOCK_SIZE_BITS = 0x0009;
65 static const WORD MAX_BIG_BLOCK_SIZE_BITS = 0x000c;
66 static const WORD DEF_SMALL_BLOCK_SIZE_BITS = 0x0006;
67 static const WORD DEF_BIG_BLOCK_SIZE = 0x0200;
68 static const WORD DEF_SMALL_BLOCK_SIZE = 0x0040;
69 static const ULONG BLOCK_EXTBBDEPOT = 0xFFFFFFFC;
70 static const ULONG BLOCK_SPECIAL = 0xFFFFFFFD;
71 static const ULONG BLOCK_END_OF_CHAIN = 0xFFFFFFFE;
72 static const ULONG BLOCK_UNUSED = 0xFFFFFFFF;
73 static const ULONG DIRENTRY_NULL = 0xFFFFFFFF;
74
75 #define DIRENTRY_NAME_MAX_LEN 0x20
76 #define DIRENTRY_NAME_BUFFER_LEN 0x40
77
78 #define RAW_DIRENTRY_SIZE 0x00000080
79
80 #define HEADER_SIZE 512
81
82 #define MIN_BIG_BLOCK_SIZE 0x200
83 #define MAX_BIG_BLOCK_SIZE 0x1000
84
85 /*
86 * Type of child entry link
87 */
88 #define DIRENTRY_RELATION_PREVIOUS 0
89 #define DIRENTRY_RELATION_NEXT 1
90 #define DIRENTRY_RELATION_DIR 2
91
92 /*
93 * type constant used in files for the root storage
94 */
95 #define STGTY_ROOT 0x05
96
97 #define COUNT_BBDEPOTINHEADER 109
98
99 /* FIXME: This value is stored in the header, but we hard-code it to 0x1000. */
100 #define LIMIT_TO_USE_SMALL_BLOCK 0x1000
101
102 #define STGM_ACCESS_MODE(stgm) ((stgm)&0x0000f)
103 #define STGM_SHARE_MODE(stgm) ((stgm)&0x000f0)
104 #define STGM_CREATE_MODE(stgm) ((stgm)&0x0f000)
105
106 #define STGM_KNOWN_FLAGS (0xf0ff | \
107 STGM_TRANSACTED | STGM_CONVERT | STGM_PRIORITY | STGM_NOSCRATCH | \
108 STGM_NOSNAPSHOT | STGM_DIRECT_SWMR | STGM_DELETEONRELEASE | STGM_SIMPLE)
109
110 /*
111 * Forward declarations of all the structures used by the storage
112 * module.
113 */
114 typedef struct StorageBaseImpl StorageBaseImpl;
115 typedef struct StorageBaseImplVtbl StorageBaseImplVtbl;
116 typedef struct StorageImpl StorageImpl;
117 typedef struct BlockChainStream BlockChainStream;
118 typedef struct SmallBlockChainStream SmallBlockChainStream;
119 typedef struct IEnumSTATSTGImpl IEnumSTATSTGImpl;
120 typedef struct DirEntry DirEntry;
121 typedef struct StgStreamImpl StgStreamImpl;
122
123 /*
124 * A reference to a directory entry in the file or a transacted cache.
125 */
126 typedef ULONG DirRef;
127
128 /*
129 * This utility structure is used to read/write the information in a directory
130 * entry.
131 */
132 struct DirEntry
133 {
134 WCHAR name[DIRENTRY_NAME_MAX_LEN];
135 WORD sizeOfNameString;
136 BYTE stgType;
137 DirRef leftChild;
138 DirRef rightChild;
139 DirRef dirRootEntry;
140 GUID clsid;
141 FILETIME ctime;
142 FILETIME mtime;
143 ULONG startingBlock;
144 ULARGE_INTEGER size;
145 };
146
147 HRESULT FileLockBytesImpl_Construct(HANDLE hFile, DWORD openFlags, LPCWSTR pwcsName, ILockBytes **pLockBytes) DECLSPEC_HIDDEN;
148
149 /*************************************************************************
150 * Ole Convert support
151 */
152
153 HRESULT STORAGE_CreateOleStream(IStorage*, DWORD) DECLSPEC_HIDDEN;
154 HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName) DECLSPEC_HIDDEN;
155
156 enum swmr_mode
157 {
158 SWMR_None,
159 SWMR_Writer,
160 SWMR_Reader
161 };
162
163 /****************************************************************************
164 * StorageBaseImpl definitions.
165 *
166 * This structure defines the base information contained in all implementations
167 * of IStorage contained in this file storage implementation.
168 *
169 * In OOP terms, this is the base class for all the IStorage implementations
170 * contained in this file.
171 */
172 struct StorageBaseImpl
173 {
174 IStorage IStorage_iface;
175 IPropertySetStorage IPropertySetStorage_iface; /* interface for adding a properties stream */
176 IDirectWriterLock IDirectWriterLock_iface;
177 LONG ref;
178
179 /*
180 * Stream tracking list
181 */
182
183 struct list strmHead;
184
185 /*
186 * Storage tracking list
187 */
188 struct list storageHead;
189
190 /*
191 * TRUE if this object has been invalidated
192 */
193 int reverted;
194
195 /*
196 * Index of the directory entry of this storage
197 */
198 DirRef storageDirEntry;
199
200 /*
201 * virtual methods.
202 */
203 const StorageBaseImplVtbl *baseVtbl;
204
205 /*
206 * flags that this storage was opened or created with
207 */
208 DWORD openFlags;
209
210 /*
211 * State bits appear to only be preserved while running. No in the stream
212 */
213 DWORD stateBits;
214
215 BOOL create; /* Was the storage created or opened.
216 The behaviour of STGM_SIMPLE depends on this */
217 /*
218 * If this storage was opened in transacted mode, the object that implements
219 * the transacted snapshot or cache.
220 */
221 StorageBaseImpl *transactedChild;
222 enum swmr_mode lockingrole;
223 };
224
225 /* virtual methods for StorageBaseImpl objects */
226 struct StorageBaseImplVtbl {
227 void (*Destroy)(StorageBaseImpl*);
228 void (*Invalidate)(StorageBaseImpl*);
229 HRESULT (*Flush)(StorageBaseImpl*);
230 HRESULT (*GetFilename)(StorageBaseImpl*,LPWSTR*);
231 HRESULT (*CreateDirEntry)(StorageBaseImpl*,const DirEntry*,DirRef*);
232 HRESULT (*WriteDirEntry)(StorageBaseImpl*,DirRef,const DirEntry*);
233 HRESULT (*ReadDirEntry)(StorageBaseImpl*,DirRef,DirEntry*);
234 HRESULT (*DestroyDirEntry)(StorageBaseImpl*,DirRef);
235 HRESULT (*StreamReadAt)(StorageBaseImpl*,DirRef,ULARGE_INTEGER,ULONG,void*,ULONG*);
236 HRESULT (*StreamWriteAt)(StorageBaseImpl*,DirRef,ULARGE_INTEGER,ULONG,const void*,ULONG*);
237 HRESULT (*StreamSetSize)(StorageBaseImpl*,DirRef,ULARGE_INTEGER);
238 HRESULT (*StreamLink)(StorageBaseImpl*,DirRef,DirRef);
239 };
240
241 static inline void StorageBaseImpl_Destroy(StorageBaseImpl *This)
242 {
243 This->baseVtbl->Destroy(This);
244 }
245
246 static inline void StorageBaseImpl_Invalidate(StorageBaseImpl *This)
247 {
248 This->baseVtbl->Invalidate(This);
249 }
250
251 static inline HRESULT StorageBaseImpl_Flush(StorageBaseImpl *This)
252 {
253 return This->baseVtbl->Flush(This);
254 }
255
256 static inline HRESULT StorageBaseImpl_GetFilename(StorageBaseImpl *This, LPWSTR *result)
257 {
258 return This->baseVtbl->GetFilename(This, result);
259 }
260
261 static inline HRESULT StorageBaseImpl_CreateDirEntry(StorageBaseImpl *This,
262 const DirEntry *newData, DirRef *index)
263 {
264 return This->baseVtbl->CreateDirEntry(This, newData, index);
265 }
266
267 static inline HRESULT StorageBaseImpl_WriteDirEntry(StorageBaseImpl *This,
268 DirRef index, const DirEntry *data)
269 {
270 return This->baseVtbl->WriteDirEntry(This, index, data);
271 }
272
273 static inline HRESULT StorageBaseImpl_ReadDirEntry(StorageBaseImpl *This,
274 DirRef index, DirEntry *data)
275 {
276 return This->baseVtbl->ReadDirEntry(This, index, data);
277 }
278
279 static inline HRESULT StorageBaseImpl_DestroyDirEntry(StorageBaseImpl *This,
280 DirRef index)
281 {
282 return This->baseVtbl->DestroyDirEntry(This, index);
283 }
284
285 /* Read up to size bytes from this directory entry's stream at the given offset. */
286 static inline HRESULT StorageBaseImpl_StreamReadAt(StorageBaseImpl *This,
287 DirRef index, ULARGE_INTEGER offset, ULONG size, void *buffer, ULONG *bytesRead)
288 {
289 return This->baseVtbl->StreamReadAt(This, index, offset, size, buffer, bytesRead);
290 }
291
292 /* Write size bytes to this directory entry's stream at the given offset,
293 * growing the stream if necessary. */
294 static inline HRESULT StorageBaseImpl_StreamWriteAt(StorageBaseImpl *This,
295 DirRef index, ULARGE_INTEGER offset, ULONG size, const void *buffer, ULONG *bytesWritten)
296 {
297 return This->baseVtbl->StreamWriteAt(This, index, offset, size, buffer, bytesWritten);
298 }
299
300 static inline HRESULT StorageBaseImpl_StreamSetSize(StorageBaseImpl *This,
301 DirRef index, ULARGE_INTEGER newsize)
302 {
303 return This->baseVtbl->StreamSetSize(This, index, newsize);
304 }
305
306 /* Make dst point to the same stream that src points to. Other stream operations
307 * will not work properly for entries that point to the same stream, so this
308 * must be a very temporary state, and only one entry pointing to a given stream
309 * may be reachable at any given time. */
310 static inline HRESULT StorageBaseImpl_StreamLink(StorageBaseImpl *This,
311 DirRef dst, DirRef src)
312 {
313 return This->baseVtbl->StreamLink(This, dst, src);
314 }
315
316 /****************************************************************************
317 * StorageBaseImpl stream list handlers
318 */
319
320 void StorageBaseImpl_AddStream(StorageBaseImpl * stg, StgStreamImpl * strm) DECLSPEC_HIDDEN;
321 void StorageBaseImpl_RemoveStream(StorageBaseImpl * stg, StgStreamImpl * strm) DECLSPEC_HIDDEN;
322
323 /* Number of BlockChainStream objects to cache in a StorageImpl */
324 #define BLOCKCHAIN_CACHE_SIZE 4
325
326 /****************************************************************************
327 * Storage32Impl definitions.
328 *
329 * This implementation of the IStorage32 interface represents a root
330 * storage. Basically, a document file.
331 */
332 struct StorageImpl
333 {
334 struct StorageBaseImpl base;
335
336 /*
337 * File header
338 */
339 WORD bigBlockSizeBits;
340 WORD smallBlockSizeBits;
341 ULONG bigBlockSize;
342 ULONG smallBlockSize;
343 ULONG bigBlockDepotCount;
344 ULONG rootStartBlock;
345 ULONG smallBlockLimit;
346 ULONG smallBlockDepotStart;
347 ULONG extBigBlockDepotStart;
348 ULONG *extBigBlockDepotLocations;
349 ULONG extBigBlockDepotLocationsSize;
350 ULONG extBigBlockDepotCount;
351 ULONG bigBlockDepotStart[COUNT_BBDEPOTINHEADER];
352
353 ULONG extBlockDepotCached[MAX_BIG_BLOCK_SIZE / 4];
354 ULONG indexExtBlockDepotCached;
355
356 ULONG blockDepotCached[MAX_BIG_BLOCK_SIZE / 4];
357 ULONG indexBlockDepotCached;
358 ULONG prevFreeBlock;
359
360 /* All small blocks before this one are known to be in use. */
361 ULONG firstFreeSmallBlock;
362
363 /*
364 * Abstraction of the big block chains for the chains of the header.
365 */
366 BlockChainStream* rootBlockChain;
367 BlockChainStream* smallBlockDepotChain;
368 BlockChainStream* smallBlockRootChain;
369
370 /* Cache of block chain streams objects for directory entries */
371 BlockChainStream* blockChainCache[BLOCKCHAIN_CACHE_SIZE];
372 UINT blockChainToEvict;
373
374 ILockBytes* lockBytes;
375 };
376
377 HRESULT StorageImpl_ReadRawDirEntry(
378 StorageImpl *This,
379 ULONG index,
380 BYTE *buffer) DECLSPEC_HIDDEN;
381
382 void UpdateRawDirEntry(
383 BYTE *buffer,
384 const DirEntry *newData) DECLSPEC_HIDDEN;
385
386 HRESULT StorageImpl_WriteRawDirEntry(
387 StorageImpl *This,
388 ULONG index,
389 const BYTE *buffer) DECLSPEC_HIDDEN;
390
391 HRESULT StorageImpl_ReadDirEntry(
392 StorageImpl* This,
393 DirRef index,
394 DirEntry* buffer) DECLSPEC_HIDDEN;
395
396 HRESULT StorageImpl_WriteDirEntry(
397 StorageImpl* This,
398 DirRef index,
399 const DirEntry* buffer) DECLSPEC_HIDDEN;
400
401 BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
402 StorageImpl* This,
403 SmallBlockChainStream** ppsbChain) DECLSPEC_HIDDEN;
404
405 SmallBlockChainStream* Storage32Impl_BigBlocksToSmallBlocks(
406 StorageImpl* This,
407 BlockChainStream** ppbbChain,
408 ULARGE_INTEGER newSize) DECLSPEC_HIDDEN;
409
410 /****************************************************************************
411 * StgStreamImpl definitions.
412 *
413 * This class implements the IStream interface and represents a stream
414 * located inside a storage object.
415 */
416 struct StgStreamImpl
417 {
418 IStream IStream_iface;
419 LONG ref;
420
421 /*
422 * We are an entry in the storage object's stream handler list
423 */
424 struct list StrmListEntry;
425
426 /*
427 * Storage that is the parent(owner) of the stream
428 */
429 StorageBaseImpl* parentStorage;
430
431 /*
432 * Access mode of this stream.
433 */
434 DWORD grfMode;
435
436 /*
437 * Index of the directory entry that owns (points to) this stream.
438 */
439 DirRef dirEntry;
440
441 /*
442 * This is the current position of the cursor in the stream
443 */
444 ULARGE_INTEGER currentPosition;
445 };
446
447 static inline StgStreamImpl *impl_from_IStream( IStream *iface )
448 {
449 return CONTAINING_RECORD(iface, StgStreamImpl, IStream_iface);
450 }
451
452 /*
453 * Method definition for the StgStreamImpl class.
454 */
455 StgStreamImpl* StgStreamImpl_Construct(
456 StorageBaseImpl* parentStorage,
457 DWORD grfMode,
458 DirRef dirEntry) DECLSPEC_HIDDEN;
459
460
461 /******************************************************************************
462 * Endian conversion macros
463 */
464 #ifdef WORDS_BIGENDIAN
465
466 #define htole32(x) RtlUlongByteSwap(x)
467 #define htole16(x) RtlUshortByteSwap(x)
468 #define lendian32toh(x) RtlUlongByteSwap(x)
469 #define lendian16toh(x) RtlUshortByteSwap(x)
470
471 #else
472
473 #define htole32(x) (x)
474 #define htole16(x) (x)
475 #define lendian32toh(x) (x)
476 #define lendian16toh(x) (x)
477
478 #endif
479
480 /******************************************************************************
481 * The StorageUtl_ functions are miscellaneous utility functions. Most of which
482 * are abstractions used to read values from file buffers without having to
483 * worry about bit order
484 */
485 void StorageUtl_ReadWord(const BYTE* buffer, ULONG offset, WORD* value) DECLSPEC_HIDDEN;
486 void StorageUtl_WriteWord(BYTE* buffer, ULONG offset, WORD value) DECLSPEC_HIDDEN;
487 void StorageUtl_ReadDWord(const BYTE* buffer, ULONG offset, DWORD* value) DECLSPEC_HIDDEN;
488 void StorageUtl_WriteDWord(BYTE* buffer, ULONG offset, DWORD value) DECLSPEC_HIDDEN;
489 void StorageUtl_ReadULargeInteger(const BYTE* buffer, ULONG offset,
490 ULARGE_INTEGER* value) DECLSPEC_HIDDEN;
491 void StorageUtl_WriteULargeInteger(BYTE* buffer, ULONG offset,
492 const ULARGE_INTEGER *value) DECLSPEC_HIDDEN;
493 void StorageUtl_ReadGUID(const BYTE* buffer, ULONG offset, GUID* value) DECLSPEC_HIDDEN;
494 void StorageUtl_WriteGUID(BYTE* buffer, ULONG offset, const GUID* value) DECLSPEC_HIDDEN;
495 void StorageUtl_CopyDirEntryToSTATSTG(StorageBaseImpl *storage,STATSTG* destination,
496 const DirEntry* source, int statFlags) DECLSPEC_HIDDEN;
497
498 /****************************************************************************
499 * BlockChainStream definitions.
500 *
501 * The BlockChainStream class is a utility class that is used to create an
502 * abstraction of the big block chains in the storage file.
503 */
504 struct BlockChainRun
505 {
506 /* This represents a range of blocks that happen reside in consecutive sectors. */
507 ULONG firstSector;
508 ULONG firstOffset;
509 ULONG lastOffset;
510 };
511
512 typedef struct BlockChainBlock
513 {
514 ULONG index;
515 ULONG sector;
516 int read;
517 int dirty;
518 BYTE data[MAX_BIG_BLOCK_SIZE];
519 } BlockChainBlock;
520
521 struct BlockChainStream
522 {
523 StorageImpl* parentStorage;
524 ULONG* headOfStreamPlaceHolder;
525 DirRef ownerDirEntry;
526 struct BlockChainRun* indexCache;
527 ULONG indexCacheLen;
528 ULONG indexCacheSize;
529 BlockChainBlock cachedBlocks[2];
530 ULONG blockToEvict;
531 ULONG tailIndex;
532 ULONG numBlocks;
533 };
534
535 /*
536 * Methods for the BlockChainStream class.
537 */
538 BlockChainStream* BlockChainStream_Construct(
539 StorageImpl* parentStorage,
540 ULONG* headOfStreamPlaceHolder,
541 DirRef dirEntry) DECLSPEC_HIDDEN;
542
543 void BlockChainStream_Destroy(
544 BlockChainStream* This) DECLSPEC_HIDDEN;
545
546 HRESULT BlockChainStream_ReadAt(
547 BlockChainStream* This,
548 ULARGE_INTEGER offset,
549 ULONG size,
550 void* buffer,
551 ULONG* bytesRead) DECLSPEC_HIDDEN;
552
553 HRESULT BlockChainStream_WriteAt(
554 BlockChainStream* This,
555 ULARGE_INTEGER offset,
556 ULONG size,
557 const void* buffer,
558 ULONG* bytesWritten) DECLSPEC_HIDDEN;
559
560 BOOL BlockChainStream_SetSize(
561 BlockChainStream* This,
562 ULARGE_INTEGER newSize) DECLSPEC_HIDDEN;
563
564 HRESULT BlockChainStream_Flush(
565 BlockChainStream* This) DECLSPEC_HIDDEN;
566
567 /****************************************************************************
568 * SmallBlockChainStream definitions.
569 *
570 * The SmallBlockChainStream class is a utility class that is used to create an
571 * abstraction of the small block chains in the storage file.
572 */
573 struct SmallBlockChainStream
574 {
575 StorageImpl* parentStorage;
576 DirRef ownerDirEntry;
577 ULONG* headOfStreamPlaceHolder;
578 };
579
580 /*
581 * Methods of the SmallBlockChainStream class.
582 */
583 SmallBlockChainStream* SmallBlockChainStream_Construct(
584 StorageImpl* parentStorage,
585 ULONG* headOfStreamPlaceHolder,
586 DirRef dirEntry) DECLSPEC_HIDDEN;
587
588 void SmallBlockChainStream_Destroy(
589 SmallBlockChainStream* This) DECLSPEC_HIDDEN;
590
591 HRESULT SmallBlockChainStream_ReadAt(
592 SmallBlockChainStream* This,
593 ULARGE_INTEGER offset,
594 ULONG size,
595 void* buffer,
596 ULONG* bytesRead) DECLSPEC_HIDDEN;
597
598 HRESULT SmallBlockChainStream_WriteAt(
599 SmallBlockChainStream* This,
600 ULARGE_INTEGER offset,
601 ULONG size,
602 const void* buffer,
603 ULONG* bytesWritten) DECLSPEC_HIDDEN;
604
605 BOOL SmallBlockChainStream_SetSize(
606 SmallBlockChainStream* This,
607 ULARGE_INTEGER newSize) DECLSPEC_HIDDEN;
608
609
610 #endif /* __STORAGE32_H__ */