2 * Compound Storage (32 bit version)
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>)
8 * This include file contains definitions of types and function
9 * prototypes that are used in the many files implementing the
10 * storage functionality
12 * Copyright 1998,1999 Francis Beaudet
13 * Copyright 1998,1999 Thuy Nguyen
15 #ifndef __STORAGE32_H__
16 #define __STORAGE32_H__
19 * Definitions for the file format offsets.
21 static const ULONG OFFSET_BIGBLOCKSIZEBITS
= 0x0000001e;
22 static const ULONG OFFSET_SMALLBLOCKSIZEBITS
= 0x00000020;
23 static const ULONG OFFSET_BBDEPOTCOUNT
= 0x0000002C;
24 static const ULONG OFFSET_ROOTSTARTBLOCK
= 0x00000030;
25 static const ULONG OFFSET_SBDEPOTSTART
= 0x0000003C;
26 static const ULONG OFFSET_EXTBBDEPOTSTART
= 0x00000044;
27 static const ULONG OFFSET_EXTBBDEPOTCOUNT
= 0x00000048;
28 static const ULONG OFFSET_BBDEPOTSTART
= 0x0000004C;
29 static const ULONG OFFSET_PS_NAME
= 0x00000000;
30 static const ULONG OFFSET_PS_NAMELENGTH
= 0x00000040;
31 static const ULONG OFFSET_PS_PROPERTYTYPE
= 0x00000042;
32 static const ULONG OFFSET_PS_PREVIOUSPROP
= 0x00000044;
33 static const ULONG OFFSET_PS_NEXTPROP
= 0x00000048;
34 static const ULONG OFFSET_PS_DIRPROP
= 0x0000004C;
35 static const ULONG OFFSET_PS_GUID
= 0x00000050;
36 static const ULONG OFFSET_PS_TSS1
= 0x00000064;
37 static const ULONG OFFSET_PS_TSD1
= 0x00000068;
38 static const ULONG OFFSET_PS_TSS2
= 0x0000006C;
39 static const ULONG OFFSET_PS_TSD2
= 0x00000070;
40 static const ULONG OFFSET_PS_STARTBLOCK
= 0x00000074;
41 static const ULONG OFFSET_PS_SIZE
= 0x00000078;
42 static const WORD DEF_BIG_BLOCK_SIZE_BITS
= 0x0009;
43 static const WORD DEF_SMALL_BLOCK_SIZE_BITS
= 0x0006;
44 static const WORD DEF_BIG_BLOCK_SIZE
= 0x0200;
45 static const WORD DEF_SMALL_BLOCK_SIZE
= 0x0040;
46 static const ULONG BLOCK_EXTBBDEPOT
= 0xFFFFFFFC;
47 static const ULONG BLOCK_SPECIAL
= 0xFFFFFFFD;
48 static const ULONG BLOCK_END_OF_CHAIN
= 0xFFFFFFFE;
49 static const ULONG BLOCK_UNUSED
= 0xFFFFFFFF;
50 static const ULONG PROPERTY_NULL
= 0xFFFFFFFF;
52 #define PROPERTY_NAME_MAX_LEN 0x20
53 #define PROPERTY_NAME_BUFFER_LEN 0x40
55 #define PROPSET_BLOCK_SIZE 0x00000080
58 * Property type of relation
60 #define PROPERTY_RELATION_PREVIOUS 0
61 #define PROPERTY_RELATION_NEXT 1
62 #define PROPERTY_RELATION_DIR 2
65 * Property type constants
67 #define PROPTYPE_STORAGE 0x01
68 #define PROPTYPE_STREAM 0x02
69 #define PROPTYPE_ROOT 0x05
72 * These defines assume a hardcoded blocksize. The code will assert
73 * if the blocksize is different. Some changes will have to be done if it
76 #define BIG_BLOCK_SIZE 0x200
77 #define COUNT_BBDEPOTINHEADER 109
78 #define LIMIT_TO_USE_SMALL_BLOCK 0x1000
79 #define NUM_BLOCKS_PER_DEPOT_BLOCK 128
82 * These are signatures to detect the type of Document file.
84 static const BYTE STORAGE_magic
[8] ={0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1};
85 static const BYTE STORAGE_oldmagic
[8] ={0xd0,0xcf,0x11,0xe0,0x0e,0x11,0xfc,0x0d};
88 * Forward declarations of all the structures used by the storage
91 typedef struct StorageBaseImpl StorageBaseImpl
;
92 typedef struct StorageImpl StorageImpl
;
93 typedef struct StorageInternalImpl StorageInternalImpl
;
94 typedef struct BlockChainStream BlockChainStream
;
95 typedef struct SmallBlockChainStream SmallBlockChainStream
;
96 typedef struct IEnumSTATSTGImpl IEnumSTATSTGImpl
;
97 typedef struct StgProperty StgProperty
;
98 typedef struct StgStreamImpl StgStreamImpl
;
101 * This utility structure is used to read/write the information in a storage
106 WCHAR name
[PROPERTY_NAME_MAX_LEN
];
107 WORD sizeOfNameString
;
109 ULONG previousProperty
;
112 GUID propertyUniqueID
;
121 /*************************************************************************
122 * Big Block File support
124 * The big block file is an abstraction of a flat file separated in
125 * same sized blocks. The implementation for the methods described in
126 * this section appear in stg_bigblockfile.c
130 * Declaration of the data structures
132 typedef struct BigBlockFile BigBlockFile
,*LPBIGBLOCKFILE
;
133 typedef struct MappedPage MappedPage
,*LPMAPPEDPAGE
;
134 typedef struct BigBlock BigBlock
,*LPBIGBLOCK
;
139 ULARGE_INTEGER filesize
;
144 MappedPage
*maplisthead
;
152 * Declaration of the functions used to manipulate the BigBlockFile
155 BigBlockFile
* BIGBLOCKFILE_Construct(HANDLE hFile
,
160 void BIGBLOCKFILE_Destructor(LPBIGBLOCKFILE This
);
161 void* BIGBLOCKFILE_GetBigBlock(LPBIGBLOCKFILE This
, ULONG index
);
162 void* BIGBLOCKFILE_GetROBigBlock(LPBIGBLOCKFILE This
, ULONG index
);
163 void BIGBLOCKFILE_ReleaseBigBlock(LPBIGBLOCKFILE This
, void *pBlock
);
164 void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This
, ULARGE_INTEGER newSize
);
165 ULARGE_INTEGER
BIGBLOCKFILE_GetSize(LPBIGBLOCKFILE This
);
167 /****************************************************************************
168 * Storage32BaseImpl definitions.
170 * This stucture defines the base information contained in all implementations
171 * of IStorage32 contained in this filee storage implementation.
173 * In OOP terms, this is the base class for all the IStorage32 implementations
174 * contained in this file.
176 struct StorageBaseImpl
178 ICOM_VTABLE(IStorage
)* lpvtbl
; /* Needs to be the first item in the stuct
179 * since we want to cast this in a Storage32 pointer */
182 * Reference count of this object
187 * Ancestor storage (top level)
189 StorageImpl
* ancestorStorage
;
192 * Index of the property for the root of
195 ULONG rootPropertySetIndex
;
198 * virtual Destructor method.
200 void (*v_destructor
)(StorageBaseImpl
*);
205 * Prototypes for the methods of the Storage32BaseImpl class.
207 HRESULT WINAPI
StorageBaseImpl_QueryInterface(
212 ULONG WINAPI
StorageBaseImpl_AddRef(
215 ULONG WINAPI
StorageBaseImpl_Release(
218 HRESULT WINAPI
StorageBaseImpl_OpenStream(
220 const OLECHAR
* pwcsName
, /* [string][in] */
221 void* reserved1
, /* [unique][in] */
222 DWORD grfMode
, /* [in] */
223 DWORD reserved2
, /* [in] */
224 IStream
** ppstm
); /* [out] */
226 HRESULT WINAPI
StorageBaseImpl_OpenStorage(
228 const OLECHAR
* pwcsName
, /* [string][unique][in] */
229 IStorage
* pstgPriority
, /* [unique][in] */
230 DWORD grfMode
, /* [in] */
231 SNB snbExclude
, /* [unique][in] */
232 DWORD reserved
, /* [in] */
233 IStorage
** ppstg
); /* [out] */
235 HRESULT WINAPI
StorageBaseImpl_EnumElements(
237 DWORD reserved1
, /* [in] */
238 void* reserved2
, /* [size_is][unique][in] */
239 DWORD reserved3
, /* [in] */
240 IEnumSTATSTG
** ppenum
); /* [out] */
242 HRESULT WINAPI
StorageBaseImpl_Stat(
244 STATSTG
* pstatstg
, /* [out] */
245 DWORD grfStatFlag
); /* [in] */
247 HRESULT WINAPI
StorageBaseImpl_RenameElement(
249 const OLECHAR
* pwcsOldName
, /* [string][in] */
250 const OLECHAR
* pwcsNewName
); /* [string][in] */
252 HRESULT WINAPI
StorageBaseImpl_CreateStream(
254 const OLECHAR
* pwcsName
, /* [string][in] */
255 DWORD grfMode
, /* [in] */
256 DWORD reserved1
, /* [in] */
257 DWORD reserved2
, /* [in] */
258 IStream
** ppstm
); /* [out] */
260 HRESULT WINAPI
StorageBaseImpl_SetClass(
262 REFCLSID clsid
); /* [in] */
264 /****************************************************************************
265 * Storage32Impl definitions.
267 * This implementation of the IStorage32 interface represents a root
268 * storage. Basically, a document file.
272 ICOM_VTABLE(IStorage
) *lpvtbl
; /* Needs to be the first item in the stuct
273 * since we want to cast this in a Storage32 pointer */
276 * Declare the member of the Storage32BaseImpl class to allow
277 * casting as a Storage32BaseImpl
280 struct StorageImpl
* ancestorStorage
;
281 ULONG rootPropertySetIndex
;
282 void (*v_destructor
)(struct StorageImpl
*);
285 * The following data members are specific to the Storage32Impl
288 HANDLE hFile
; /* Physical support for the Docfile */
293 WORD bigBlockSizeBits
;
294 WORD smallBlockSizeBits
;
296 ULONG smallBlockSize
;
297 ULONG bigBlockDepotCount
;
298 ULONG rootStartBlock
;
299 ULONG smallBlockDepotStart
;
300 ULONG extBigBlockDepotStart
;
301 ULONG extBigBlockDepotCount
;
302 ULONG bigBlockDepotStart
[COUNT_BBDEPOTINHEADER
];
304 ULONG blockDepotCached
[NUM_BLOCKS_PER_DEPOT_BLOCK
];
305 ULONG indexBlockDepotCached
;
309 * Abstraction of the big block chains for the chains of the header.
311 BlockChainStream
* rootBlockChain
;
312 BlockChainStream
* smallBlockDepotChain
;
313 BlockChainStream
* smallBlockRootChain
;
316 * Pointer to the big block file abstraction
318 BigBlockFile
* bigBlockFile
;
322 * Method declaration for the Storage32Impl class
325 HRESULT WINAPI
StorageImpl_CreateStorage(
327 const OLECHAR
* pwcsName
, /* [string][in] */
328 DWORD grfMode
, /* [in] */
329 DWORD dwStgFmt
, /* [in] */
330 DWORD reserved2
, /* [in] */
331 IStorage
** ppstg
); /* [out] */
333 HRESULT WINAPI
StorageImpl_CopyTo(
335 DWORD ciidExclude
, /* [in] */
336 const IID
* rgiidExclude
, /* [size_is][unique][in] */
337 SNB snbExclude
, /* [unique][in] */
338 IStorage
* pstgDest
); /* [unique][in] */
340 HRESULT WINAPI
StorageImpl_MoveElementTo(
342 const OLECHAR
* pwcsName
, /* [string][in] */
343 IStorage
* pstgDest
, /* [unique][in] */
344 const OLECHAR
* pwcsNewName
, /* [string][in] */
345 DWORD grfFlags
); /* [in] */
347 HRESULT WINAPI
StorageImpl_Commit(
349 DWORD grfCommitFlags
); /* [in] */
351 HRESULT WINAPI
StorageImpl_Revert(
354 HRESULT WINAPI
StorageImpl_DestroyElement(
356 const OLECHAR
* pwcsName
); /* [string][in] */
358 HRESULT WINAPI
StorageImpl_SetElementTimes(
360 const OLECHAR
* pwcsName
, /* [string][in] */
361 const FILETIME
* pctime
, /* [in] */
362 const FILETIME
* patime
, /* [in] */
363 const FILETIME
* pmtime
); /* [in] */
365 HRESULT WINAPI
StorageImpl_SetStateBits(
367 DWORD grfStateBits
, /* [in] */
368 DWORD grfMask
); /* [in] */
370 void StorageImpl_Destroy(
373 HRESULT
StorageImpl_Construct(
380 BOOL
StorageImpl_ReadBigBlock(
385 BOOL
StorageImpl_WriteBigBlock(
390 void* StorageImpl_GetROBigBlock(
394 void* StorageImpl_GetBigBlock(
398 void StorageImpl_ReleaseBigBlock(
402 ULONG
StorageImpl_GetNextFreeBigBlock(
405 void StorageImpl_FreeBigBlock(
409 ULONG
StorageImpl_GetNextBlockInChain(
413 void StorageImpl_SetNextBlockInChain(
418 HRESULT
StorageImpl_LoadFileHeader(
421 void StorageImpl_SaveFileHeader(
424 BOOL
StorageImpl_ReadProperty(
427 StgProperty
* buffer
);
429 BOOL
StorageImpl_WriteProperty(
432 StgProperty
* buffer
);
434 BlockChainStream
* Storage32Impl_SmallBlocksToBigBlocks(
436 SmallBlockChainStream
** ppsbChain
);
438 ULONG
Storage32Impl_GetNextExtendedBlock(StorageImpl
* This
,
441 void Storage32Impl_AddBlockDepot(StorageImpl
* This
,
444 ULONG
Storage32Impl_AddExtBlockDepot(StorageImpl
* This
);
446 ULONG
Storage32Impl_GetExtDepotBlock(StorageImpl
* This
,
449 void Storage32Impl_SetExtDepotBlock(StorageImpl
* This
,
452 /****************************************************************************
453 * Storage32InternalImpl definitions.
455 * Definition of the implementation structure for the IStorage32 interface.
456 * This one implements the IStorage32 interface for storage that are
457 * inside another storage.
459 struct StorageInternalImpl
461 ICOM_VTABLE(IStorage
) *lpvtbl
; /* Needs to be the first item in the stuct
462 * since we want to cast this in a Storage32 pointer */
465 * Declare the member of the Storage32BaseImpl class to allow
466 * casting as a Storage32BaseImpl
469 struct StorageImpl
* ancestorStorage
;
470 ULONG rootPropertySetIndex
;
471 void (*v_destructor
)(struct StorageInternalImpl
*);
474 * There is no specific data for this class.
479 * Method definitions for the Storage32InternalImpl class.
481 StorageInternalImpl
* StorageInternalImpl_Construct(
482 StorageImpl
* ancestorStorage
,
483 ULONG rootTropertyIndex
);
485 void StorageInternalImpl_Destroy(
486 StorageInternalImpl
* This
);
488 HRESULT WINAPI
StorageInternalImpl_Commit(
490 DWORD grfCommitFlags
); /* [in] */
492 HRESULT WINAPI
StorageInternalImpl_Revert(
496 /****************************************************************************
497 * IEnumSTATSTGImpl definitions.
499 * Definition of the implementation structure for the IEnumSTATSTGImpl interface.
500 * This class allows iterating through the content of a storage and to find
501 * specific items inside it.
503 struct IEnumSTATSTGImpl
505 ICOM_VTABLE(IEnumSTATSTG
) *lpvtbl
; /* Needs to be the first item in the stuct
506 * since we want to cast this in a IEnumSTATSTG pointer */
508 ULONG ref
; /* Reference count */
509 StorageImpl
* parentStorage
; /* Reference to the parent storage */
510 ULONG firstPropertyNode
; /* Index of the root of the storage to enumerate */
513 * The current implementation of the IEnumSTATSTGImpl class uses a stack
514 * to walk the property sets to get the content of a storage. This stack
515 * is implemented by the following 3 data members
521 #define ENUMSTATSGT_SIZE_INCREMENT 10
525 * Method definitions for the IEnumSTATSTGImpl class.
527 HRESULT WINAPI
IEnumSTATSTGImpl_QueryInterface(
532 ULONG WINAPI
IEnumSTATSTGImpl_AddRef(
533 IEnumSTATSTG
* iface
);
535 ULONG WINAPI
IEnumSTATSTGImpl_Release(
536 IEnumSTATSTG
* iface
);
538 HRESULT WINAPI
IEnumSTATSTGImpl_Next(
542 ULONG
* pceltFetched
);
544 HRESULT WINAPI
IEnumSTATSTGImpl_Skip(
548 HRESULT WINAPI
IEnumSTATSTGImpl_Reset(
549 IEnumSTATSTG
* iface
);
551 HRESULT WINAPI
IEnumSTATSTGImpl_Clone(
553 IEnumSTATSTG
** ppenum
);
555 IEnumSTATSTGImpl
* IEnumSTATSTGImpl_Construct(
557 ULONG firstPropertyNode
);
559 void IEnumSTATSTGImpl_Destroy(
560 IEnumSTATSTGImpl
* This
);
562 void IEnumSTATSTGImpl_PushSearchNode(
563 IEnumSTATSTGImpl
* This
,
566 ULONG
IEnumSTATSTGImpl_PopSearchNode(
567 IEnumSTATSTGImpl
* This
,
570 ULONG
IEnumSTATSTGImpl_FindProperty(
571 IEnumSTATSTGImpl
* This
,
572 const OLECHAR
* lpszPropName
,
573 StgProperty
* buffer
);
575 INT
IEnumSTATSTGImpl_FindParentProperty(
576 IEnumSTATSTGImpl
*This
,
578 StgProperty
*currentProperty
,
582 /****************************************************************************
583 * StgStreamImpl definitions.
585 * This class imlements the IStream32 inteface and represents a stream
586 * located inside a storage object.
590 ICOM_VTABLE(IStream
) *lpvtbl
; /* Needs to be the first item in the stuct
591 * since we want to cast this in a IStream pointer */
599 * Storage that is the parent(owner) of the stream
601 StorageBaseImpl
* parentStorage
;
604 * Index of the property that owns (points to) this stream.
609 * Helper variable that contains the size of the stream
611 ULARGE_INTEGER streamSize
;
614 * This is the current position of the cursor in the stream
616 ULARGE_INTEGER currentPosition
;
619 * The information in the stream is represented by a chain of small blocks
620 * or a chain of large blocks. Depending on the case, one of the two
621 * following variabled points to that information.
623 BlockChainStream
* bigBlockChain
;
624 SmallBlockChainStream
* smallBlockChain
;
629 * Method definition for the StgStreamImpl class.
631 StgStreamImpl
* StgStreamImpl_Construct(
632 StorageBaseImpl
* parentStorage
,
633 ULONG ownerProperty
);
635 void StgStreamImpl_Destroy(
636 StgStreamImpl
* This
);
638 void StgStreamImpl_OpenBlockChain(
639 StgStreamImpl
* This
);
641 HRESULT WINAPI
StgStreamImpl_QueryInterface(
643 REFIID riid
, /* [in] */
644 void** ppvObject
); /* [iid_is][out] */
646 ULONG WINAPI
StgStreamImpl_AddRef(
649 ULONG WINAPI
StgStreamImpl_Release(
652 HRESULT WINAPI
StgStreamImpl_Read(
654 void* pv
, /* [length_is][size_is][out] */
656 ULONG
* pcbRead
); /* [out] */
658 HRESULT WINAPI
StgStreamImpl_Write(
660 const void* pv
, /* [size_is][in] */
662 ULONG
* pcbWritten
); /* [out] */
664 HRESULT WINAPI
StgStreamImpl_Seek(
666 LARGE_INTEGER dlibMove
, /* [in] */
667 DWORD dwOrigin
, /* [in] */
668 ULARGE_INTEGER
* plibNewPosition
); /* [out] */
670 HRESULT WINAPI
StgStreamImpl_SetSize(
672 ULARGE_INTEGER libNewSize
); /* [in] */
674 HRESULT WINAPI
StgStreamImpl_CopyTo(
676 IStream
* pstm
, /* [unique][in] */
677 ULARGE_INTEGER cb
, /* [in] */
678 ULARGE_INTEGER
* pcbRead
, /* [out] */
679 ULARGE_INTEGER
* pcbWritten
); /* [out] */
681 HRESULT WINAPI
StgStreamImpl_Commit(
683 DWORD grfCommitFlags
); /* [in] */
685 HRESULT WINAPI
StgStreamImpl_Revert(
688 HRESULT WINAPI
StgStreamImpl_LockRegion(
690 ULARGE_INTEGER libOffset
, /* [in] */
691 ULARGE_INTEGER cb
, /* [in] */
692 DWORD dwLockType
); /* [in] */
694 HRESULT WINAPI
StgStreamImpl_UnlockRegion(
696 ULARGE_INTEGER libOffset
, /* [in] */
697 ULARGE_INTEGER cb
, /* [in] */
698 DWORD dwLockType
); /* [in] */
700 HRESULT WINAPI
StgStreamImpl_Stat(
702 STATSTG
* pstatstg
, /* [out] */
703 DWORD grfStatFlag
); /* [in] */
705 HRESULT WINAPI
StgStreamImpl_Clone(
707 IStream
** ppstm
); /* [out] */
710 /********************************************************************************
711 * The StorageUtl_ functions are miscelaneous utility functions. Most of which are
712 * abstractions used to read values from file buffers without having to worry
715 void StorageUtl_ReadWord(void* buffer
, ULONG offset
, WORD
* value
);
716 void StorageUtl_WriteWord(void* buffer
, ULONG offset
, WORD value
);
717 void StorageUtl_ReadDWord(void* buffer
, ULONG offset
, DWORD
* value
);
718 void StorageUtl_WriteDWord(void* buffer
, ULONG offset
, DWORD value
);
719 void StorageUtl_ReadGUID(void* buffer
, ULONG offset
, GUID
* value
);
720 void StorageUtl_WriteGUID(void* buffer
, ULONG offset
, GUID
* value
);
721 void StorageUtl_CopyPropertyToSTATSTG(STATSTG
* destination
,
725 /****************************************************************************
726 * BlockChainStream definitions.
728 * The BlockChainStream class is a utility class that is used to create an
729 * abstraction of the big block chains in the storage file.
731 struct BlockChainStream
733 StorageImpl
* parentStorage
;
734 ULONG
* headOfStreamPlaceHolder
;
735 ULONG ownerPropertyIndex
;
736 ULONG lastBlockNoInSequence
;
737 ULONG lastBlockNoInSequenceIndex
;
743 * Methods for the BlockChainStream class.
745 BlockChainStream
* BlockChainStream_Construct(
746 StorageImpl
* parentStorage
,
747 ULONG
* headOfStreamPlaceHolder
,
748 ULONG propertyIndex
);
750 void BlockChainStream_Destroy(
751 BlockChainStream
* This
);
753 ULONG
BlockChainStream_GetHeadOfChain(
754 BlockChainStream
* This
);
756 BOOL
BlockChainStream_ReadAt(
757 BlockChainStream
* This
,
758 ULARGE_INTEGER offset
,
763 BOOL
BlockChainStream_WriteAt(
764 BlockChainStream
* This
,
765 ULARGE_INTEGER offset
,
768 ULONG
* bytesWritten
);
770 BOOL
BlockChainStream_SetSize(
771 BlockChainStream
* This
,
772 ULARGE_INTEGER newSize
);
774 ULARGE_INTEGER
BlockChainStream_GetSize(
775 BlockChainStream
* This
);
777 ULONG
BlockChainStream_GetCount(
778 BlockChainStream
* This
);
780 /****************************************************************************
781 * SmallBlockChainStream definitions.
783 * The SmallBlockChainStream class is a utility class that is used to create an
784 * abstraction of the small block chains in the storage file.
786 struct SmallBlockChainStream
788 StorageImpl
* parentStorage
;
789 ULONG ownerPropertyIndex
;
793 * Methods of the SmallBlockChainStream class.
795 SmallBlockChainStream
* SmallBlockChainStream_Construct(
796 StorageImpl
* parentStorage
,
797 ULONG propertyIndex
);
799 void SmallBlockChainStream_Destroy(
800 SmallBlockChainStream
* This
);
802 ULONG
SmallBlockChainStream_GetHeadOfChain(
803 SmallBlockChainStream
* This
);
805 ULONG
SmallBlockChainStream_GetNextBlockInChain(
806 SmallBlockChainStream
* This
,
809 void SmallBlockChainStream_SetNextBlockInChain(
810 SmallBlockChainStream
* This
,
814 void SmallBlockChainStream_FreeBlock(
815 SmallBlockChainStream
* This
,
818 ULONG
SmallBlockChainStream_GetNextFreeBlock(
819 SmallBlockChainStream
* This
);
821 BOOL
SmallBlockChainStream_ReadAt(
822 SmallBlockChainStream
* This
,
823 ULARGE_INTEGER offset
,
828 BOOL
SmallBlockChainStream_WriteAt(
829 SmallBlockChainStream
* This
,
830 ULARGE_INTEGER offset
,
833 ULONG
* bytesWritten
);
835 BOOL
SmallBlockChainStream_SetSize(
836 SmallBlockChainStream
* This
,
837 ULARGE_INTEGER newSize
);
839 ULARGE_INTEGER
SmallBlockChainStream_GetSize(
840 SmallBlockChainStream
* This
);
842 ULONG
SmallBlockChainStream_GetCount(
843 SmallBlockChainStream
* This
);
846 #endif /* __STORAGE32_H__ */