30 #ifndef __STORAGE32_H__ 31 #define __STORAGE32_H__ 41 #include "wine/list.h" 88 #define DIRENTRY_NAME_MAX_LEN 0x20 89 #define DIRENTRY_NAME_BUFFER_LEN 0x40 91 #define RAW_DIRENTRY_SIZE 0x00000080 93 #define HEADER_SIZE 512 95 #define MIN_BIG_BLOCK_SIZE 0x200 96 #define MAX_BIG_BLOCK_SIZE 0x1000 101 #define DIRENTRY_RELATION_PREVIOUS 0 102 #define DIRENTRY_RELATION_NEXT 1 103 #define DIRENTRY_RELATION_DIR 2 108 #define STGTY_ROOT 0x05 110 #define COUNT_BBDEPOTINHEADER 109 113 #define LIMIT_TO_USE_SMALL_BLOCK 0x1000 115 #define STGM_ACCESS_MODE(stgm) ((stgm)&0x0000f) 116 #define STGM_SHARE_MODE(stgm) ((stgm)&0x000f0) 117 #define STGM_CREATE_MODE(stgm) ((stgm)&0x0f000) 119 #define STGM_KNOWN_FLAGS (0xf0ff | \ 120 STGM_TRANSACTED | STGM_CONVERT | STGM_PRIORITY | STGM_NOSCRATCH | \ 121 STGM_NOSNAPSHOT | STGM_DIRECT_SWMR | STGM_DELETEONRELEASE | STGM_SIMPLE) 363 #define BLOCKCHAIN_CACHE_SIZE 4 497 #define RANGELOCK_UNK1_FIRST 0x7ffffe00 498 #define RANGELOCK_UNK1_LAST 0x7fffff57 499 #define RANGELOCK_PRIORITY1_FIRST 0x7fffff58 500 #define RANGELOCK_PRIORITY1_LAST 0x7fffff6b 501 #define RANGELOCK_NOSNAPSHOT_FIRST 0x7fffff6c 502 #define RANGELOCK_NOSNAPSHOT_LAST 0x7fffff7f 503 #define RANGELOCK_COMMIT 0x7fffff80 504 #define RANGELOCK_PRIORITY2_FIRST 0x7fffff81 505 #define RANGELOCK_PRIORITY2_LAST 0x7fffff91 506 #define RANGELOCK_CHECKLOCKS 0x7fffff92 507 #define RANGELOCK_READ_FIRST 0x7fffff93 508 #define RANGELOCK_READ_LAST 0x7fffffa6 509 #define RANGELOCK_WRITE_FIRST 0x7fffffa7 510 #define RANGELOCK_WRITE_LAST 0x7fffffba 511 #define RANGELOCK_DENY_READ_FIRST 0x7fffffbb 512 #define RANGELOCK_DENY_READ_LAST 0x7fffffce 513 #define RANGELOCK_DENY_WRITE_FIRST 0x7fffffcf 514 #define RANGELOCK_DENY_WRITE_LAST 0x7fffffe2 515 #define RANGELOCK_UNK2_FIRST 0x7fffffe3 516 #define RANGELOCK_UNK2_LAST 0x7fffffff 517 #define RANGELOCK_TRANSACTION_FIRST RANGELOCK_COMMIT 518 #define RANGELOCK_TRANSACTION_LAST RANGELOCK_CHECKLOCKS 519 #define RANGELOCK_FIRST RANGELOCK_UNK1_FIRST 520 #define RANGELOCK_LAST RANGELOCK_UNK2_LAST 523 #define WINE_LOCK_READ 0x80000000 529 #ifdef WORDS_BIGENDIAN 532 #define htole32(x) RtlUlongByteSwap(x) 535 #define htole16(x) RtlUshortByteSwap(x) 537 #define lendian32toh(x) RtlUlongByteSwap(x) 538 #define lendian16toh(x) RtlUshortByteSwap(x) 543 #define htole32(x) (x) 546 #define htole16(x) (x) 548 #define lendian32toh(x) (x) 549 #define lendian16toh(x) (x) interface IStorage * LPSTORAGE
static const ULONG OFFSET_PS_STARTBLOCK
static void StorageBaseImpl_Destroy(StorageBaseImpl *This)
void(* Destroy)(StorageBaseImpl *)
ULARGE_INTEGER currentPosition
void StorageBaseImpl_AddStream(StorageBaseImpl *stg, StgStreamImpl *strm) DECLSPEC_HIDDEN
static HRESULT StorageBaseImpl_Flush(StorageBaseImpl *This)
ULONG * extBigBlockDepotLocations
static const ULONG OFFSET_PS_CTIMELOW
static const ULONG OFFSET_SMALLBLOCKLIMIT
static const ULONG OFFSET_BBDEPOTSTART
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
static const ULONG BLOCK_EXTBBDEPOT
HRESULT(* LockTransaction)(StorageBaseImpl *, BOOL)
HRESULT(* SetTransactionSig)(StorageBaseImpl *, ULONG)
static const ULONG OFFSET_PS_MTIMELOW
static const WORD MAX_BIG_BLOCK_SIZE_BITS
HRESULT(* CreateDirEntry)(StorageBaseImpl *, const DirEntry *, DirRef *)
static const ULONG OFFSET_PS_LEFTCHILD
struct _ULARGE_INTEGER ULARGE_INTEGER
struct list StrmListEntry
static const ULONG OFFSET_PS_STGTYPE
void StorageUtl_WriteWord(BYTE *buffer, ULONG offset, WORD value) DECLSPEC_HIDDEN
static const ULONG OFFSET_MAJORVERSION
HRESULT(* GetFilename)(StorageBaseImpl *, LPWSTR *)
ULONG extBigBlockDepotCount
static const ULONG OFFSET_PS_SIZE
ULONG blockDepotCached[MAX_BIG_BLOCK_SIZE/4]
void StorageUtl_WriteGUID(BYTE *buffer, ULONG offset, const GUID *value) DECLSPEC_HIDDEN
static HRESULT StorageBaseImpl_UnlockTransaction(StorageBaseImpl *This, BOOL write)
static HRESULT StorageBaseImpl_SetTransactionSig(StorageBaseImpl *This, ULONG value)
static const WORD DEF_BIG_BLOCK_SIZE_BITS
static const ULONG OFFSET_PS_SIZE_HIGH
BlockChainStream * smallBlockRootChain
void(* Invalidate)(StorageBaseImpl *)
static const ULONG OFFSET_DIRSECTORCOUNT
static const ULONG OFFSET_PS_NAMELENGTH
void StorageUtl_ReadGUID(const BYTE *buffer, ULONG offset, GUID *value) DECLSPEC_HIDDEN
static HRESULT StorageBaseImpl_LockTransaction(StorageBaseImpl *This, BOOL write)
static const ULONG BLOCK_SPECIAL
void StorageBaseImpl_RemoveStream(StorageBaseImpl *stg, StgStreamImpl *strm) DECLSPEC_HIDDEN
ULONG smallBlockDepotStart
StgStreamImpl * StgStreamImpl_Construct(StorageBaseImpl *parentStorage, DWORD grfMode, DirRef dirEntry) DECLSPEC_HIDDEN
enum swmr_mode lockingrole
#define COUNT_BBDEPOTINHEADER
static const ULONG OFFSET_BYTEORDERMARKER
HRESULT(* GetTransactionSig)(StorageBaseImpl *, ULONG *, BOOL)
static const ULONG OFFSET_BIGBLOCKSIZEBITS
static const ULONG OFFSET_ROOTSTARTBLOCK
static const ULONG OFFSET_PS_RIGHTCHILD
HRESULT(* Flush)(StorageBaseImpl *)
void StorageUtl_ReadWord(const BYTE *buffer, ULONG offset, WORD *value) DECLSPEC_HIDDEN
HRESULT(* DestroyDirEntry)(StorageBaseImpl *, DirRef)
HRESULT(* UnlockTransaction)(StorageBaseImpl *, BOOL)
#define DIRENTRY_NAME_MAX_LEN
static const WORD DEF_SMALL_BLOCK_SIZE_BITS
static const ULONG DIRENTRY_NULL
static const WORD DEF_SMALL_BLOCK_SIZE
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
HRESULT STORAGE_CreateOleStream(IStorage *, DWORD) DECLSPEC_HIDDEN
static const ULONG OFFSET_BBDEPOTCOUNT
IDirectWriterLock IDirectWriterLock_iface
static const WORD MIN_BIG_BLOCK_SIZE_BITS
ULONG firstFreeSmallBlock
HRESULT(* WriteDirEntry)(StorageBaseImpl *, DirRef, const DirEntry *)
void StorageUtl_WriteULargeInteger(BYTE *buffer, ULONG offset, const ULARGE_INTEGER *value) DECLSPEC_HIDDEN
HRESULT OLECONVERT_CreateCompObjStream(LPSTORAGE pStorage, LPCSTR strOleTypeName) DECLSPEC_HIDDEN
static HRESULT StorageBaseImpl_StreamSetSize(StorageBaseImpl *This, DirRef index, ULARGE_INTEGER newsize)
static HRESULT StorageBaseImpl_StreamWriteAt(StorageBaseImpl *This, DirRef index, ULARGE_INTEGER offset, ULONG size, const void *buffer, ULONG *bytesWritten)
static const ULONG OFFSET_TRANSACTIONSIG
#define BLOCKCHAIN_CACHE_SIZE
HRESULT(* StreamWriteAt)(StorageBaseImpl *, DirRef, ULARGE_INTEGER, ULONG, const void *, ULONG *)
static const ULONG OFFSET_PS_DIRROOT
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
BlockChainStream * rootBlockChain
void StorageUtl_ReadDWord(const BYTE *buffer, ULONG offset, DWORD *value) DECLSPEC_HIDDEN
static const WORD DEF_BIG_BLOCK_SIZE
void StorageUtl_WriteDWord(BYTE *buffer, ULONG offset, DWORD value) DECLSPEC_HIDDEN
static HRESULT StorageBaseImpl_CreateDirEntry(StorageBaseImpl *This, const DirEntry *newData, DirRef *index)
static const ULONG OFFSET_EXTBBDEPOTCOUNT
static const ULONG OFFSET_MINORVERSION
ULONG bigBlockDepotStart[COUNT_BBDEPOTINHEADER]
const StorageBaseImplVtbl * baseVtbl
HRESULT(* StreamReadAt)(StorageBaseImpl *, DirRef, ULARGE_INTEGER, ULONG, void *, ULONG *)
static HRESULT StorageBaseImpl_GetFilename(StorageBaseImpl *This, LPWSTR *result)
static HRESULT StorageBaseImpl_WriteDirEntry(StorageBaseImpl *This, DirRef index, const DirEntry *data)
static const ULONG OFFSET_PS_GUID
ULONG extBlockDepotCached[MAX_BIG_BLOCK_SIZE/4]
StorageBaseImpl * transactedChild
GLenum GLsizei GLuint GLint * bytesWritten
static HRESULT StorageBaseImpl_GetTransactionSig(StorageBaseImpl *This, ULONG *result, BOOL refresh)
StorageBaseImpl * parentStorage
BlockChainStream * smallBlockDepotChain
static const ULONG OFFSET_EXTBBDEPOTSTART
static const ULONG OFFSET_SMALLBLOCKSIZEBITS
BlockChainStream * blockChainCache[BLOCKCHAIN_CACHE_SIZE]
void StorageUtl_ReadULargeInteger(const BYTE *buffer, ULONG offset, ULARGE_INTEGER *value) DECLSPEC_HIDDEN
static HRESULT StorageBaseImpl_StreamReadAt(StorageBaseImpl *This, DirRef index, ULARGE_INTEGER offset, ULONG size, void *buffer, ULONG *bytesRead)
HRESULT FileLockBytesImpl_Construct(HANDLE hFile, DWORD openFlags, LPCWSTR pwcsName, ILockBytes **pLockBytes) DECLSPEC_HIDDEN
ULONG extBigBlockDepotStart
ULONG indexBlockDepotCached
static const ULONG OFFSET_SBDEPOTCOUNT
static HRESULT StorageBaseImpl_DestroyDirEntry(StorageBaseImpl *This, DirRef index)
HRESULT(* ReadDirEntry)(StorageBaseImpl *, DirRef, DirEntry *)
static HRESULT StorageBaseImpl_StreamLink(StorageBaseImpl *This, DirRef dst, DirRef src)
ULONG extBigBlockDepotLocationsSize
IPropertySetStorage IPropertySetStorage_iface
HRESULT(* StreamSetSize)(StorageBaseImpl *, DirRef, ULARGE_INTEGER)
static const ULONG BLOCK_UNUSED
static const ULONG OFFSET_SBDEPOTSTART
HRESULT(* StreamLink)(StorageBaseImpl *, DirRef, DirRef)
static const ULONG OFFSET_PS_NAME
static HRESULT StorageBaseImpl_ReadDirEntry(StorageBaseImpl *This, DirRef index, DirEntry *data)
static const ULONG BLOCK_FIRST_SPECIAL
void StorageUtl_CopyDirEntryToSTATSTG(StorageBaseImpl *storage, STATSTG *destination, const DirEntry *source, int statFlags) DECLSPEC_HIDDEN
static void StorageBaseImpl_Invalidate(StorageBaseImpl *This)
#define MAX_BIG_BLOCK_SIZE
static StgStreamImpl * impl_from_IStream(IStream *iface)
static const ULONG OFFSET_PS_CTIMEHIGH
static const ULONG BLOCK_END_OF_CHAIN
static const ULONG OFFSET_PS_MTIMEHIGH
ULONG indexExtBlockDepotCached