shell32: Silence IMarshal requests to IKnownFolder and IKnownFolderManager.

This commit is contained in:
Nikolay Sivov 2015-05-09 19:37:53 +03:00 committed by Alexandre Julliard
parent 594e0b674f
commit 4367f4b230
2 changed files with 20 additions and 0 deletions

View File

@ -5024,11 +5024,17 @@ static HRESULT WINAPI knownfolder_QueryInterface(
TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppv );
*ppv = NULL;
if ( IsEqualGUID( riid, &IID_IKnownFolder ) ||
IsEqualGUID( riid, &IID_IUnknown ) )
{
*ppv = iface;
}
else if ( IsEqualGUID( riid, &IID_IMarshal ) )
{
TRACE("IID_IMarshal returning NULL.\n");
return E_NOINTERFACE;
}
else
{
FIXME("interface %s not implemented\n", debugstr_guid(riid));
@ -5416,11 +5422,17 @@ static HRESULT WINAPI foldermanager_QueryInterface(
TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppv );
*ppv = NULL;
if ( IsEqualGUID( riid, &IID_IKnownFolderManager ) ||
IsEqualGUID( riid, &IID_IUnknown ) )
{
*ppv = iface;
}
else if ( IsEqualGUID( riid, &IID_IMarshal ) )
{
TRACE("IID_IMarshal returning NULL.\n");
return E_NOINTERFACE;
}
else
{
FIXME("interface %s not implemented\n", debugstr_guid(riid));

View File

@ -2075,8 +2075,13 @@ static void test_knownFolders(void)
win_skip("IKnownFolderManager unavailable\n");
else
{
IUnknown *unk;
ok(hr == S_OK, "failed to create KnownFolderManager instance: 0x%08x\n", hr);
hr = IKnownFolderManager_QueryInterface(mgr, &IID_IMarshal, (void**)&unk);
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
hr = IKnownFolderManager_FolderIdFromCsidl(mgr, CSIDL_WINDOWS, &folderId);
ok(hr == S_OK, "failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n", hr);
ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n");
@ -2089,6 +2094,9 @@ static void test_knownFolders(void)
ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr);
if(SUCCEEDED(hr))
{
hr = IKnownFolder_QueryInterface(folder, &IID_IMarshal, (void**)&unk);
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
hr = IKnownFolder_GetCategory(folder, &cat);
ok(hr == S_OK, "failed to get folder category: 0x%08x\n", hr);
ok(cat==KF_CATEGORY_FIXED, "invalid folder category: %d\n", cat);