[SHELL32] Implement SHFindComputer (#5524)

CORE-9277
This commit is contained in:
Katayama Hirofumi MZ 2023-08-12 18:17:13 +09:00 committed by GitHub
parent 732f223ca0
commit 2c9c634a8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 11 deletions

View file

@ -25,17 +25,6 @@ ShortSizeFormatW(LONGLONG llNumber)
return NULL;
}
/*
* Unimplemented
*/
EXTERN_C BOOL
WINAPI
SHFindComputer(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
{
FIXME("SHFindComputer() stub\n");
return FALSE;
}
/*
* Unimplemented
*/

View file

@ -66,3 +66,36 @@ SheRemoveQuotesW(LPWSTR psz)
return psz;
}
/*************************************************************************
* SHFindComputer [SHELL32.91]
*
* Invokes the shell search in My Computer. Used in SHFindFiles.
* Two parameters are ignored.
*/
EXTERN_C BOOL
WINAPI
SHFindComputer(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch)
{
UNREFERENCED_PARAMETER(pidlRoot);
UNREFERENCED_PARAMETER(pidlSavedSearch);
TRACE("%p %p\n", pidlRoot, pidlSavedSearch);
IContextMenu *pCM;
HRESULT hr = CoCreateInstance(CLSID_ShellSearchExt, NULL, CLSCTX_INPROC_SERVER,
IID_IContextMenu, (void **)&pCM);
if (FAILED(hr))
{
ERR("0x%08X\n", hr);
return hr;
}
CMINVOKECOMMANDINFO InvokeInfo = { sizeof(InvokeInfo) };
InvokeInfo.lpParameters = "{996E1EB1-B524-11D1-9120-00A0C98BA67D}";
InvokeInfo.nShow = SW_SHOWNORMAL;
hr = pCM->InvokeCommand(&InvokeInfo);
pCM->Release();
return SUCCEEDED(hr);
}