Huw Davies : ole32: Store the creation flag - STGM_SIMPLE depends on this.
Module: wine Branch: master Commit: 0faf155887b704b82d23a58c91dbf6578c1335ae URL: http://source.winehq.org/git/wine.git/?a=commit;h=0faf155887b704b82d23a58c91... Author: Huw Davies <huw(a)codeweavers.com> Date: Fri May 29 17:14:41 2009 +0100 ole32: Store the creation flag - STGM_SIMPLE depends on this. --- dlls/ole32/storage32.c | 14 +------------- dlls/ole32/storage32.h | 2 ++ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 91f1f36..670d751 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -2407,19 +2407,13 @@ static HRESULT StorageImpl_Construct( memset(This, 0, sizeof(StorageImpl)); - /* - * Initialize stream list - */ - list_init(&This->base.strmHead); - /* - * Initialize the virtual function table. - */ This->base.lpVtbl = &Storage32Impl_Vtbl; This->base.pssVtbl = &IPropertySetStorage_Vtbl; This->base.v_destructor = StorageImpl_Destroy; This->base.openFlags = (openFlags & ~STGM_CREATE); + This->create = create; /* * This is the top-level storage so initialize the ancestor pointer @@ -2427,14 +2421,8 @@ static HRESULT StorageImpl_Construct( */ This->base.ancestorStorage = This; - /* - * Initialize the physical support of the storage. - */ This->hFile = hFile; - /* - * Store copy of file path. - */ if(pwcsName) { This->pwcsName = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(pwcsName)+1)*sizeof(WCHAR)); diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index 1e42afb..4be0631 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -255,6 +255,8 @@ struct StorageImpl */ HANDLE hFile; /* Physical support for the Docfile */ LPOLESTR pwcsName; /* Full path of the document file */ + BOOL create; /* Was the storage created or opened. + The behaviour of STGM_SIMPLE depends on this */ /* FIXME: should this be in Storage32BaseImpl ? */ WCHAR filename[PROPERTY_NAME_BUFFER_LEN];
participants (1)
-
Alexandre Julliard