From 7506198780ca48fcf05844403fdc3d611f15c47a Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Tue, 13 Nov 2018 00:08:18 +0200 Subject: [PATCH] [NETSHELL] Optionally use the system's CLSID_ConnectionManager Use a central compile option like we do in the rest of the shell so that when testing in windows we can switch using the one in the current dll or the one registered in the system. Note that not only CLSID_ConnectionManager isn't implemented in netshell, it can't even be instantiated as CLSCTX_INPROC_SERVER because it is implemented by the netman service --- dll/shellext/netshell/connectmanager.cpp | 4 ++++ dll/shellext/netshell/precomp.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/dll/shellext/netshell/connectmanager.cpp b/dll/shellext/netshell/connectmanager.cpp index 88780be11d0..da733db2da4 100644 --- a/dll/shellext/netshell/connectmanager.cpp +++ b/dll/shellext/netshell/connectmanager.cpp @@ -559,5 +559,9 @@ HRESULT CNetConnectionManager::Initialize() HRESULT WINAPI CNetConnectionManager_CreateInstance(REFIID riid, LPVOID * ppv) { +#if USE_CUSTOM_CONMGR return ShellObjectCreatorInit(riid, ppv); +#else + return CoCreateInstance(CLSID_ConnectionManager, NULL, CLSCTX_ALL, riid, ppv); +#endif } diff --git a/dll/shellext/netshell/precomp.h b/dll/shellext/netshell/precomp.h index f568da7528f..7dc020ca442 100644 --- a/dll/shellext/netshell/precomp.h +++ b/dll/shellext/netshell/precomp.h @@ -49,6 +49,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); #define NCF_FILTER 0x400 #define NCF_NDIS_PROTOCOL 0x4000 +#define USE_CUSTOM_CONMGR 1 + /* globals */ extern HINSTANCE netshell_hInstance;