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 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 2.1 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with this library; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #ifndef __STORAGE32_H__
30 #define __STORAGE32_H__
34 #include "wine/obj_base.h"
35 #include "wine/obj_storage.h"
38 * Definitions for the file format offsets.
40 static const ULONG OFFSET_BIGBLOCKSIZEBITS = 0x0000001e;
41 static const ULONG OFFSET_SMALLBLOCKSIZEBITS = 0x00000020;
42 static const ULONG OFFSET_BBDEPOTCOUNT = 0x0000002C;
43 static const ULONG OFFSET_ROOTSTARTBLOCK = 0x00000030;
44 static const ULONG OFFSET_SBDEPOTSTART = 0x0000003C;
45 static const ULONG OFFSET_EXTBBDEPOTSTART = 0x00000044;
46 static const ULONG OFFSET_EXTBBDEPOTCOUNT = 0x00000048;
47 static const ULONG OFFSET_BBDEPOTSTART = 0x0000004C;
48 static const ULONG OFFSET_PS_NAME = 0x00000000;
49 static const ULONG OFFSET_PS_NAMELENGTH = 0x00000040;
50 static const ULONG OFFSET_PS_PROPERTYTYPE = 0x00000042;
51 static const ULONG OFFSET_PS_PREVIOUSPROP = 0x00000044;
52 static const ULONG OFFSET_PS_NEXTPROP = 0x00000048;
53 static const ULONG OFFSET_PS_DIRPROP = 0x0000004C;
54 static const ULONG OFFSET_PS_GUID = 0x00000050;
55 static const ULONG OFFSET_PS_TSS1 = 0x00000064;
56 static const ULONG OFFSET_PS_TSD1 = 0x00000068;
57 static const ULONG OFFSET_PS_TSS2 = 0x0000006C;
58 static const ULONG OFFSET_PS_TSD2 = 0x00000070;
59 static const ULONG OFFSET_PS_STARTBLOCK = 0x00000074;
60 static const ULONG OFFSET_PS_SIZE = 0x00000078;
61 static const WORD DEF_BIG_BLOCK_SIZE_BITS = 0x0009;
62 static const WORD DEF_SMALL_BLOCK_SIZE_BITS = 0x0006;
63 static const WORD DEF_BIG_BLOCK_SIZE = 0x0200;
64 static const WORD DEF_SMALL_BLOCK_SIZE = 0x0040;
65 static const ULONG BLOCK_EXTBBDEPOT = 0xFFFFFFFC;
66 static const ULONG BLOCK_SPECIAL = 0xFFFFFFFD;
67 static const ULONG BLOCK_END_OF_CHAIN = 0xFFFFFFFE;
68 static const ULONG BLOCK_UNUSED = 0xFFFFFFFF;
69 static const ULONG PROPERTY_NULL = 0xFFFFFFFF;
71 #define PROPERTY_NAME_MAX_LEN 0x20
72 #define PROPERTY_NAME_BUFFER_LEN 0x40
74 #define PROPSET_BLOCK_SIZE 0x00000080
77 * Property type of relation
79 #define PROPERTY_RELATION_PREVIOUS 0
80 #define PROPERTY_RELATION_NEXT 1
81 #define PROPERTY_RELATION_DIR 2
84 * Property type constants
86 #define PROPTYPE_STORAGE 0x01
87 #define PROPTYPE_STREAM 0x02
88 #define PROPTYPE_ROOT 0x05
91 * These defines assume a hardcoded blocksize. The code will assert
92 * if the blocksize is different. Some changes will have to be done if it
95 #define BIG_BLOCK_SIZE 0x200
96 #define COUNT_BBDEPOTINHEADER 109
97 #define LIMIT_TO_USE_SMALL_BLOCK 0x1000
98 #define NUM_BLOCKS_PER_DEPOT_BLOCK 128
101 * These are signatures to detect the type of Document file.
103 static const BYTE STORAGE_magic[8] ={0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1};
104 static const BYTE STORAGE_oldmagic[8] ={0xd0,0xcf,0x11,0xe0,0x0e,0x11,0xfc,0x0d};
107 * Forward declarations of all the structures used by the storage
110 typedef struct StorageBaseImpl StorageBaseImpl;
111 typedef struct StorageImpl StorageImpl;
112 typedef struct StorageInternalImpl StorageInternalImpl;
113 typedef struct BlockChainStream BlockChainStream;
114 typedef struct SmallBlockChainStream SmallBlockChainStream;
115 typedef struct IEnumSTATSTGImpl IEnumSTATSTGImpl;
116 typedef struct StgProperty StgProperty;
117 typedef struct StgStreamImpl StgStreamImpl;
120 * This utility structure is used to read/write the information in a storage
125 WCHAR name[PROPERTY_NAME_MAX_LEN];
126 WORD sizeOfNameString;
128 ULONG previousProperty;
131 GUID propertyUniqueID;
140 /*************************************************************************
141 * Big Block File support
143 * The big block file is an abstraction of a flat file separated in
144 * same sized blocks. The implementation for the methods described in
145 * this section appear in stg_bigblockfile.c
149 * Declaration of the data structures
151 typedef struct BigBlockFile BigBlockFile,*LPBIGBLOCKFILE;
152 typedef struct MappedPage MappedPage,*LPMAPPEDPAGE;
157 ULARGE_INTEGER filesize;
163 MappedPage *victimhead, *victimtail;
164 ULONG num_victim_pages;
171 * Declaration of the functions used to manipulate the BigBlockFile
174 BigBlockFile* BIGBLOCKFILE_Construct(HANDLE hFile,
179 void BIGBLOCKFILE_Destructor(LPBIGBLOCKFILE This);
180 void* BIGBLOCKFILE_GetBigBlock(LPBIGBLOCKFILE This, ULONG index);
181 void* BIGBLOCKFILE_GetROBigBlock(LPBIGBLOCKFILE This, ULONG index);
182 void BIGBLOCKFILE_ReleaseBigBlock(LPBIGBLOCKFILE This, void *pBlock);
183 void BIGBLOCKFILE_SetSize(LPBIGBLOCKFILE This, ULARGE_INTEGER newSize);
184 ULARGE_INTEGER BIGBLOCKFILE_GetSize(LPBIGBLOCKFILE This);
186 /*************************************************************************
187 * Ole Convert support
190 void OLECONVERT_CreateOleStream(LPSTORAGE pStorage);
191 HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName);
193 /****************************************************************************
194 * Storage32BaseImpl definitions.
196 * This structure defines the base information contained in all implementations
197 * of IStorage32 contained in this file storage implementation.
199 * In OOP terms, this is the base class for all the IStorage32 implementations
200 * contained in this file.
202 struct StorageBaseImpl
204 ICOM_VFIELD(IStorage); /* Needs to be the first item in the struct
205 * since we want to cast this in a Storage32 pointer */
208 * Reference count of this object
213 * Ancestor storage (top level)
215 StorageImpl* ancestorStorage;
218 * Index of the property for the root of
221 ULONG rootPropertySetIndex;
224 * virtual Destructor method.
226 void (*v_destructor)(StorageBaseImpl*);
231 * Prototypes for the methods of the Storage32BaseImpl class.
233 HRESULT WINAPI StorageBaseImpl_QueryInterface(
238 ULONG WINAPI StorageBaseImpl_AddRef(
241 ULONG WINAPI StorageBaseImpl_Release(
244 HRESULT WINAPI StorageBaseImpl_OpenStream(
246 const OLECHAR* pwcsName, /* [string][in] */
247 void* reserved1, /* [unique][in] */
248 DWORD grfMode, /* [in] */
249 DWORD reserved2, /* [in] */
250 IStream** ppstm); /* [out] */
252 HRESULT WINAPI StorageBaseImpl_OpenStorage(
254 const OLECHAR* pwcsName, /* [string][unique][in] */
255 IStorage* pstgPriority, /* [unique][in] */
256 DWORD grfMode, /* [in] */
257 SNB snbExclude, /* [unique][in] */
258 DWORD reserved, /* [in] */
259 IStorage** ppstg); /* [out] */
261 HRESULT WINAPI StorageBaseImpl_EnumElements(
263 DWORD reserved1, /* [in] */
264 void* reserved2, /* [size_is][unique][in] */
265 DWORD reserved3, /* [in] */
266 IEnumSTATSTG** ppenum); /* [out] */
268 HRESULT WINAPI StorageBaseImpl_Stat(
270 STATSTG* pstatstg, /* [out] */
271 DWORD grfStatFlag); /* [in] */
273 HRESULT WINAPI StorageBaseImpl_RenameElement(
275 const OLECHAR* pwcsOldName, /* [string][in] */
276 const OLECHAR* pwcsNewName); /* [string][in] */
278 HRESULT WINAPI StorageBaseImpl_CreateStream(
280 const OLECHAR* pwcsName, /* [string][in] */
281 DWORD grfMode, /* [in] */
282 DWORD reserved1, /* [in] */
283 DWORD reserved2, /* [in] */
284 IStream** ppstm); /* [out] */
286 HRESULT WINAPI StorageBaseImpl_SetClass(
288 REFCLSID clsid); /* [in] */
290 /****************************************************************************
291 * Storage32Impl definitions.
293 * This implementation of the IStorage32 interface represents a root
294 * storage. Basically, a document file.
298 ICOM_VFIELD(IStorage); /* Needs to be the first item in the struct
299 * since we want to cast this in a Storage32 pointer */
302 * Declare the member of the Storage32BaseImpl class to allow
303 * casting as a Storage32BaseImpl
306 struct StorageImpl* ancestorStorage;
307 ULONG rootPropertySetIndex;
308 void (*v_destructor)(struct StorageImpl*);
311 * The following data members are specific to the Storage32Impl
314 HANDLE hFile; /* Physical support for the Docfile */
315 LPOLESTR pwcsName; /* Full path of the document file */
317 /* FIXME: should this be in Storage32BaseImpl ? */
318 WCHAR filename[PROPERTY_NAME_BUFFER_LEN];
323 WORD bigBlockSizeBits;
324 WORD smallBlockSizeBits;
326 ULONG smallBlockSize;
327 ULONG bigBlockDepotCount;
328 ULONG rootStartBlock;
329 ULONG smallBlockDepotStart;
330 ULONG extBigBlockDepotStart;
331 ULONG extBigBlockDepotCount;
332 ULONG bigBlockDepotStart[COUNT_BBDEPOTINHEADER];
334 ULONG blockDepotCached[NUM_BLOCKS_PER_DEPOT_BLOCK];
335 ULONG indexBlockDepotCached;
339 * Abstraction of the big block chains for the chains of the header.
341 BlockChainStream* rootBlockChain;
342 BlockChainStream* smallBlockDepotChain;
343 BlockChainStream* smallBlockRootChain;
346 * Pointer to the big block file abstraction
348 BigBlockFile* bigBlockFile;
352 * Method declaration for the Storage32Impl class
355 HRESULT WINAPI StorageImpl_CreateStorage(
357 const OLECHAR* pwcsName, /* [string][in] */
358 DWORD grfMode, /* [in] */
359 DWORD dwStgFmt, /* [in] */
360 DWORD reserved2, /* [in] */
361 IStorage** ppstg); /* [out] */
363 HRESULT WINAPI StorageImpl_CopyTo(
365 DWORD ciidExclude, /* [in] */
366 const IID* rgiidExclude, /* [size_is][unique][in] */
367 SNB snbExclude, /* [unique][in] */
368 IStorage* pstgDest); /* [unique][in] */
370 HRESULT WINAPI StorageImpl_MoveElementTo(
372 const OLECHAR* pwcsName, /* [string][in] */
373 IStorage* pstgDest, /* [unique][in] */
374 const OLECHAR* pwcsNewName, /* [string][in] */
375 DWORD grfFlags); /* [in] */
377 HRESULT WINAPI StorageImpl_Commit(
379 DWORD grfCommitFlags); /* [in] */
381 HRESULT WINAPI StorageImpl_Revert(
384 HRESULT WINAPI StorageImpl_DestroyElement(
386 const OLECHAR* pwcsName); /* [string][in] */
388 HRESULT WINAPI StorageImpl_SetElementTimes(
390 const OLECHAR* pwcsName, /* [string][in] */
391 const FILETIME* pctime, /* [in] */
392 const FILETIME* patime, /* [in] */
393 const FILETIME* pmtime); /* [in] */
395 HRESULT WINAPI StorageImpl_SetStateBits(
397 DWORD grfStateBits, /* [in] */
398 DWORD grfMask); /* [in] */
400 HRESULT WINAPI StorageImpl_Stat(IStorage* iface,
401 STATSTG* pstatstg, /* [out] */
402 DWORD grfStatFlag); /* [in] */
404 void StorageImpl_Destroy(
407 HRESULT StorageImpl_Construct(
416 BOOL StorageImpl_ReadBigBlock(
421 BOOL StorageImpl_WriteBigBlock(
426 void* StorageImpl_GetROBigBlock(
430 void* StorageImpl_GetBigBlock(
434 void StorageImpl_ReleaseBigBlock(
438 ULONG StorageImpl_GetNextFreeBigBlock(
441 void StorageImpl_FreeBigBlock(
445 ULONG StorageImpl_GetNextBlockInChain(
449 void StorageImpl_SetNextBlockInChain(
454 HRESULT StorageImpl_LoadFileHeader(
457 void StorageImpl_SaveFileHeader(
460 BOOL StorageImpl_ReadProperty(
463 StgProperty* buffer);
465 BOOL StorageImpl_WriteProperty(
468 StgProperty* buffer);
470 BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
472 SmallBlockChainStream** ppsbChain);
474 ULONG Storage32Impl_GetNextExtendedBlock(StorageImpl* This,
477 void Storage32Impl_AddBlockDepot(StorageImpl* This,
480 ULONG Storage32Impl_AddExtBlockDepot(StorageImpl* This);
482 ULONG Storage32Impl_GetExtDepotBlock(StorageImpl* This,
485 void Storage32Impl_SetExtDepotBlock(StorageImpl* This,
488 /****************************************************************************
489 * Storage32InternalImpl definitions.
491 * Definition of the implementation structure for the IStorage32 interface.
492 * This one implements the IStorage32 interface for storage that are
493 * inside another storage.
495 struct StorageInternalImpl
497 ICOM_VFIELD(IStorage); /* Needs to be the first item in the struct
498 * since we want to cast this in a Storage32 pointer */
501 * Declare the member of the Storage32BaseImpl class to allow
502 * casting as a Storage32BaseImpl
505 struct StorageImpl* ancestorStorage;
506 ULONG rootPropertySetIndex;
507 void (*v_destructor)(struct StorageInternalImpl*);
510 * There is no specific data for this class.
515 * Method definitions for the Storage32InternalImpl class.
517 StorageInternalImpl* StorageInternalImpl_Construct(
518 StorageImpl* ancestorStorage,
519 ULONG rootTropertyIndex);
521 void StorageInternalImpl_Destroy(
522 StorageInternalImpl* This);
524 HRESULT WINAPI StorageInternalImpl_Commit(
526 DWORD grfCommitFlags); /* [in] */
528 HRESULT WINAPI StorageInternalImpl_Revert(
532 /****************************************************************************
533 * IEnumSTATSTGImpl definitions.
535 * Definition of the implementation structure for the IEnumSTATSTGImpl interface.
536 * This class allows iterating through the content of a storage and to find
537 * specific items inside it.
539 struct IEnumSTATSTGImpl
541 ICOM_VFIELD(IEnumSTATSTG); /* Needs to be the first item in the struct
542 * since we want to cast this in a IEnumSTATSTG pointer */
544 ULONG ref; /* Reference count */
545 StorageImpl* parentStorage; /* Reference to the parent storage */
546 ULONG firstPropertyNode; /* Index of the root of the storage to enumerate */
549 * The current implementation of the IEnumSTATSTGImpl class uses a stack
550 * to walk the property sets to get the content of a storage. This stack
551 * is implemented by the following 3 data members
557 #define ENUMSTATSGT_SIZE_INCREMENT 10
561 * Method definitions for the IEnumSTATSTGImpl class.
563 HRESULT WINAPI IEnumSTATSTGImpl_QueryInterface(
568 ULONG WINAPI IEnumSTATSTGImpl_AddRef(
569 IEnumSTATSTG* iface);
571 ULONG WINAPI IEnumSTATSTGImpl_Release(
572 IEnumSTATSTG* iface);
574 HRESULT WINAPI IEnumSTATSTGImpl_Next(
578 ULONG* pceltFetched);
580 HRESULT WINAPI IEnumSTATSTGImpl_Skip(
584 HRESULT WINAPI IEnumSTATSTGImpl_Reset(
585 IEnumSTATSTG* iface);
587 HRESULT WINAPI IEnumSTATSTGImpl_Clone(
589 IEnumSTATSTG** ppenum);
591 IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(
593 ULONG firstPropertyNode);
595 void IEnumSTATSTGImpl_Destroy(
596 IEnumSTATSTGImpl* This);
598 void IEnumSTATSTGImpl_PushSearchNode(
599 IEnumSTATSTGImpl* This,
602 ULONG IEnumSTATSTGImpl_PopSearchNode(
603 IEnumSTATSTGImpl* This,
606 ULONG IEnumSTATSTGImpl_FindProperty(
607 IEnumSTATSTGImpl* This,
608 const OLECHAR* lpszPropName,
609 StgProperty* buffer);
611 INT IEnumSTATSTGImpl_FindParentProperty(
612 IEnumSTATSTGImpl *This,
614 StgProperty *currentProperty,
618 /****************************************************************************
619 * StgStreamImpl definitions.
621 * This class imlements the IStream32 inteface and represents a stream
622 * located inside a storage object.
626 ICOM_VFIELD(IStream); /* Needs to be the first item in the struct
627 * since we want to cast this in a IStream pointer */
635 * Storage that is the parent(owner) of the stream
637 StorageBaseImpl* parentStorage;
640 * Access mode of this stream.
645 * Index of the property that owns (points to) this stream.
650 * Helper variable that contains the size of the stream
652 ULARGE_INTEGER streamSize;
655 * This is the current position of the cursor in the stream
657 ULARGE_INTEGER currentPosition;
660 * The information in the stream is represented by a chain of small blocks
661 * or a chain of large blocks. Depending on the case, one of the two
662 * following variabled points to that information.
664 BlockChainStream* bigBlockChain;
665 SmallBlockChainStream* smallBlockChain;
669 * Method definition for the StgStreamImpl class.
671 StgStreamImpl* StgStreamImpl_Construct(
672 StorageBaseImpl* parentStorage,
674 ULONG ownerProperty);
676 void StgStreamImpl_Destroy(
677 StgStreamImpl* This);
679 void StgStreamImpl_OpenBlockChain(
680 StgStreamImpl* This);
682 HRESULT WINAPI StgStreamImpl_QueryInterface(
684 REFIID riid, /* [in] */
685 void** ppvObject); /* [iid_is][out] */
687 ULONG WINAPI StgStreamImpl_AddRef(
690 ULONG WINAPI StgStreamImpl_Release(
693 HRESULT WINAPI StgStreamImpl_Read(
695 void* pv, /* [length_is][size_is][out] */
697 ULONG* pcbRead); /* [out] */
699 HRESULT WINAPI StgStreamImpl_Write(
701 const void* pv, /* [size_is][in] */
703 ULONG* pcbWritten); /* [out] */
705 HRESULT WINAPI StgStreamImpl_Seek(
707 LARGE_INTEGER dlibMove, /* [in] */
708 DWORD dwOrigin, /* [in] */
709 ULARGE_INTEGER* plibNewPosition); /* [out] */
711 HRESULT WINAPI StgStreamImpl_SetSize(
713 ULARGE_INTEGER libNewSize); /* [in] */
715 HRESULT WINAPI StgStreamImpl_CopyTo(
717 IStream* pstm, /* [unique][in] */
718 ULARGE_INTEGER cb, /* [in] */
719 ULARGE_INTEGER* pcbRead, /* [out] */
720 ULARGE_INTEGER* pcbWritten); /* [out] */
722 HRESULT WINAPI StgStreamImpl_Commit(
724 DWORD grfCommitFlags); /* [in] */
726 HRESULT WINAPI StgStreamImpl_Revert(
729 HRESULT WINAPI StgStreamImpl_LockRegion(
731 ULARGE_INTEGER libOffset, /* [in] */
732 ULARGE_INTEGER cb, /* [in] */
733 DWORD dwLockType); /* [in] */
735 HRESULT WINAPI StgStreamImpl_UnlockRegion(
737 ULARGE_INTEGER libOffset, /* [in] */
738 ULARGE_INTEGER cb, /* [in] */
739 DWORD dwLockType); /* [in] */
741 HRESULT WINAPI StgStreamImpl_Stat(
743 STATSTG* pstatstg, /* [out] */
744 DWORD grfStatFlag); /* [in] */
746 HRESULT WINAPI StgStreamImpl_Clone(
748 IStream** ppstm); /* [out] */
751 /********************************************************************************
752 * The StorageUtl_ functions are miscelaneous utility functions. Most of which are
753 * abstractions used to read values from file buffers without having to worry
756 void StorageUtl_ReadWord(void* buffer, ULONG offset, WORD* value);
757 void StorageUtl_WriteWord(void* buffer, ULONG offset, WORD value);
758 void StorageUtl_ReadDWord(void* buffer, ULONG offset, DWORD* value);
759 void StorageUtl_WriteDWord(void* buffer, ULONG offset, DWORD value);
760 void StorageUtl_ReadGUID(void* buffer, ULONG offset, GUID* value);
761 void StorageUtl_WriteGUID(void* buffer, ULONG offset, GUID* value);
762 void StorageUtl_CopyPropertyToSTATSTG(STATSTG* destination,
766 /****************************************************************************
767 * BlockChainStream definitions.
769 * The BlockChainStream class is a utility class that is used to create an
770 * abstraction of the big block chains in the storage file.
772 struct BlockChainStream
774 StorageImpl* parentStorage;
775 ULONG* headOfStreamPlaceHolder;
776 ULONG ownerPropertyIndex;
777 ULONG lastBlockNoInSequence;
778 ULONG lastBlockNoInSequenceIndex;
784 * Methods for the BlockChainStream class.
786 BlockChainStream* BlockChainStream_Construct(
787 StorageImpl* parentStorage,
788 ULONG* headOfStreamPlaceHolder,
789 ULONG propertyIndex);
791 void BlockChainStream_Destroy(
792 BlockChainStream* This);
794 ULONG BlockChainStream_GetHeadOfChain(
795 BlockChainStream* This);
797 BOOL BlockChainStream_ReadAt(
798 BlockChainStream* This,
799 ULARGE_INTEGER offset,
804 BOOL BlockChainStream_WriteAt(
805 BlockChainStream* This,
806 ULARGE_INTEGER offset,
809 ULONG* bytesWritten);
811 BOOL BlockChainStream_SetSize(
812 BlockChainStream* This,
813 ULARGE_INTEGER newSize);
815 ULARGE_INTEGER BlockChainStream_GetSize(
816 BlockChainStream* This);
818 ULONG BlockChainStream_GetCount(
819 BlockChainStream* This);
821 /****************************************************************************
822 * SmallBlockChainStream definitions.
824 * The SmallBlockChainStream class is a utility class that is used to create an
825 * abstraction of the small block chains in the storage file.
827 struct SmallBlockChainStream
829 StorageImpl* parentStorage;
830 ULONG ownerPropertyIndex;
834 * Methods of the SmallBlockChainStream class.
836 SmallBlockChainStream* SmallBlockChainStream_Construct(
837 StorageImpl* parentStorage,
838 ULONG propertyIndex);
840 void SmallBlockChainStream_Destroy(
841 SmallBlockChainStream* This);
843 ULONG SmallBlockChainStream_GetHeadOfChain(
844 SmallBlockChainStream* This);
846 ULONG SmallBlockChainStream_GetNextBlockInChain(
847 SmallBlockChainStream* This,
850 void SmallBlockChainStream_SetNextBlockInChain(
851 SmallBlockChainStream* This,
855 void SmallBlockChainStream_FreeBlock(
856 SmallBlockChainStream* This,
859 ULONG SmallBlockChainStream_GetNextFreeBlock(
860 SmallBlockChainStream* This);
862 BOOL SmallBlockChainStream_ReadAt(
863 SmallBlockChainStream* This,
864 ULARGE_INTEGER offset,
869 BOOL SmallBlockChainStream_WriteAt(
870 SmallBlockChainStream* This,
871 ULARGE_INTEGER offset,
874 ULONG* bytesWritten);
876 BOOL SmallBlockChainStream_SetSize(
877 SmallBlockChainStream* This,
878 ULARGE_INTEGER newSize);
880 ULARGE_INTEGER SmallBlockChainStream_GetSize(
881 SmallBlockChainStream* This);
883 ULONG SmallBlockChainStream_GetCount(
884 SmallBlockChainStream* This);
887 #endif /* __STORAGE32_H__ */