https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7506198780ca48fcf05844403fdc3d611f15c47a

commit 7506198780ca48fcf05844403fdc3d611f15c47a
Author:     Giannis Adamopoulos <[email protected]>
AuthorDate: Tue Nov 13 00:08:18 2018 +0200
Commit:     Giannis Adamopoulos <[email protected]>
CommitDate: Sun Nov 18 14:01:54 2018 +0200

    [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 88780be11d..da733db2da 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<CNetConnectionManager>(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 f568da7528..7dc020ca44 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;
 

Reply via email to