From dfc2f20b892c565356529c199d78c18dcf944974 Mon Sep 17 00:00:00 2001 From: David Hedberg Date: Sun, 19 Dec 2010 22:11:23 +0100 Subject: [PATCH] shell32: Return S_OK in ::SetPropertyBag. --- dlls/shell32/ebrowser.c | 10 +++++++++- dlls/shell32/tests/ebrowser.c | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/ebrowser.c b/dlls/shell32/ebrowser.c index e6d11653be3..f7810826e14 100644 --- a/dlls/shell32/ebrowser.c +++ b/dlls/shell32/ebrowser.c @@ -931,7 +931,15 @@ static HRESULT WINAPI IExplorerBrowser_fnSetPropertyBag(IExplorerBrowser *iface, ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface; FIXME("stub, %p (%s)\n", This, debugstr_w(pszPropertyBag)); - return E_NOTIMPL; + if(!pszPropertyBag) + return E_INVALIDARG; + + /* FIXME: This method is currently useless as we don't save any + * settings anywhere, but at least one application breaks if we + * return E_NOTIMPL. + */ + + return S_OK; } static HRESULT WINAPI IExplorerBrowser_fnSetEmptyText(IExplorerBrowser *iface, diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c index 99368d03ccc..15c2cb4dc45 100644 --- a/dlls/shell32/tests/ebrowser.c +++ b/dlls/shell32/tests/ebrowser.c @@ -1037,6 +1037,7 @@ static void test_basics(void) HDWP hdwp; RECT rc; HRESULT hr; + static const WCHAR winetest[] = {'W','i','n','e','T','e','s','t',0}; ebrowser_instantiate(&peb); ebrowser_initialize(peb); @@ -1145,6 +1146,12 @@ static void test_basics(void) hr = IExplorerBrowser_SetFolderSettings(peb, &fs); todo_wine ok(hr == E_INVALIDARG, "got (0x%08x)\n", hr); + /* SetPropertyBag */ + hr = IExplorerBrowser_SetPropertyBag(peb, NULL); + ok(hr == E_INVALIDARG, "Got 0x%08x\n", hr); + hr = IExplorerBrowser_SetPropertyBag(peb, winetest); + ok(hr == S_OK, "Got 0x%08x\n", hr); + /* TODO: Test after browsing somewhere. */ IExplorerBrowser_Destroy(peb);