- Add Wow64* functions declarations to winbase.h
[reactos.git] / reactos / dll / win32 / ole32 / storage32.h
index fad5d77..36a7d67 100644 (file)
@@ -46,6 +46,7 @@ static const ULONG OFFSET_BIGBLOCKSIZEBITS   = 0x0000001e;
 static const ULONG OFFSET_SMALLBLOCKSIZEBITS = 0x00000020;
 static const ULONG OFFSET_BBDEPOTCOUNT      = 0x0000002C;
 static const ULONG OFFSET_ROOTSTARTBLOCK     = 0x00000030;
+static const ULONG OFFSET_SMALLBLOCKLIMIT    = 0x00000038;
 static const ULONG OFFSET_SBDEPOTSTART      = 0x0000003C;
 static const ULONG OFFSET_SBDEPOTCOUNT       = 0x00000040;
 static const ULONG OFFSET_EXTBBDEPOTSTART    = 0x00000044;
@@ -65,6 +66,8 @@ static const ULONG OFFSET_PS_MTIMEHIGH       = 0x00000070;
 static const ULONG OFFSET_PS_STARTBLOCK             = 0x00000074;
 static const ULONG OFFSET_PS_SIZE           = 0x00000078;
 static const WORD  DEF_BIG_BLOCK_SIZE_BITS   = 0x0009;
+static const WORD  MIN_BIG_BLOCK_SIZE_BITS   = 0x0009;
+static const WORD  MAX_BIG_BLOCK_SIZE_BITS   = 0x000c;
 static const WORD  DEF_SMALL_BLOCK_SIZE_BITS = 0x0006;
 static const WORD  DEF_BIG_BLOCK_SIZE        = 0x0200;
 static const WORD  DEF_SMALL_BLOCK_SIZE      = 0x0040;
@@ -97,6 +100,8 @@ static const ULONG DIRENTRY_NULL             = 0xFFFFFFFF;
 #define STGTY_ROOT 0x05
 
 #define COUNT_BBDEPOTINHEADER    109
+
+/* FIXME: This value is stored in the header, but we hard-code it to 0x1000. */
 #define LIMIT_TO_USE_SMALL_BLOCK 0x1000
 
 #define STGM_ACCESS_MODE(stgm)   ((stgm)&0x0000f)
@@ -351,6 +356,7 @@ struct StorageImpl
   ULONG smallBlockSize;
   ULONG bigBlockDepotCount;
   ULONG rootStartBlock;
+  ULONG smallBlockLimit;
   ULONG smallBlockDepotStart;
   ULONG extBigBlockDepotStart;
   ULONG extBigBlockDepotCount;
@@ -360,6 +366,9 @@ struct StorageImpl
   ULONG indexBlockDepotCached;
   ULONG prevFreeBlock;
 
+  /* All small blocks before this one are known to be in use. */
+  ULONG firstFreeSmallBlock;
+
   /*
    * Abstraction of the big block chains for the chains of the header.
    */