Module: wine Branch: master Commit: ee39a21d2b3f5e1a8d0f5519c316804ce16d9f45 URL: http://source.winehq.org/git/wine.git/?a=commit;h=ee39a21d2b3f5e1a8d0f5519c3...
Author: Vincent Povirk vincent@codeweavers.com Date: Mon Nov 30 09:50:15 2009 -0600
ole32: Add DestroyDirEntry to the storage vtable.
---
dlls/ole32/storage32.c | 23 ++++++++++++++--------- dlls/ole32/storage32.h | 7 +++++++ 2 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 309c2dd..53c2c87 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -184,10 +184,6 @@ static HRESULT removeFromTree( * Declaration of the functions used to manipulate DirEntry */
-static HRESULT destroyDirEntry( - StorageImpl *storage, - DirRef index); - static HRESULT insertIntoTree( StorageBaseImpl *This, DirRef parentStorageIndex, @@ -1244,12 +1240,13 @@ static HRESULT StorageImpl_CreateDirEntry( * * Mark a directory entry in the file as free. */ -static HRESULT destroyDirEntry( - StorageImpl *storage, +static HRESULT StorageImpl_DestroyDirEntry( + StorageBaseImpl *base, DirRef index) { HRESULT hr; BYTE emptyData[RAW_DIRENTRY_SIZE]; + StorageImpl *storage = (StorageImpl*)base;
memset(&emptyData, 0, RAW_DIRENTRY_SIZE);
@@ -1820,8 +1817,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement( * Invalidate the entry */ if (SUCCEEDED(hr)) - destroyDirEntry(This->ancestorStorage, - entryToDeleteRef); + StorageBaseImpl_DestroyDirEntry(This, entryToDeleteRef);
return hr; } @@ -2227,6 +2223,7 @@ static const StorageBaseImplVtbl StorageImpl_BaseVtbl = StorageImpl_CreateDirEntry, StorageImpl_BaseWriteDirEntry, StorageImpl_BaseReadDirEntry, + StorageImpl_DestroyDirEntry };
static HRESULT StorageImpl_Construct( @@ -3667,6 +3664,13 @@ static HRESULT StorageInternalImpl_ReadDirEntry(StorageBaseImpl *base, index, data); }
+static HRESULT StorageInternalImpl_DestroyDirEntry(StorageBaseImpl *base, + DirRef index) +{ + return StorageBaseImpl_DestroyDirEntry(&base->ancestorStorage->base, + index); +} + /****************************************************************************** ** ** Storage32InternalImpl_Commit @@ -4112,7 +4116,8 @@ static const StorageBaseImplVtbl StorageInternalImpl_BaseVtbl = StorageInternalImpl_Destroy, StorageInternalImpl_CreateDirEntry, StorageInternalImpl_WriteDirEntry, - StorageInternalImpl_ReadDirEntry + StorageInternalImpl_ReadDirEntry, + StorageInternalImpl_DestroyDirEntry };
/****************************************************************************** diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index fdac6a5..12cff71 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -251,6 +251,7 @@ struct StorageBaseImplVtbl { HRESULT (*CreateDirEntry)(StorageBaseImpl*,const DirEntry*,DirRef*); HRESULT (*WriteDirEntry)(StorageBaseImpl*,DirRef,const DirEntry*); HRESULT (*ReadDirEntry)(StorageBaseImpl*,DirRef,DirEntry*); + HRESULT (*DestroyDirEntry)(StorageBaseImpl*,DirRef); };
static inline void StorageBaseImpl_Destroy(StorageBaseImpl *This) @@ -276,6 +277,12 @@ static inline HRESULT StorageBaseImpl_ReadDirEntry(StorageBaseImpl *This, return This->baseVtbl->ReadDirEntry(This, index, data); }
+static inline HRESULT StorageBaseImpl_DestroyDirEntry(StorageBaseImpl *This, + DirRef index) +{ + return This->baseVtbl->DestroyDirEntry(This, index); +} + /**************************************************************************** * StorageBaseImpl stream list handlers */