Add a stub for StgCreateStorageEx(). Returns
STG_E_UNIMPLEMENTEDFUNCTION as per MSDN. Fixes an error saving files
in Word XP.
diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec
index fbd8aba..075914a 100644
--- a/dlls/ole32/ole32.spec
+++ b/dlls/ole32/ole32.spec
@@ -233,7 +233,7 @@
@ stub SNB_UserUnmarshal
@ stdcall StgCreateDocfile(wstr long long ptr)
@ stdcall StgCreateDocfileOnILockBytes(ptr long long ptr)
-@ stub StgCreateStorageEx
+@ stdcall StgCreateStorageEx(wstr long long long ptr ptr ptr ptr)
@ stub StgGetIFillLockBytesOnFile
@ stub StgGetIFillLockBytesOnILockBytes
@ stdcall StgIsStorageFile(wstr)
diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c
index 9200c6e..0cb3085 100644
--- a/dlls/ole32/storage32.c
+++ b/dlls/ole32/storage32.c
@@ -5536,6 +5536,13 @@
return hr;
}
+HRESULT WINAPI StgCreateStorageEx(const WCHAR* pwcsName, DWORD grfMode, DWORD stgfmt, DWORD grfAttrs, STGOPTIONS* pStgOptions, void* reserved, REFIID riid, void** ppObjectOpen)
+{
+ TRACE("(%s, %lx, %lx, %lx, %p, %p, %p, %p)\n", debugstr_w(pwcsName),
+ grfMode, stgfmt, grfAttrs, pStgOptions, reserved, riid, ppObjectOpen);
+ return STG_E_UNIMPLEMENTEDFUNCTION;
+}
+
/******************************************************************************
* StgOpenStorage [OLE32.@]
*/
diff --git a/include/objbase.h b/include/objbase.h
index cd39ded..d761e14 100644
--- a/include/objbase.h
+++ b/include/objbase.h
@@ -495,7 +495,16 @@
#define STGM_NOSCRATCH 0x00100000
#define STGM_NOSNAPSHOT 0x00200000
+typedef struct tagSTGOPTIONS
+{
+ USHORT usVersion;
+ USHORT reserved;
+ ULONG ulSectorSize;
+ const WCHAR* pwcsTemplateFile;
+} STGOPTIONS;
+
HRESULT WINAPI StgCreateDocfile(LPCOLESTR pwcsName,DWORD grfMode,DWORD reserved,IStorage **ppstgOpen);
+HRESULT WINAPI StgCreateStorageEx(const WCHAR*,DWORD,DWORD,DWORD,STGOPTIONS*,void*,REFIID,void**);
HRESULT WINAPI StgIsStorageFile(LPCOLESTR fn);
HRESULT WINAPI StgIsStorageILockBytes(ILockBytes *plkbyt);
HRESULT WINAPI StgOpenStorage(const OLECHAR* pwcsName,IStorage* pstgPriority,DWORD grfMode,SNB snbExclude,DWORD reserved,IStorage**ppstgOpen);