[NETSHELL]

- Do not display a message box in CLanStatus::QueryInterface. Fixes hang when running com_apitest:netshell
- Change the order of some interfaces in CNetworkConnections to make com_apitest slightly happier

svn path=/trunk/; revision=67314
This commit is contained in:
Thomas Faber 2015-04-19 22:16:34 +00:00
parent a04d175469
commit a7e56b4256
2 changed files with 14 additions and 20 deletions

View file

@ -1132,7 +1132,7 @@ CLanStatus::QueryInterface(
AddRef();
return S_OK;
}
MessageBoxW(NULL, L"IOleCommandTarget_fnQueryInterface", NULL, MB_OK);
return E_NOINTERFACE;
}

View file

@ -27,8 +27,8 @@
*/
class CNetworkConnections final :
public IShellFolder2,
public IPersistFolder2,
public IShellFolder2,
public IShellExecuteHookW
{
public:
@ -170,26 +170,22 @@ HRESULT WINAPI CNetworkConnections::QueryInterface(REFIID riid, LPVOID *ppvObj)
*ppvObj = NULL;
if (IsEqualIID(riid, IID_IUnknown) ||
IsEqualIID(riid, IID_IShellFolder) ||
IsEqualIID(riid, IID_IShellFolder2))
{
*ppvObj = static_cast<IShellFolder2*>(this);
}
else if (IsEqualIID (riid, IID_IPersistFolder) ||
IsEqualIID (riid, IID_IPersistFolder2))
IsEqualIID (riid, IID_IPersist) ||
IsEqualIID (riid, IID_IPersistFolder) ||
IsEqualIID (riid, IID_IPersistFolder2))
{
*ppvObj = static_cast<IPersistFolder2*>(this);
}
else if (IsEqualIID(riid, IID_IShellFolder) ||
IsEqualIID(riid, IID_IShellFolder2))
{
*ppvObj = static_cast<IShellFolder2*>(this);
}
else if (IsEqualIID(riid, IID_IShellExecuteHookW))
{
*ppvObj = static_cast<IShellExecuteHookW*>(this);
}
#if 0
else if (IsEqualIID(riid, IID_IPersistIDList))
{
//*ppvObj = static_cast<IPersistIDList*>(this);
}
#endif
if (*ppvObj)
{
AddRef();
@ -197,11 +193,9 @@ HRESULT WINAPI CNetworkConnections::QueryInterface(REFIID riid, LPVOID *ppvObj)
}
/* TODO:
* IID_IPersistFreeThreadedObject
* IID_IBrowserFrameOptions
* IID_IShellIconOverlay
* IID_IPersistIDList
* IID_IPersist
* IID_IShellExtInit
* IID_IOleCommandTarget
* IID_IShellFolderViewCB
*/
return E_NOINTERFACE;