ole32: Store the creation flag - STGM_SIMPLE depends on this.

This commit is contained in:
Huw Davies 2009-05-29 17:14:41 +01:00 committed by Alexandre Julliard
parent 8b7b67712f
commit 0faf155887
2 changed files with 3 additions and 13 deletions

View File

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

View File

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