shell32: Add implementation of IKnownFolder::GetCategory.
This commit is contained in:
parent
efc1162eb7
commit
5e90301bc2
|
@ -3222,8 +3222,20 @@ static HRESULT WINAPI knownfolder_GetCategory(
|
|||
IKnownFolder *iface,
|
||||
KF_CATEGORY *pCategory)
|
||||
{
|
||||
FIXME("%p\n", pCategory);
|
||||
return E_NOTIMPL;
|
||||
struct knownfolder *knownfolder = impl_from_IKnownFolder(iface);
|
||||
HRESULT hr = S_OK;
|
||||
DWORD dwSize, dwType;
|
||||
|
||||
TRACE("%p, %p\n", knownfolder, pCategory);
|
||||
|
||||
/* we can not get category for folder which is not registered */
|
||||
if(!knownfolder->registryPath)
|
||||
hr = E_FAIL;
|
||||
|
||||
if(SUCCEEDED(hr))
|
||||
hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE, knownfolder->registryPath, szCategory, RRF_RT_DWORD, &dwType, pCategory, &dwSize));
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI knownfolder_GetShellItem(
|
||||
|
|
|
@ -1176,9 +1176,7 @@ static void test_knownFolders(void)
|
|||
if(SUCCEEDED(hr))
|
||||
{
|
||||
hr = IKnownFolder_GetCategory(folder, &cat);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "failed to get folder category: hr=0x%0x\n", hr);
|
||||
todo_wine
|
||||
ok(cat == KF_CATEGORY_PERUSER, "invalid category returned: %d, while %d (KF_CATEGORY_PERUSER) expected\n", cat, KF_CATEGORY_PERUSER);
|
||||
|
||||
hr = IKnownFolder_GetId(folder, &folderId);
|
||||
|
|
Loading…
Reference in New Issue