https://git.reactos.org/?p=reactos.git;a=commitdiff;h=af3a1b19363be1f411b3e…
commit af3a1b19363be1f411b3e6c5456065680d2dccdd
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Sun Nov 11 15:37:44 2018 +0200
Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
CommitDate: Sun Nov 11 20:28:32 2018 +0200
[NETSHELL] CNetConUiObject: Use a switch in InvokeCommand
---
dll/shellext/netshell/shfldr_netconnect.cpp | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/dll/shellext/netshell/shfldr_netconnect.cpp
b/dll/shellext/netshell/shfldr_netconnect.cpp
index 64b7806e70..ef00ff2e55 100644
--- a/dll/shellext/netshell/shfldr_netconnect.cpp
+++ b/dll/shellext/netshell/shfldr_netconnect.cpp
@@ -983,21 +983,29 @@ ShowNetConnectionProperties(
HRESULT WINAPI CNetConUiObject::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi)
{
const VALUEStruct * val;
+ UINT CmdId;
val = _ILGetValueStruct(m_pidl);
if (!val)
return E_FAIL;
- if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_STATUS) ||
- lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_STATUS-1)) //HACK for Windows XP
+ if (HIWORD(lpcmi->lpVerb))
{
- return ShowNetConnectionStatus(m_lpOleCmd, val->pItem, lpcmi->hwnd);
+ //FIXME
+ return E_NOTIMPL;
}
- else if (lpcmi->lpVerb == MAKEINTRESOURCEA(IDS_NET_PROPERTIES) ||
- lpcmi->lpVerb == MAKEINTRESOURCEA(10099)) //HACK for Windows XP
+
+ CmdId = LOWORD(lpcmi->lpVerb);
+
+
+ switch(CmdId)
{
- /* FIXME perform version checks */
- return ShowNetConnectionProperties(val->pItem, lpcmi->hwnd);
+ case IDS_NET_STATUS:
+ case IDS_NET_STATUS-1: //HACK for Windows XP
+ return ShowNetConnectionStatus(m_lpOleCmd, val->pItem, lpcmi->hwnd);
+ case IDS_NET_PROPERTIES:
+ case 10099: //HACK for Windows XP
+ return ShowNetConnectionProperties(val->pItem, lpcmi->hwnd);
}
return S_OK;