shell32: Silence IMarshal requests to IKnownFolder and IKnownFolderManager.
This commit is contained in:
parent
594e0b674f
commit
4367f4b230
|
@ -5024,11 +5024,17 @@ static HRESULT WINAPI knownfolder_QueryInterface(
|
||||||
|
|
||||||
TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppv );
|
TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppv );
|
||||||
|
|
||||||
|
*ppv = NULL;
|
||||||
if ( IsEqualGUID( riid, &IID_IKnownFolder ) ||
|
if ( IsEqualGUID( riid, &IID_IKnownFolder ) ||
|
||||||
IsEqualGUID( riid, &IID_IUnknown ) )
|
IsEqualGUID( riid, &IID_IUnknown ) )
|
||||||
{
|
{
|
||||||
*ppv = iface;
|
*ppv = iface;
|
||||||
}
|
}
|
||||||
|
else if ( IsEqualGUID( riid, &IID_IMarshal ) )
|
||||||
|
{
|
||||||
|
TRACE("IID_IMarshal returning NULL.\n");
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
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 );
|
TRACE("%p %s %p\n", This, debugstr_guid( riid ), ppv );
|
||||||
|
|
||||||
|
*ppv = NULL;
|
||||||
if ( IsEqualGUID( riid, &IID_IKnownFolderManager ) ||
|
if ( IsEqualGUID( riid, &IID_IKnownFolderManager ) ||
|
||||||
IsEqualGUID( riid, &IID_IUnknown ) )
|
IsEqualGUID( riid, &IID_IUnknown ) )
|
||||||
{
|
{
|
||||||
*ppv = iface;
|
*ppv = iface;
|
||||||
}
|
}
|
||||||
|
else if ( IsEqualGUID( riid, &IID_IMarshal ) )
|
||||||
|
{
|
||||||
|
TRACE("IID_IMarshal returning NULL.\n");
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
FIXME("interface %s not implemented\n", debugstr_guid(riid));
|
||||||
|
|
|
@ -2075,8 +2075,13 @@ static void test_knownFolders(void)
|
||||||
win_skip("IKnownFolderManager unavailable\n");
|
win_skip("IKnownFolderManager unavailable\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
IUnknown *unk;
|
||||||
|
|
||||||
ok(hr == S_OK, "failed to create KnownFolderManager instance: 0x%08x\n", hr);
|
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);
|
hr = IKnownFolderManager_FolderIdFromCsidl(mgr, CSIDL_WINDOWS, &folderId);
|
||||||
ok(hr == S_OK, "failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n", hr);
|
ok(hr == S_OK, "failed to convert CSIDL to KNOWNFOLDERID: 0x%08x\n", hr);
|
||||||
ok(IsEqualGUID(&folderId, &FOLDERID_Windows)==TRUE, "invalid KNOWNFOLDERID returned\n");
|
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);
|
ok(hr == S_OK, "failed to get known folder: 0x%08x\n", hr);
|
||||||
if(SUCCEEDED(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);
|
hr = IKnownFolder_GetCategory(folder, &cat);
|
||||||
ok(hr == S_OK, "failed to get folder category: 0x%08x\n", hr);
|
ok(hr == S_OK, "failed to get folder category: 0x%08x\n", hr);
|
||||||
ok(cat==KF_CATEGORY_FIXED, "invalid folder category: %d\n", cat);
|
ok(cat==KF_CATEGORY_FIXED, "invalid folder category: %d\n", cat);
|
||||||
|
|
Loading…
Reference in New Issue