From 7a58c6ec53d76c58b753e97fc7f95ec91e852140 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Fri, 30 Apr 2004 18:32:20 +0000 Subject: [PATCH] Add a stub for StgCreateStorageEx(). Returns STG_E_UNIMPLEMENTEDFUNCTION as per MSDN. Fixes an error saving files in Word XP. --- dlls/ole32/ole32.spec | 2 +- dlls/ole32/storage32.c | 7 +++++++ include/objbase.h | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index fbd8aba2450..075914a75bb 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 9200c6e9165..0cb3085bf76 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -5536,6 +5536,13 @@ HRESULT WINAPI StgCreateDocfile( 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 cd39ded6bba..d761e14907e 100644 --- a/include/objbase.h +++ b/include/objbase.h @@ -495,7 +495,16 @@ HRESULT WINAPI GetRunningObjectTable(DWORD reserved, LPRUNNINGOBJECTTABLE *pprot #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);