Commit e77e9e45 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

ole32: Add a DirRef type for references to directory entries.

parent d3dbc8b1
...@@ -962,7 +962,7 @@ static const IStreamVtbl StgStreamImpl_Vtbl = ...@@ -962,7 +962,7 @@ static const IStreamVtbl StgStreamImpl_Vtbl =
StgStreamImpl* StgStreamImpl_Construct( StgStreamImpl* StgStreamImpl_Construct(
StorageBaseImpl* parentStorage, StorageBaseImpl* parentStorage,
DWORD grfMode, DWORD grfMode,
ULONG dirEntry) DirRef dirEntry)
{ {
StgStreamImpl* newStream; StgStreamImpl* newStream;
......
...@@ -122,6 +122,11 @@ typedef struct DirEntry DirEntry; ...@@ -122,6 +122,11 @@ typedef struct DirEntry DirEntry;
typedef struct StgStreamImpl StgStreamImpl; typedef struct StgStreamImpl StgStreamImpl;
/* /*
* A reference to a directory entry in the file or a transacted cache.
*/
typedef ULONG DirRef;
/*
* This utility structure is used to read/write the information in a directory * This utility structure is used to read/write the information in a directory
* entry. * entry.
*/ */
...@@ -130,9 +135,9 @@ struct DirEntry ...@@ -130,9 +135,9 @@ struct DirEntry
WCHAR name[DIRENTRY_NAME_MAX_LEN]; WCHAR name[DIRENTRY_NAME_MAX_LEN];
WORD sizeOfNameString; WORD sizeOfNameString;
BYTE stgType; BYTE stgType;
ULONG leftChild; DirRef leftChild;
ULONG rightChild; DirRef rightChild;
ULONG dirRootEntry; DirRef dirRootEntry;
GUID clsid; GUID clsid;
FILETIME ctime; FILETIME ctime;
FILETIME mtime; FILETIME mtime;
...@@ -209,7 +214,7 @@ struct StorageBaseImpl ...@@ -209,7 +214,7 @@ struct StorageBaseImpl
/* /*
* Index of the directory entry of this storage * Index of the directory entry of this storage
*/ */
ULONG storageDirEntry; DirRef storageDirEntry;
/* /*
* virtual Destructor method. * virtual Destructor method.
...@@ -303,12 +308,12 @@ HRESULT StorageImpl_WriteRawDirEntry( ...@@ -303,12 +308,12 @@ HRESULT StorageImpl_WriteRawDirEntry(
BOOL StorageImpl_ReadDirEntry( BOOL StorageImpl_ReadDirEntry(
StorageImpl* This, StorageImpl* This,
ULONG index, DirRef index,
DirEntry* buffer); DirEntry* buffer);
BOOL StorageImpl_WriteDirEntry( BOOL StorageImpl_WriteDirEntry(
StorageImpl* This, StorageImpl* This,
ULONG index, DirRef index,
const DirEntry* buffer); const DirEntry* buffer);
BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks( BlockChainStream* Storage32Impl_SmallBlocksToBigBlocks(
...@@ -354,7 +359,7 @@ struct StgStreamImpl ...@@ -354,7 +359,7 @@ struct StgStreamImpl
/* /*
* Index of the directory entry that owns (points to) this stream. * Index of the directory entry that owns (points to) this stream.
*/ */
ULONG dirEntry; DirRef dirEntry;
/* /*
* Helper variable that contains the size of the stream * Helper variable that contains the size of the stream
...@@ -381,7 +386,7 @@ struct StgStreamImpl ...@@ -381,7 +386,7 @@ struct StgStreamImpl
StgStreamImpl* StgStreamImpl_Construct( StgStreamImpl* StgStreamImpl_Construct(
StorageBaseImpl* parentStorage, StorageBaseImpl* parentStorage,
DWORD grfMode, DWORD grfMode,
ULONG dirEntry); DirRef dirEntry);
/****************************************************************************** /******************************************************************************
...@@ -431,7 +436,7 @@ struct BlockChainStream ...@@ -431,7 +436,7 @@ struct BlockChainStream
{ {
StorageImpl* parentStorage; StorageImpl* parentStorage;
ULONG* headOfStreamPlaceHolder; ULONG* headOfStreamPlaceHolder;
ULONG ownerDirEntry; DirRef ownerDirEntry;
ULONG lastBlockNoInSequence; ULONG lastBlockNoInSequence;
ULONG lastBlockNoInSequenceIndex; ULONG lastBlockNoInSequenceIndex;
ULONG tailIndex; ULONG tailIndex;
...@@ -444,7 +449,7 @@ struct BlockChainStream ...@@ -444,7 +449,7 @@ struct BlockChainStream
BlockChainStream* BlockChainStream_Construct( BlockChainStream* BlockChainStream_Construct(
StorageImpl* parentStorage, StorageImpl* parentStorage,
ULONG* headOfStreamPlaceHolder, ULONG* headOfStreamPlaceHolder,
ULONG dirEntry); DirRef dirEntry);
void BlockChainStream_Destroy( void BlockChainStream_Destroy(
BlockChainStream* This); BlockChainStream* This);
...@@ -476,7 +481,7 @@ BOOL BlockChainStream_SetSize( ...@@ -476,7 +481,7 @@ BOOL BlockChainStream_SetSize(
struct SmallBlockChainStream struct SmallBlockChainStream
{ {
StorageImpl* parentStorage; StorageImpl* parentStorage;
ULONG ownerDirEntry; DirRef ownerDirEntry;
ULONG* headOfStreamPlaceHolder; ULONG* headOfStreamPlaceHolder;
}; };
...@@ -486,7 +491,7 @@ struct SmallBlockChainStream ...@@ -486,7 +491,7 @@ struct SmallBlockChainStream
SmallBlockChainStream* SmallBlockChainStream_Construct( SmallBlockChainStream* SmallBlockChainStream_Construct(
StorageImpl* parentStorage, StorageImpl* parentStorage,
ULONG* headOfStreamPlaceHolder, ULONG* headOfStreamPlaceHolder,
ULONG dirEntry); DirRef dirEntry);
void SmallBlockChainStream_Destroy( void SmallBlockChainStream_Destroy(
SmallBlockChainStream* This); SmallBlockChainStream* This);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment