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__
20 #include "wine/obj_storage.h"
23 * Definitions for the file format offsets.
25 static const ULONG OFFSET_BIGBLOCKSIZEBITS
= 0x0000001e;
26 static const ULONG OFFSET_SMALLBLOCKSIZEBITS
= 0x00000020;
27 static const ULONG OFFSET_BBDEPOTCOUNT
= 0x0000002C;
28 static const ULONG OFFSET_ROOTSTARTBLOCK
= 0x00000030;
29 static const ULONG OFFSET_SBDEPOTSTART
= 0x0000003C;
30 static const ULONG OFFSET_EXTBBDEPOTSTART
= 0x00000044;
31 static const ULONG OFFSET_EXTBBDEPOTCOUNT
= 0x00000048;
32 static const ULONG OFFSET_BBDEPOTSTART
= 0x0000004C;
33 static const ULONG OFFSET_PS_NAME
= 0x00000000;
34 static const ULONG OFFSET_PS_NAMELENGTH
= 0x00000040;
35 static const ULONG OFFSET_PS_PROPERTYTYPE
= 0x00000042;
36 static const ULONG OFFSET_PS_PREVIOUSPROP
= 0x00000044;
37 static const ULONG OFFSET_PS_NEXTPROP
= 0x00000048;
38 static const ULONG OFFSET_PS_DIRPROP
= 0x0000004C;
39 static const ULONG OFFSET_PS_GUID
= 0x00000050;
40 static const ULONG OFFSET_PS_TSS1
= 0x00000064;
41 static const ULONG OFFSET_PS_TSD1
= 0x00000068;
42 static const ULONG OFFSET_PS_TSS2
= 0x0000006C;
43 static const ULONG OFFSET_PS_TSD2
= 0x00000070;
44 static const ULONG OFFSET_PS_STARTBLOCK
= 0x00000074;
45 static const ULONG OFFSET_PS_SIZE
= 0x00000078;
46 static const WORD DEF_BIG_BLOCK_SIZE_BITS
= 0x0009;
47 static const WORD DEF_SMALL_BLOCK_SIZE_BITS
= 0x0006;
48 static const WORD DEF_BIG_BLOCK_SIZE
= 0x0200;
49 static const WORD DEF_SMALL_BLOCK_SIZE
= 0x0040;
50 static const ULONG BLOCK_EXTBBDEPOT
= 0xFFFFFFFC;
51 static const ULONG BLOCK_SPECIAL
= 0xFFFFFFFD;
52 static const ULONG BLOCK_END_OF_CHAIN
= 0xFFFFFFFE;
53 static const ULONG BLOCK_UNUSED
= 0xFFFFFFFF;
54 static const ULONG PROPERTY_NULL
= 0xFFFFFFFF;
56 #define PROPERTY_NAME_MAX_LEN 0x20
57 #define PROPERTY_NAME_BUFFER_LEN 0x40
59 #define PROPSET_BLOCK_SIZE 0x00000080
62 * Property type of relation
64 #define PROPERTY_RELATION_PREVIOUS 0
65 #define PROPERTY_RELATION_NEXT 1
66 #define PROPERTY_RELATION_DIR 2
69 * Property type constants
71 #define PROPTYPE_STORAGE 0x01
72 #define PROPTYPE_STREAM 0x02
73 #define PROPTYPE_ROOT 0x05
76 * These defines assume a hardcoded blocksize. The code will assert
77 * if the blocksize is different. Some changes will have to be done if it
80 #define BIG_BLOCK_SIZE 0x200
81 #define COUNT_BBDEPOTINHEADER 109
82 #define LIMIT_TO_USE_SMALL_BLOCK 0x1000
83 #define NUM_BLOCKS_PER_DEPOT_BLOCK 128
86 * These are signatures to detect the type of Document file.
88 static const BYTE STORAGE_magic
[8] ={0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1};
89 static const BYTE STORAGE_oldmagic
[8] ={0xd0,0xcf,0x11,0xe0,0x0e,0x11,0xfc,0x0d};
92 * Forward declarations of all the structures used by the storage
95 typedef struct StorageBaseImpl StorageBaseImpl
;
96 typedef struct StorageImpl StorageImpl
;
97 typedef struct StorageInternalImpl StorageInternalImpl
;
98 typedef struct BlockChainStream BlockChainStream
;
99 typedef struct SmallBlockChainStream SmallBlockChainStream
;
100 typedef struct IEnumSTATSTGImpl IEnumSTATSTGImpl
;
101 typedef struct StgProperty StgProperty
;
102 typedef struct StgStreamImpl StgStreamImpl
;
105 * This utility structure is used to read/write the information in a storage
110 WCHAR name
[PROPERTY_NAME_MAX_LEN
];
111 WORD sizeOfNameString
;
113 ULONG previousProperty
;
116 GUID propertyUniqueID
;
125 /*************************************************************************
126 * Big Block File support
128 * The big block file is an abstraction of a flat file separated in
129 * same sized blocks. The implementation for the methods described in
130 * this section appear in stg_bigblockfile.c
134 * Declaration of the data structures
136 typedef struct BigBlockFile BigBlockFile
,*LPBIGBLOCKFILE
;
137 typedef struct MappedPage MappedPage
,*LPMAPPEDPAGE
;
142 ULARGE_INTEGER filesize
;
148 MappedPage
*victimhead
, *victimtail
;
149 ULONG num_victim_pages
;
156 * Declaration of the functions used to manipulate the BigBlockFile
159 BigBlockFile
* BIGBLOCKFILE_Construct(HANDLE hFile
,
164 void BIGBLOCKFILE_Destructor(LPBIGBLOCKFILE This
);
165 void* BIGBLOCKFILE_GetBigBlock(LPBIGBLOCKFILE This
, ULONG index
);
166 void* BIGBLOCKFILE_GetROBigBlock(LPBIGBLOCKFILE This
, ULONG index
);
167 void BIGBLOCKFILE_ReleaseBigBlock(LPBIGBLOCKFILE This
, void *pBlock
);
168 void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This
, ULARGE_INTEGER newSize
);
169 ULARGE_INTEGER
BIGBLOCKFILE_GetSize(LPBIGBLOCKFILE This
);
171 /*************************************************************************
172 * Ole Convert support
175 void OLECONVERT_CreateOleStream(LPSTORAGE pStorage
);
176 HRESULT
OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage
, LPCSTR strOleTypeName
);
178 /****************************************************************************
179 * Storage32BaseImpl definitions.
181 * This stucture defines the base information contained in all implementations
182 * of IStorage32 contained in this filee storage implementation.
184 * In OOP terms, this is the base class for all the IStorage32 implementations
185 * contained in this file.
187 struct StorageBaseImpl
189 ICOM_VFIELD(IStorage
); /* Needs to be the first item in the stuct
190 * since we want to cast this in a Storage32 pointer */
193 * Reference count of this object
198 * Ancestor storage (top level)
200 StorageImpl
* ancestorStorage
;
203 * Index of the property for the root of
206 ULONG rootPropertySetIndex
;
209 * virtual Destructor method.
211 void (*v_destructor
)(StorageBaseImpl
*);
216 * Prototypes for the methods of the Storage32BaseImpl class.
218 HRESULT WINAPI
StorageBaseImpl_QueryInterface(
223 ULONG WINAPI
StorageBaseImpl_AddRef(
226 ULONG WINAPI
StorageBaseImpl_Release(
229 HRESULT WINAPI
StorageBaseImpl_OpenStream(
231 const OLECHAR
* pwcsName
, /* [string][in] */
232 void* reserved1
, /* [unique][in] */
233 DWORD grfMode
, /* [in] */
234 DWORD reserved2
, /* [in] */
235 IStream
** ppstm
); /* [out] */
237 HRESULT WINAPI
StorageBaseImpl_OpenStorage(
239 const OLECHAR
* pwcsName
, /* [string][unique][in] */
240 IStorage
* pstgPriority
, /* [unique][in] */
241 DWORD grfMode
, /* [in] */
242 SNB snbExclude
, /* [unique][in] */
243 DWORD reserved
, /* [in] */
244 IStorage
** ppstg
); /* [out] */
246 HRESULT WINAPI
StorageBaseImpl_EnumElements(
248 DWORD reserved1
, /* [in] */
249 void* reserved2
, /* [size_is][unique][in] */
250 DWORD reserved3
, /* [in] */
251 IEnumSTATSTG
** ppenum
); /* [out] */
253 HRESULT WINAPI
StorageBaseImpl_Stat(
255 STATSTG
* pstatstg
, /* [out] */
256 DWORD grfStatFlag
); /* [in] */
258 HRESULT WINAPI
StorageBaseImpl_RenameElement(
260 const OLECHAR
* pwcsOldName
, /* [string][in] */
261 const OLECHAR
* pwcsNewName
); /* [string][in] */
263 HRESULT WINAPI
StorageBaseImpl_CreateStream(
265 const OLECHAR
* pwcsName
, /* [string][in] */
266 DWORD grfMode
, /* [in] */
267 DWORD reserved1
, /* [in] */
268 DWORD reserved2
, /* [in] */
269 IStream
** ppstm
); /* [out] */
271 HRESULT WINAPI
StorageBaseImpl_SetClass(
273 REFCLSID clsid
); /* [in] */
275 /****************************************************************************
276 * Storage32Impl definitions.
278 * This implementation of the IStorage32 interface represents a root
279 * storage. Basically, a document file.
283 ICOM_VFIELD(IStorage
); /* Needs to be the first item in the stuct
284 * since we want to cast this in a Storage32 pointer */
287 * Declare the member of the Storage32BaseImpl class to allow
288 * casting as a Storage32BaseImpl
291 struct StorageImpl
* ancestorStorage
;
292 ULONG rootPropertySetIndex
;
293 void (*v_destructor
)(struct StorageImpl
*);
296 * The following data members are specific to the Storage32Impl
299 HANDLE hFile
; /* Physical support for the Docfile */
304 WORD bigBlockSizeBits
;
305 WORD smallBlockSizeBits
;
307 ULONG smallBlockSize
;
308 ULONG bigBlockDepotCount
;
309 ULONG rootStartBlock
;
310 ULONG smallBlockDepotStart
;
311 ULONG extBigBlockDepotStart
;
312 ULONG extBigBlockDepotCount
;
313 ULONG bigBlockDepotStart
[COUNT_BBDEPOTINHEADER
];
315 ULONG blockDepotCached
[NUM_BLOCKS_PER_DEPOT_BLOCK
];
316 ULONG indexBlockDepotCached
;
320 * Abstraction of the big block chains for the chains of the header.
322 BlockChainStream
* rootBlockChain
;
323 BlockChainStream
* smallBlockDepotChain
;
324 BlockChainStream
* smallBlockRootChain
;
327 * Pointer to the big block file abstraction
329 BigBlockFile
* bigBlockFile
;
333 * Method declaration for the Storage32Impl class
336 HRESULT WINAPI
StorageImpl_CreateStorage(
338 const OLECHAR
* pwcsName
, /* [string][in] */
339 DWORD grfMode
, /* [in] */
340 DWORD dwStgFmt
, /* [in] */
341 DWORD reserved2
, /* [in] */
342 IStorage
** ppstg
); /* [out] */
344 HRESULT WINAPI
StorageImpl_CopyTo(
346 DWORD ciidExclude
, /* [in] */
347 const IID
* rgiidExclude
, /* [size_is][unique][in] */
348 SNB snbExclude
, /* [unique][in] */
349 IStorage
* pstgDest
); /* [unique][in] */
351 HRESULT WINAPI
StorageImpl_MoveElementTo(
353 const OLECHAR
* pwcsName
, /* [string][in] */
354 IStorage
* pstgDest
, /* [unique][in] */
355 const OLECHAR
* pwcsNewName
, /* [string][in] */
356 DWORD grfFlags
); /* [in] */
358 HRESULT WINAPI
StorageImpl_Commit(
360 DWORD grfCommitFlags
); /* [in] */
362 HRESULT WINAPI
StorageImpl_Revert(
365 HRESULT WINAPI
StorageImpl_DestroyElement(
367 const OLECHAR
* pwcsName
); /* [string][in] */
369 HRESULT WINAPI
StorageImpl_SetElementTimes(
371 const OLECHAR
* pwcsName
, /* [string][in] */
372 const FILETIME
* pctime
, /* [in] */
373 const FILETIME
* patime
, /* [in] */
374 const FILETIME
* pmtime
); /* [in] */
376 HRESULT WINAPI
StorageImpl_SetStateBits(
378 DWORD grfStateBits
, /* [in] */
379 DWORD grfMask
); /* [in] */
381 void StorageImpl_Destroy(
384 HRESULT
StorageImpl_Construct(
392 BOOL
StorageImpl_ReadBigBlock(
397 BOOL
StorageImpl_WriteBigBlock(
402 void* StorageImpl_GetROBigBlock(
406 void* StorageImpl_GetBigBlock(
410 void StorageImpl_ReleaseBigBlock(
414 ULONG
StorageImpl_GetNextFreeBigBlock(
417 void StorageImpl_FreeBigBlock(
421 ULONG
StorageImpl_GetNextBlockInChain(
425 void StorageImpl_SetNextBlockInChain(
430 HRESULT
StorageImpl_LoadFileHeader(
433 void StorageImpl_SaveFileHeader(
436 BOOL
StorageImpl_ReadProperty(
439 StgProperty
* buffer
);
441 BOOL
StorageImpl_WriteProperty(
444 StgProperty
* buffer
);
446 BlockChainStream
* Storage32Impl_SmallBlocksToBigBlocks(
448 SmallBlockChainStream
** ppsbChain
);
450 ULONG
Storage32Impl_GetNextExtendedBlock(StorageImpl
* This
,
453 void Storage32Impl_AddBlockDepot(StorageImpl
* This
,
456 ULONG
Storage32Impl_AddExtBlockDepot(StorageImpl
* This
);
458 ULONG
Storage32Impl_GetExtDepotBlock(StorageImpl
* This
,
461 void Storage32Impl_SetExtDepotBlock(StorageImpl
* This
,
464 /****************************************************************************
465 * Storage32InternalImpl definitions.
467 * Definition of the implementation structure for the IStorage32 interface.
468 * This one implements the IStorage32 interface for storage that are
469 * inside another storage.
471 struct StorageInternalImpl
473 ICOM_VFIELD(IStorage
); /* Needs to be the first item in the stuct
474 * since we want to cast this in a Storage32 pointer */
477 * Declare the member of the Storage32BaseImpl class to allow
478 * casting as a Storage32BaseImpl
481 struct StorageImpl
* ancestorStorage
;
482 ULONG rootPropertySetIndex
;
483 void (*v_destructor
)(struct StorageInternalImpl
*);
486 * There is no specific data for this class.
491 * Method definitions for the Storage32InternalImpl class.
493 StorageInternalImpl
* StorageInternalImpl_Construct(
494 StorageImpl
* ancestorStorage
,
495 ULONG rootTropertyIndex
);
497 void StorageInternalImpl_Destroy(
498 StorageInternalImpl
* This
);
500 HRESULT WINAPI
StorageInternalImpl_Commit(
502 DWORD grfCommitFlags
); /* [in] */
504 HRESULT WINAPI
StorageInternalImpl_Revert(
508 /****************************************************************************
509 * IEnumSTATSTGImpl definitions.
511 * Definition of the implementation structure for the IEnumSTATSTGImpl interface.
512 * This class allows iterating through the content of a storage and to find
513 * specific items inside it.
515 struct IEnumSTATSTGImpl
517 ICOM_VFIELD(IEnumSTATSTG
); /* Needs to be the first item in the stuct
518 * since we want to cast this in a IEnumSTATSTG pointer */
520 ULONG ref
; /* Reference count */
521 StorageImpl
* parentStorage
; /* Reference to the parent storage */
522 ULONG firstPropertyNode
; /* Index of the root of the storage to enumerate */
525 * The current implementation of the IEnumSTATSTGImpl class uses a stack
526 * to walk the property sets to get the content of a storage. This stack
527 * is implemented by the following 3 data members
533 #define ENUMSTATSGT_SIZE_INCREMENT 10
537 * Method definitions for the IEnumSTATSTGImpl class.
539 HRESULT WINAPI
IEnumSTATSTGImpl_QueryInterface(
544 ULONG WINAPI
IEnumSTATSTGImpl_AddRef(
545 IEnumSTATSTG
* iface
);
547 ULONG WINAPI
IEnumSTATSTGImpl_Release(
548 IEnumSTATSTG
* iface
);
550 HRESULT WINAPI
IEnumSTATSTGImpl_Next(
554 ULONG
* pceltFetched
);
556 HRESULT WINAPI
IEnumSTATSTGImpl_Skip(
560 HRESULT WINAPI
IEnumSTATSTGImpl_Reset(
561 IEnumSTATSTG
* iface
);
563 HRESULT WINAPI
IEnumSTATSTGImpl_Clone(
565 IEnumSTATSTG
** ppenum
);
567 IEnumSTATSTGImpl
* IEnumSTATSTGImpl_Construct(
569 ULONG firstPropertyNode
);
571 void IEnumSTATSTGImpl_Destroy(
572 IEnumSTATSTGImpl
* This
);
574 void IEnumSTATSTGImpl_PushSearchNode(
575 IEnumSTATSTGImpl
* This
,
578 ULONG
IEnumSTATSTGImpl_PopSearchNode(
579 IEnumSTATSTGImpl
* This
,
582 ULONG
IEnumSTATSTGImpl_FindProperty(
583 IEnumSTATSTGImpl
* This
,
584 const OLECHAR
* lpszPropName
,
585 StgProperty
* buffer
);
587 INT
IEnumSTATSTGImpl_FindParentProperty(
588 IEnumSTATSTGImpl
*This
,
590 StgProperty
*currentProperty
,
594 /****************************************************************************
595 * StgStreamImpl definitions.
597 * This class imlements the IStream32 inteface and represents a stream
598 * located inside a storage object.
602 ICOM_VFIELD(IStream
); /* Needs to be the first item in the stuct
603 * since we want to cast this in a IStream pointer */
611 * Storage that is the parent(owner) of the stream
613 StorageBaseImpl
* parentStorage
;
616 * Access mode of this stream.
621 * Index of the property that owns (points to) this stream.
626 * Helper variable that contains the size of the stream
628 ULARGE_INTEGER streamSize
;
631 * This is the current position of the cursor in the stream
633 ULARGE_INTEGER currentPosition
;
636 * The information in the stream is represented by a chain of small blocks
637 * or a chain of large blocks. Depending on the case, one of the two
638 * following variabled points to that information.
640 BlockChainStream
* bigBlockChain
;
641 SmallBlockChainStream
* smallBlockChain
;
645 * Method definition for the StgStreamImpl class.
647 StgStreamImpl
* StgStreamImpl_Construct(
648 StorageBaseImpl
* parentStorage
,
650 ULONG ownerProperty
);
652 void StgStreamImpl_Destroy(
653 StgStreamImpl
* This
);
655 void StgStreamImpl_OpenBlockChain(
656 StgStreamImpl
* This
);
658 HRESULT WINAPI
StgStreamImpl_QueryInterface(
660 REFIID riid
, /* [in] */
661 void** ppvObject
); /* [iid_is][out] */
663 ULONG WINAPI
StgStreamImpl_AddRef(
666 ULONG WINAPI
StgStreamImpl_Release(
669 HRESULT WINAPI
StgStreamImpl_Read(
671 void* pv
, /* [length_is][size_is][out] */
673 ULONG
* pcbRead
); /* [out] */
675 HRESULT WINAPI
StgStreamImpl_Write(
677 const void* pv
, /* [size_is][in] */
679 ULONG
* pcbWritten
); /* [out] */
681 HRESULT WINAPI
StgStreamImpl_Seek(
683 LARGE_INTEGER dlibMove
, /* [in] */
684 DWORD dwOrigin
, /* [in] */
685 ULARGE_INTEGER
* plibNewPosition
); /* [out] */
687 HRESULT WINAPI
StgStreamImpl_SetSize(
689 ULARGE_INTEGER libNewSize
); /* [in] */
691 HRESULT WINAPI
StgStreamImpl_CopyTo(
693 IStream
* pstm
, /* [unique][in] */
694 ULARGE_INTEGER cb
, /* [in] */
695 ULARGE_INTEGER
* pcbRead
, /* [out] */
696 ULARGE_INTEGER
* pcbWritten
); /* [out] */
698 HRESULT WINAPI
StgStreamImpl_Commit(
700 DWORD grfCommitFlags
); /* [in] */
702 HRESULT WINAPI
StgStreamImpl_Revert(
705 HRESULT WINAPI
StgStreamImpl_LockRegion(
707 ULARGE_INTEGER libOffset
, /* [in] */
708 ULARGE_INTEGER cb
, /* [in] */
709 DWORD dwLockType
); /* [in] */
711 HRESULT WINAPI
StgStreamImpl_UnlockRegion(
713 ULARGE_INTEGER libOffset
, /* [in] */
714 ULARGE_INTEGER cb
, /* [in] */
715 DWORD dwLockType
); /* [in] */
717 HRESULT WINAPI
StgStreamImpl_Stat(
719 STATSTG
* pstatstg
, /* [out] */
720 DWORD grfStatFlag
); /* [in] */
722 HRESULT WINAPI
StgStreamImpl_Clone(
724 IStream
** ppstm
); /* [out] */
727 /********************************************************************************
728 * The StorageUtl_ functions are miscelaneous utility functions. Most of which are
729 * abstractions used to read values from file buffers without having to worry
732 void StorageUtl_ReadWord(void* buffer
, ULONG offset
, WORD
* value
);
733 void StorageUtl_WriteWord(void* buffer
, ULONG offset
, WORD value
);
734 void StorageUtl_ReadDWord(void* buffer
, ULONG offset
, DWORD
* value
);
735 void StorageUtl_WriteDWord(void* buffer
, ULONG offset
, DWORD value
);
736 void StorageUtl_ReadGUID(void* buffer
, ULONG offset
, GUID
* value
);
737 void StorageUtl_WriteGUID(void* buffer
, ULONG offset
, GUID
* value
);
738 void StorageUtl_CopyPropertyToSTATSTG(STATSTG
* destination
,
742 /****************************************************************************
743 * BlockChainStream definitions.
745 * The BlockChainStream class is a utility class that is used to create an
746 * abstraction of the big block chains in the storage file.
748 struct BlockChainStream
750 StorageImpl
* parentStorage
;
751 ULONG
* headOfStreamPlaceHolder
;
752 ULONG ownerPropertyIndex
;
753 ULONG lastBlockNoInSequence
;
754 ULONG lastBlockNoInSequenceIndex
;
760 * Methods for the BlockChainStream class.
762 BlockChainStream
* BlockChainStream_Construct(
763 StorageImpl
* parentStorage
,
764 ULONG
* headOfStreamPlaceHolder
,
765 ULONG propertyIndex
);
767 void BlockChainStream_Destroy(
768 BlockChainStream
* This
);
770 ULONG
BlockChainStream_GetHeadOfChain(
771 BlockChainStream
* This
);
773 BOOL
BlockChainStream_ReadAt(
774 BlockChainStream
* This
,
775 ULARGE_INTEGER offset
,
780 BOOL
BlockChainStream_WriteAt(
781 BlockChainStream
* This
,
782 ULARGE_INTEGER offset
,
785 ULONG
* bytesWritten
);
787 BOOL
BlockChainStream_SetSize(
788 BlockChainStream
* This
,
789 ULARGE_INTEGER newSize
);
791 ULARGE_INTEGER
BlockChainStream_GetSize(
792 BlockChainStream
* This
);
794 ULONG
BlockChainStream_GetCount(
795 BlockChainStream
* This
);
797 /****************************************************************************
798 * SmallBlockChainStream definitions.
800 * The SmallBlockChainStream class is a utility class that is used to create an
801 * abstraction of the small block chains in the storage file.
803 struct SmallBlockChainStream
805 StorageImpl
* parentStorage
;
806 ULONG ownerPropertyIndex
;
810 * Methods of the SmallBlockChainStream class.
812 SmallBlockChainStream
* SmallBlockChainStream_Construct(
813 StorageImpl
* parentStorage
,
814 ULONG propertyIndex
);
816 void SmallBlockChainStream_Destroy(
817 SmallBlockChainStream
* This
);
819 ULONG
SmallBlockChainStream_GetHeadOfChain(
820 SmallBlockChainStream
* This
);
822 ULONG
SmallBlockChainStream_GetNextBlockInChain(
823 SmallBlockChainStream
* This
,
826 void SmallBlockChainStream_SetNextBlockInChain(
827 SmallBlockChainStream
* This
,
831 void SmallBlockChainStream_FreeBlock(
832 SmallBlockChainStream
* This
,
835 ULONG
SmallBlockChainStream_GetNextFreeBlock(
836 SmallBlockChainStream
* This
);
838 BOOL
SmallBlockChainStream_ReadAt(
839 SmallBlockChainStream
* This
,
840 ULARGE_INTEGER offset
,
845 BOOL
SmallBlockChainStream_WriteAt(
846 SmallBlockChainStream
* This
,
847 ULARGE_INTEGER offset
,
850 ULONG
* bytesWritten
);
852 BOOL
SmallBlockChainStream_SetSize(
853 SmallBlockChainStream
* This
,
854 ULARGE_INTEGER newSize
);
856 ULARGE_INTEGER
SmallBlockChainStream_GetSize(
857 SmallBlockChainStream
* This
);
859 ULONG
SmallBlockChainStream_GetCount(
860 SmallBlockChainStream
* This
);
863 #endif /* __STORAGE32_H__ */