shell32: System shellfolders don't support GetDefaultSearchGUID() in recent versions.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-09-27 11:13:43 +03:00 committed by Alexandre Julliard
parent babd22b443
commit 2406d6cd84
9 changed files with 68 additions and 23 deletions

View File

@ -711,12 +711,13 @@ static HRESULT WINAPI ISF_ControlPanel_fnSetNameOf(IShellFolder2 *iface, HWND hw
return E_FAIL;
}
static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultSearchGUID(IShellFolder2 *iface, GUID *pguid)
static HRESULT WINAPI ISF_ControlPanel_fnGetDefaultSearchGUID(IShellFolder2 *iface, GUID *guid)
{
ICPanelImpl *This = impl_from_IShellFolder2(iface);
FIXME("(%p)\n", This);
TRACE("(%p)->(%p)\n", This, guid);
return E_NOTIMPL;
}
static HRESULT WINAPI ISF_ControlPanel_fnEnumSearches(IShellFolder2 *iface,
IEnumExtraSearch **ppenum)
{

View File

@ -567,9 +567,10 @@ static HRESULT WINAPI RecycleBin_GetCurFolder(IPersistFolder2 *iface, LPITEMIDLI
return S_OK;
}
static HRESULT WINAPI RecycleBin_GetDefaultSearchGUID(IShellFolder2 *iface, GUID *pguid)
static HRESULT WINAPI RecycleBin_GetDefaultSearchGUID(IShellFolder2 *iface, GUID *guid)
{
FIXME("stub\n");
RecycleBin *This = impl_from_IShellFolder2(iface);
TRACE("(%p)->(%p)\n", This, guid);
return E_NOTIMPL;
}

View File

@ -753,11 +753,10 @@ static HRESULT WINAPI ISF_Desktop_fnSetNameOf (IShellFolder2 * iface,
return E_FAIL;
}
static HRESULT WINAPI ISF_Desktop_fnGetDefaultSearchGUID(IShellFolder2 *iface,
GUID * pguid)
static HRESULT WINAPI ISF_Desktop_fnGetDefaultSearchGUID(IShellFolder2 *iface, GUID *guid)
{
IDesktopFolderImpl *This = impl_from_IShellFolder2(iface);
FIXME ("(%p)->(%p) stub\n", This, pguid);
TRACE("(%p)->(%p)\n", This, guid);
return E_NOTIMPL;
}

View File

@ -910,13 +910,13 @@ static HRESULT WINAPI IShellFolder_fnSetNameOf (IShellFolder2 * iface,
return E_FAIL;
}
static HRESULT WINAPI IShellFolder_fnGetDefaultSearchGUID (IShellFolder2 *iface,
GUID * pguid)
static HRESULT WINAPI IShellFolder_fnGetDefaultSearchGUID(IShellFolder2 *iface, GUID *guid)
{
IGenericSFImpl *This = impl_from_IShellFolder2(iface);
FIXME ("(%p)\n", This);
TRACE("(%p)->(%p)\n", This, guid);
return E_NOTIMPL;
}
static HRESULT WINAPI IShellFolder_fnEnumSearches (IShellFolder2 * iface,
IEnumExtraSearch ** ppenum)
{

View File

@ -768,11 +768,10 @@ static HRESULT WINAPI ISF_MyComputer_fnSetNameOf (
return E_FAIL;
}
static HRESULT WINAPI ISF_MyComputer_fnGetDefaultSearchGUID (
IShellFolder2 * iface, GUID * pguid)
static HRESULT WINAPI ISF_MyComputer_fnGetDefaultSearchGUID(IShellFolder2 *iface, GUID *guid)
{
IMyComputerFolderImpl *This = impl_from_IShellFolder2(iface);
FIXME ("(%p)\n", This);
TRACE("(%p)->(%p)\n", This, guid);
return E_NOTIMPL;
}
static HRESULT WINAPI ISF_MyComputer_fnEnumSearches (

View File

@ -501,12 +501,10 @@ static HRESULT WINAPI ISF_NetworkPlaces_fnSetNameOf (IShellFolder2 * iface,
return E_FAIL;
}
static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultSearchGUID (
IShellFolder2 * iface, GUID * pguid)
static HRESULT WINAPI ISF_NetworkPlaces_fnGetDefaultSearchGUID(IShellFolder2 *iface, GUID *guid)
{
IGenericSFImpl *This = impl_from_IShellFolder2(iface);
FIXME ("(%p)\n", This);
TRACE("(%p)->(%p)\n", This, guid);
return E_NOTIMPL;
}

View File

@ -251,11 +251,10 @@ static HRESULT WINAPI IShellFolder_Printers_fnSetNameOf (
return E_FAIL;
}
static HRESULT WINAPI IShellFolder_Printers_fnGetDefaultSearchGUID (
IShellFolder2 * iface, GUID * pguid)
static HRESULT WINAPI IShellFolder_Printers_fnGetDefaultSearchGUID(IShellFolder2 *iface, GUID *guid)
{
IPrintersFolderImpl *This = impl_from_IShellFolder2(iface);
FIXME ("(%p) stub\n", This);
TRACE("(%p)->(%p)\n", This, guid);
return E_NOTIMPL;
}

View File

@ -1454,11 +1454,10 @@ static HRESULT WINAPI ShellFolder2_GetDefaultColumnState(IShellFolder2* iface,
return E_NOTIMPL;
}
static HRESULT WINAPI ShellFolder2_GetDefaultSearchGUID(IShellFolder2* iface,
GUID *guid)
static HRESULT WINAPI ShellFolder2_GetDefaultSearchGUID(IShellFolder2* iface, GUID *guid)
{
UnixFolder *This = impl_from_IShellFolder2(iface);
FIXME("(%p)->(%p): stub\n", This, guid);
TRACE("(%p)->(%p)\n", This, guid);
return E_NOTIMPL;
}

View File

@ -5446,6 +5446,54 @@ static void test_GetDefaultColumn(void)
CoUninitialize();
}
static void test_GetDefaultSearchGUID(void)
{
static const CLSID *folders[] =
{
&CLSID_MyComputer,
&CLSID_MyDocuments,
&CLSID_ControlPanel,
&CLSID_NetworkPlaces,
&CLSID_Printers,
&CLSID_RecycleBin,
&CLSID_ShellDesktop,
};
HRESULT hr;
int i;
CoInitialize(NULL);
for (i = 0; i < sizeof(folders)/sizeof(folders[0]); i++)
{
IShellFolder2 *folder;
GUID guid;
hr = CoCreateInstance(folders[i], NULL, CLSCTX_INPROC_SERVER, &IID_IShellFolder2, (void **)&folder);
if (hr != S_OK)
{
win_skip("Failed to create folder %s, hr %#x.\n", wine_dbgstr_guid(folders[i]), hr);
continue;
}
if (0)
{
/* crashes on XP */
hr = IShellFolder2_GetDefaultSearchGUID(folder, NULL);
ok(hr == E_NOTIMPL, "Unexpected hr %#x.\n", hr);
}
memcpy(&guid, &CLSID_MyComputer, sizeof(guid));
hr = IShellFolder2_GetDefaultSearchGUID(folder, &guid);
ok(hr == E_NOTIMPL || broken(hr == S_OK) /* Method was last supported on XP */, "Unexpected hr %#x.\n", hr);
if (hr == E_NOTIMPL)
ok(IsEqualGUID(&guid, &CLSID_MyComputer), "Unexpected guid %s.\n", wine_dbgstr_guid(&guid));
IShellFolder2_Release(folder);
}
CoUninitialize();
}
START_TEST(shlfolder)
{
init_function_pointers();
@ -5486,6 +5534,7 @@ START_TEST(shlfolder)
test_SHCreateDefaultContextMenu();
test_DataObject();
test_GetDefaultColumn();
test_GetDefaultSearchGUID();
OleUninitialize();
}