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
;
138 typedef struct BigBlock BigBlock
,*LPBIGBLOCK
;
143 ULARGE_INTEGER filesize
;
148 MappedPage
*maplisthead
;
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 * Storage32BaseImpl definitions.
174 * This stucture defines the base information contained in all implementations
175 * of IStorage32 contained in this filee storage implementation.
177 * In OOP terms, this is the base class for all the IStorage32 implementations
178 * contained in this file.
180 struct StorageBaseImpl
182 ICOM_VFIELD(IStorage
); /* Needs to be the first item in the stuct
183 * since we want to cast this in a Storage32 pointer */
186 * Reference count of this object
191 * Ancestor storage (top level)
193 StorageImpl
* ancestorStorage
;
196 * Index of the property for the root of
199 ULONG rootPropertySetIndex
;
202 * virtual Destructor method.
204 void (*v_destructor
)(StorageBaseImpl
*);
209 * Prototypes for the methods of the Storage32BaseImpl class.
211 HRESULT WINAPI
StorageBaseImpl_QueryInterface(
216 ULONG WINAPI
StorageBaseImpl_AddRef(
219 ULONG WINAPI
StorageBaseImpl_Release(
222 HRESULT WINAPI
StorageBaseImpl_OpenStream(
224 const OLECHAR
* pwcsName
, /* [string][in] */
225 void* reserved1
, /* [unique][in] */
226 DWORD grfMode
, /* [in] */
227 DWORD reserved2
, /* [in] */
228 IStream
** ppstm
); /* [out] */
230 HRESULT WINAPI
StorageBaseImpl_OpenStorage(
232 const OLECHAR
* pwcsName
, /* [string][unique][in] */
233 IStorage
* pstgPriority
, /* [unique][in] */
234 DWORD grfMode
, /* [in] */
235 SNB snbExclude
, /* [unique][in] */
236 DWORD reserved
, /* [in] */
237 IStorage
** ppstg
); /* [out] */
239 HRESULT WINAPI
StorageBaseImpl_EnumElements(
241 DWORD reserved1
, /* [in] */
242 void* reserved2
, /* [size_is][unique][in] */
243 DWORD reserved3
, /* [in] */
244 IEnumSTATSTG
** ppenum
); /* [out] */
246 HRESULT WINAPI
StorageBaseImpl_Stat(
248 STATSTG
* pstatstg
, /* [out] */
249 DWORD grfStatFlag
); /* [in] */
251 HRESULT WINAPI
StorageBaseImpl_RenameElement(
253 const OLECHAR
* pwcsOldName
, /* [string][in] */
254 const OLECHAR
* pwcsNewName
); /* [string][in] */
256 HRESULT WINAPI
StorageBaseImpl_CreateStream(
258 const OLECHAR
* pwcsName
, /* [string][in] */
259 DWORD grfMode
, /* [in] */
260 DWORD reserved1
, /* [in] */
261 DWORD reserved2
, /* [in] */
262 IStream
** ppstm
); /* [out] */
264 HRESULT WINAPI
StorageBaseImpl_SetClass(
266 REFCLSID clsid
); /* [in] */
268 /****************************************************************************
269 * Storage32Impl definitions.
271 * This implementation of the IStorage32 interface represents a root
272 * storage. Basically, a document file.
276 ICOM_VFIELD(IStorage
); /* Needs to be the first item in the stuct
277 * since we want to cast this in a Storage32 pointer */
280 * Declare the member of the Storage32BaseImpl class to allow
281 * casting as a Storage32BaseImpl
284 struct StorageImpl
* ancestorStorage
;
285 ULONG rootPropertySetIndex
;
286 void (*v_destructor
)(struct StorageImpl
*);
289 * The following data members are specific to the Storage32Impl
292 HANDLE hFile
; /* Physical support for the Docfile */
297 WORD bigBlockSizeBits
;
298 WORD smallBlockSizeBits
;
300 ULONG smallBlockSize
;
301 ULONG bigBlockDepotCount
;
302 ULONG rootStartBlock
;
303 ULONG smallBlockDepotStart
;
304 ULONG extBigBlockDepotStart
;
305 ULONG extBigBlockDepotCount
;
306 ULONG bigBlockDepotStart
[COUNT_BBDEPOTINHEADER
];
308 ULONG blockDepotCached
[NUM_BLOCKS_PER_DEPOT_BLOCK
];
309 ULONG indexBlockDepotCached
;
313 * Abstraction of the big block chains for the chains of the header.
315 BlockChainStream
* rootBlockChain
;
316 BlockChainStream
* smallBlockDepotChain
;
317 BlockChainStream
* smallBlockRootChain
;
320 * Pointer to the big block file abstraction
322 BigBlockFile
* bigBlockFile
;
326 * Method declaration for the Storage32Impl class
329 HRESULT WINAPI
StorageImpl_CreateStorage(
331 const OLECHAR
* pwcsName
, /* [string][in] */
332 DWORD grfMode
, /* [in] */
333 DWORD dwStgFmt
, /* [in] */
334 DWORD reserved2
, /* [in] */
335 IStorage
** ppstg
); /* [out] */
337 HRESULT WINAPI
StorageImpl_CopyTo(
339 DWORD ciidExclude
, /* [in] */
340 const IID
* rgiidExclude
, /* [size_is][unique][in] */
341 SNB snbExclude
, /* [unique][in] */
342 IStorage
* pstgDest
); /* [unique][in] */
344 HRESULT WINAPI
StorageImpl_MoveElementTo(
346 const OLECHAR
* pwcsName
, /* [string][in] */
347 IStorage
* pstgDest
, /* [unique][in] */
348 const OLECHAR
* pwcsNewName
, /* [string][in] */
349 DWORD grfFlags
); /* [in] */
351 HRESULT WINAPI
StorageImpl_Commit(
353 DWORD grfCommitFlags
); /* [in] */
355 HRESULT WINAPI
StorageImpl_Revert(
358 HRESULT WINAPI
StorageImpl_DestroyElement(
360 const OLECHAR
* pwcsName
); /* [string][in] */
362 HRESULT WINAPI
StorageImpl_SetElementTimes(
364 const OLECHAR
* pwcsName
, /* [string][in] */
365 const FILETIME
* pctime
, /* [in] */
366 const FILETIME
* patime
, /* [in] */
367 const FILETIME
* pmtime
); /* [in] */
369 HRESULT WINAPI
StorageImpl_SetStateBits(
371 DWORD grfStateBits
, /* [in] */
372 DWORD grfMask
); /* [in] */
374 void StorageImpl_Destroy(
377 HRESULT
StorageImpl_Construct(
384 BOOL
StorageImpl_ReadBigBlock(
389 BOOL
StorageImpl_WriteBigBlock(
394 void* StorageImpl_GetROBigBlock(
398 void* StorageImpl_GetBigBlock(
402 void StorageImpl_ReleaseBigBlock(
406 ULONG
StorageImpl_GetNextFreeBigBlock(
409 void StorageImpl_FreeBigBlock(
413 ULONG
StorageImpl_GetNextBlockInChain(
417 void StorageImpl_SetNextBlockInChain(
422 HRESULT
StorageImpl_LoadFileHeader(
425 void StorageImpl_SaveFileHeader(
428 BOOL
StorageImpl_ReadProperty(
431 StgProperty
* buffer
);
433 BOOL
StorageImpl_WriteProperty(
436 StgProperty
* buffer
);
438 BlockChainStream
* Storage32Impl_SmallBlocksToBigBlocks(
440 SmallBlockChainStream
** ppsbChain
);
442 ULONG
Storage32Impl_GetNextExtendedBlock(StorageImpl
* This
,
445 void Storage32Impl_AddBlockDepot(StorageImpl
* This
,
448 ULONG
Storage32Impl_AddExtBlockDepot(StorageImpl
* This
);
450 ULONG
Storage32Impl_GetExtDepotBlock(StorageImpl
* This
,
453 void Storage32Impl_SetExtDepotBlock(StorageImpl
* This
,
456 /****************************************************************************
457 * Storage32InternalImpl definitions.
459 * Definition of the implementation structure for the IStorage32 interface.
460 * This one implements the IStorage32 interface for storage that are
461 * inside another storage.
463 struct StorageInternalImpl
465 ICOM_VFIELD(IStorage
); /* Needs to be the first item in the stuct
466 * since we want to cast this in a Storage32 pointer */
469 * Declare the member of the Storage32BaseImpl class to allow
470 * casting as a Storage32BaseImpl
473 struct StorageImpl
* ancestorStorage
;
474 ULONG rootPropertySetIndex
;
475 void (*v_destructor
)(struct StorageInternalImpl
*);
478 * There is no specific data for this class.
483 * Method definitions for the Storage32InternalImpl class.
485 StorageInternalImpl
* StorageInternalImpl_Construct(
486 StorageImpl
* ancestorStorage
,
487 ULONG rootTropertyIndex
);
489 void StorageInternalImpl_Destroy(
490 StorageInternalImpl
* This
);
492 HRESULT WINAPI
StorageInternalImpl_Commit(
494 DWORD grfCommitFlags
); /* [in] */
496 HRESULT WINAPI
StorageInternalImpl_Revert(
500 /****************************************************************************
501 * IEnumSTATSTGImpl definitions.
503 * Definition of the implementation structure for the IEnumSTATSTGImpl interface.
504 * This class allows iterating through the content of a storage and to find
505 * specific items inside it.
507 struct IEnumSTATSTGImpl
509 ICOM_VFIELD(IEnumSTATSTG
); /* Needs to be the first item in the stuct
510 * since we want to cast this in a IEnumSTATSTG pointer */
512 ULONG ref
; /* Reference count */
513 StorageImpl
* parentStorage
; /* Reference to the parent storage */
514 ULONG firstPropertyNode
; /* Index of the root of the storage to enumerate */
517 * The current implementation of the IEnumSTATSTGImpl class uses a stack
518 * to walk the property sets to get the content of a storage. This stack
519 * is implemented by the following 3 data members
525 #define ENUMSTATSGT_SIZE_INCREMENT 10
529 * Method definitions for the IEnumSTATSTGImpl class.
531 HRESULT WINAPI
IEnumSTATSTGImpl_QueryInterface(
536 ULONG WINAPI
IEnumSTATSTGImpl_AddRef(
537 IEnumSTATSTG
* iface
);
539 ULONG WINAPI
IEnumSTATSTGImpl_Release(
540 IEnumSTATSTG
* iface
);
542 HRESULT WINAPI
IEnumSTATSTGImpl_Next(
546 ULONG
* pceltFetched
);
548 HRESULT WINAPI
IEnumSTATSTGImpl_Skip(
552 HRESULT WINAPI
IEnumSTATSTGImpl_Reset(
553 IEnumSTATSTG
* iface
);
555 HRESULT WINAPI
IEnumSTATSTGImpl_Clone(
557 IEnumSTATSTG
** ppenum
);
559 IEnumSTATSTGImpl
* IEnumSTATSTGImpl_Construct(
561 ULONG firstPropertyNode
);
563 void IEnumSTATSTGImpl_Destroy(
564 IEnumSTATSTGImpl
* This
);
566 void IEnumSTATSTGImpl_PushSearchNode(
567 IEnumSTATSTGImpl
* This
,
570 ULONG
IEnumSTATSTGImpl_PopSearchNode(
571 IEnumSTATSTGImpl
* This
,
574 ULONG
IEnumSTATSTGImpl_FindProperty(
575 IEnumSTATSTGImpl
* This
,
576 const OLECHAR
* lpszPropName
,
577 StgProperty
* buffer
);
579 INT
IEnumSTATSTGImpl_FindParentProperty(
580 IEnumSTATSTGImpl
*This
,
582 StgProperty
*currentProperty
,
586 /****************************************************************************
587 * StgStreamImpl definitions.
589 * This class imlements the IStream32 inteface and represents a stream
590 * located inside a storage object.
594 ICOM_VFIELD(IStream
); /* Needs to be the first item in the stuct
595 * since we want to cast this in a IStream pointer */
603 * Storage that is the parent(owner) of the stream
605 StorageBaseImpl
* parentStorage
;
608 * Index of the property that owns (points to) this stream.
613 * Helper variable that contains the size of the stream
615 ULARGE_INTEGER streamSize
;
618 * This is the current position of the cursor in the stream
620 ULARGE_INTEGER currentPosition
;
623 * The information in the stream is represented by a chain of small blocks
624 * or a chain of large blocks. Depending on the case, one of the two
625 * following variabled points to that information.
627 BlockChainStream
* bigBlockChain
;
628 SmallBlockChainStream
* smallBlockChain
;
633 * Method definition for the StgStreamImpl class.
635 StgStreamImpl
* StgStreamImpl_Construct(
636 StorageBaseImpl
* parentStorage
,
637 ULONG ownerProperty
);
639 void StgStreamImpl_Destroy(
640 StgStreamImpl
* This
);
642 void StgStreamImpl_OpenBlockChain(
643 StgStreamImpl
* This
);
645 HRESULT WINAPI
StgStreamImpl_QueryInterface(
647 REFIID riid
, /* [in] */
648 void** ppvObject
); /* [iid_is][out] */
650 ULONG WINAPI
StgStreamImpl_AddRef(
653 ULONG WINAPI
StgStreamImpl_Release(
656 HRESULT WINAPI
StgStreamImpl_Read(
658 void* pv
, /* [length_is][size_is][out] */
660 ULONG
* pcbRead
); /* [out] */
662 HRESULT WINAPI
StgStreamImpl_Write(
664 const void* pv
, /* [size_is][in] */
666 ULONG
* pcbWritten
); /* [out] */
668 HRESULT WINAPI
StgStreamImpl_Seek(
670 LARGE_INTEGER dlibMove
, /* [in] */
671 DWORD dwOrigin
, /* [in] */
672 ULARGE_INTEGER
* plibNewPosition
); /* [out] */
674 HRESULT WINAPI
StgStreamImpl_SetSize(
676 ULARGE_INTEGER libNewSize
); /* [in] */
678 HRESULT WINAPI
StgStreamImpl_CopyTo(
680 IStream
* pstm
, /* [unique][in] */
681 ULARGE_INTEGER cb
, /* [in] */
682 ULARGE_INTEGER
* pcbRead
, /* [out] */
683 ULARGE_INTEGER
* pcbWritten
); /* [out] */
685 HRESULT WINAPI
StgStreamImpl_Commit(
687 DWORD grfCommitFlags
); /* [in] */
689 HRESULT WINAPI
StgStreamImpl_Revert(
692 HRESULT WINAPI
StgStreamImpl_LockRegion(
694 ULARGE_INTEGER libOffset
, /* [in] */
695 ULARGE_INTEGER cb
, /* [in] */
696 DWORD dwLockType
); /* [in] */
698 HRESULT WINAPI
StgStreamImpl_UnlockRegion(
700 ULARGE_INTEGER libOffset
, /* [in] */
701 ULARGE_INTEGER cb
, /* [in] */
702 DWORD dwLockType
); /* [in] */
704 HRESULT WINAPI
StgStreamImpl_Stat(
706 STATSTG
* pstatstg
, /* [out] */
707 DWORD grfStatFlag
); /* [in] */
709 HRESULT WINAPI
StgStreamImpl_Clone(
711 IStream
** ppstm
); /* [out] */
714 /********************************************************************************
715 * The StorageUtl_ functions are miscelaneous utility functions. Most of which are
716 * abstractions used to read values from file buffers without having to worry
719 void StorageUtl_ReadWord(void* buffer
, ULONG offset
, WORD
* value
);
720 void StorageUtl_WriteWord(void* buffer
, ULONG offset
, WORD value
);
721 void StorageUtl_ReadDWord(void* buffer
, ULONG offset
, DWORD
* value
);
722 void StorageUtl_WriteDWord(void* buffer
, ULONG offset
, DWORD value
);
723 void StorageUtl_ReadGUID(void* buffer
, ULONG offset
, GUID
* value
);
724 void StorageUtl_WriteGUID(void* buffer
, ULONG offset
, GUID
* value
);
725 void StorageUtl_CopyPropertyToSTATSTG(STATSTG
* destination
,
729 /****************************************************************************
730 * BlockChainStream definitions.
732 * The BlockChainStream class is a utility class that is used to create an
733 * abstraction of the big block chains in the storage file.
735 struct BlockChainStream
737 StorageImpl
* parentStorage
;
738 ULONG
* headOfStreamPlaceHolder
;
739 ULONG ownerPropertyIndex
;
740 ULONG lastBlockNoInSequence
;
741 ULONG lastBlockNoInSequenceIndex
;
747 * Methods for the BlockChainStream class.
749 BlockChainStream
* BlockChainStream_Construct(
750 StorageImpl
* parentStorage
,
751 ULONG
* headOfStreamPlaceHolder
,
752 ULONG propertyIndex
);
754 void BlockChainStream_Destroy(
755 BlockChainStream
* This
);
757 ULONG
BlockChainStream_GetHeadOfChain(
758 BlockChainStream
* This
);
760 BOOL
BlockChainStream_ReadAt(
761 BlockChainStream
* This
,
762 ULARGE_INTEGER offset
,
767 BOOL
BlockChainStream_WriteAt(
768 BlockChainStream
* This
,
769 ULARGE_INTEGER offset
,
772 ULONG
* bytesWritten
);
774 BOOL
BlockChainStream_SetSize(
775 BlockChainStream
* This
,
776 ULARGE_INTEGER newSize
);
778 ULARGE_INTEGER
BlockChainStream_GetSize(
779 BlockChainStream
* This
);
781 ULONG
BlockChainStream_GetCount(
782 BlockChainStream
* This
);
784 /****************************************************************************
785 * SmallBlockChainStream definitions.
787 * The SmallBlockChainStream class is a utility class that is used to create an
788 * abstraction of the small block chains in the storage file.
790 struct SmallBlockChainStream
792 StorageImpl
* parentStorage
;
793 ULONG ownerPropertyIndex
;
797 * Methods of the SmallBlockChainStream class.
799 SmallBlockChainStream
* SmallBlockChainStream_Construct(
800 StorageImpl
* parentStorage
,
801 ULONG propertyIndex
);
803 void SmallBlockChainStream_Destroy(
804 SmallBlockChainStream
* This
);
806 ULONG
SmallBlockChainStream_GetHeadOfChain(
807 SmallBlockChainStream
* This
);
809 ULONG
SmallBlockChainStream_GetNextBlockInChain(
810 SmallBlockChainStream
* This
,
813 void SmallBlockChainStream_SetNextBlockInChain(
814 SmallBlockChainStream
* This
,
818 void SmallBlockChainStream_FreeBlock(
819 SmallBlockChainStream
* This
,
822 ULONG
SmallBlockChainStream_GetNextFreeBlock(
823 SmallBlockChainStream
* This
);
825 BOOL
SmallBlockChainStream_ReadAt(
826 SmallBlockChainStream
* This
,
827 ULARGE_INTEGER offset
,
832 BOOL
SmallBlockChainStream_WriteAt(
833 SmallBlockChainStream
* This
,
834 ULARGE_INTEGER offset
,
837 ULONG
* bytesWritten
);
839 BOOL
SmallBlockChainStream_SetSize(
840 SmallBlockChainStream
* This
,
841 ULARGE_INTEGER newSize
);
843 ULARGE_INTEGER
SmallBlockChainStream_GetSize(
844 SmallBlockChainStream
* This
);
846 ULONG
SmallBlockChainStream_GetCount(
847 SmallBlockChainStream
* This
);
850 #endif /* __STORAGE32_H__ */