Use default values if options passed to StgCreateStorageEx are NULL.
Andrew Bogott
andrew at CodeWeavers.com
Tue Nov 9 04:25:19 CST 2010
---
dlls/ole32/storage32.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 311f2ae..b92393c 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -7409,7 +7409,13 @@ HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD st
if (stgfmt == STGFMT_STORAGE || stgfmt == STGFMT_DOCFILE)
{
- return create_storagefile(pwcsName, grfMode, grfAttrs, pStgOptions, riid, ppObjectOpen);
+ STGOPTIONS defaultOptions = {1, 0, 512};
+ STGOPTIONS* pOptions = &defaultOptions;
+
+ if (pStgOptions)
+ pOptions = pStgOptions;
+
+ return create_storagefile(pwcsName, grfMode, grfAttrs, pOptions, riid, ppObjectOpen);
}
--
1.6.5
--------------090906060509040905090900--
More information about the wine-patches
mailing list