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

ole32: Add ReadDirEntry to the storage vtable.

parent 176cdfc7
......@@ -208,7 +208,7 @@ static void StgStreamImpl_OpenBlockChain(
/*
* Read the information from the directory entry.
*/
hr = StorageImpl_ReadDirEntry(This->parentStorage->ancestorStorage,
hr = StorageBaseImpl_ReadDirEntry(This->parentStorage,
This->dirEntry,
&currentEntry);
......@@ -605,7 +605,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
/*
* Read this stream's size to see if it's small blocks or big blocks
*/
StorageImpl_ReadDirEntry(This->parentStorage->ancestorStorage,
StorageBaseImpl_ReadDirEntry(This->parentStorage,
This->dirEntry,
&currentEntry);
/*
......@@ -650,7 +650,7 @@ static HRESULT WINAPI StgStreamImpl_SetSize(
/*
* Write the new information about this stream to the directory entry
*/
hr = StorageImpl_ReadDirEntry(This->parentStorage->ancestorStorage,
hr = StorageBaseImpl_ReadDirEntry(This->parentStorage,
This->dirEntry,
&currentEntry);
......@@ -852,7 +852,7 @@ static HRESULT WINAPI StgStreamImpl_Stat(
/*
* Read the information from the directory entry.
*/
hr = StorageImpl_ReadDirEntry(This->parentStorage->ancestorStorage,
hr = StorageBaseImpl_ReadDirEntry(This->parentStorage,
This->dirEntry,
&currentEntry);
......
......@@ -690,8 +690,8 @@ static HRESULT WINAPI StorageBaseImpl_Stat(
goto end;
}
res = StorageImpl_ReadDirEntry(
This->ancestorStorage,
res = StorageBaseImpl_ReadDirEntry(
This,
This->storageDirEntry,
&currentEntry);
......@@ -964,9 +964,9 @@ static HRESULT WINAPI StorageBaseImpl_SetClass(
if (!This->ancestorStorage)
return STG_E_REVERTED;
hRes = StorageImpl_ReadDirEntry(This->ancestorStorage,
This->storageDirEntry,
&currentEntry);
hRes = StorageBaseImpl_ReadDirEntry(This,
This->storageDirEntry,
&currentEntry);
if (SUCCEEDED(hRes))
{
currentEntry.clsid = *clsid;
......@@ -2189,6 +2189,13 @@ static HRESULT StorageImpl_BaseWriteDirEntry(StorageBaseImpl *base,
return StorageImpl_WriteDirEntry(This, index, data);
}
static HRESULT StorageImpl_BaseReadDirEntry(StorageBaseImpl *base,
DirRef index, DirEntry *data)
{
StorageImpl *This = (StorageImpl*)base;
return StorageImpl_ReadDirEntry(This, index, data);
}
/*
* Virtual function table for the IStorage32Impl class.
*/
......@@ -2218,7 +2225,8 @@ static const StorageBaseImplVtbl StorageImpl_BaseVtbl =
{
StorageImpl_Destroy,
StorageImpl_CreateDirEntry,
StorageImpl_BaseWriteDirEntry
StorageImpl_BaseWriteDirEntry,
StorageImpl_BaseReadDirEntry,
};
static HRESULT StorageImpl_Construct(
......@@ -3649,6 +3657,13 @@ static HRESULT StorageInternalImpl_WriteDirEntry(StorageBaseImpl *base,
index, data);
}
static HRESULT StorageInternalImpl_ReadDirEntry(StorageBaseImpl *base,
DirRef index, DirEntry *data)
{
return StorageBaseImpl_ReadDirEntry(&base->ancestorStorage->base,
index, data);
}
/******************************************************************************
**
** Storage32InternalImpl_Commit
......@@ -4093,7 +4108,8 @@ static const StorageBaseImplVtbl StorageInternalImpl_BaseVtbl =
{
StorageInternalImpl_Destroy,
StorageInternalImpl_CreateDirEntry,
StorageInternalImpl_WriteDirEntry
StorageInternalImpl_WriteDirEntry,
StorageInternalImpl_ReadDirEntry
};
/******************************************************************************
......
......@@ -250,6 +250,7 @@ struct StorageBaseImplVtbl {
void (*Destroy)(StorageBaseImpl*);
HRESULT (*CreateDirEntry)(StorageBaseImpl*,const DirEntry*,DirRef*);
HRESULT (*WriteDirEntry)(StorageBaseImpl*,DirRef,const DirEntry*);
HRESULT (*ReadDirEntry)(StorageBaseImpl*,DirRef,DirEntry*);
};
static inline void StorageBaseImpl_Destroy(StorageBaseImpl *This)
......@@ -269,6 +270,12 @@ static inline HRESULT StorageBaseImpl_WriteDirEntry(StorageBaseImpl *This,
return This->baseVtbl->WriteDirEntry(This, index, data);
}
static inline HRESULT StorageBaseImpl_ReadDirEntry(StorageBaseImpl *This,
DirRef index, DirEntry *data)
{
return This->baseVtbl->ReadDirEntry(This, index, data);
}
/****************************************************************************
* StorageBaseImpl stream list handlers
*/
......
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