ole32: Add ReadDirEntry to the storage vtable.

This commit is contained in:
Vincent Povirk 2009-11-25 17:01:27 -06:00 committed by Alexandre Julliard
parent 176cdfc75e
commit f3d194b391
3 changed files with 34 additions and 11 deletions

View File

@ -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);

View File

@ -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
};
/******************************************************************************

View File

@ -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
*/