[NETSHELL]
* Move to shellext folder. * Do not initialize the notification SSO, stobject will do so (like in Windows). * Move some GUIDs to a shared header. [STOBJECT] * Initialize netshell's SSO the way Windows does it. Fixes network icon inconsistency. * Move some GUIDs to a shared header. CORE-8818 #resolve Fixed in trunk r65758. svn path=/trunk/; revision=65758
|
@ -3,5 +3,6 @@ add_subdirectory(deskadp)
|
|||
add_subdirectory(deskmon)
|
||||
add_subdirectory(devcpux)
|
||||
add_subdirectory(fontext)
|
||||
add_subdirectory(netshell)
|
||||
add_subdirectory(slayer)
|
||||
add_subdirectory(stobject)
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
project(SHELL)
|
||||
|
||||
set_cpp(WITH_RUNTIME)
|
||||
|
||||
if(NOT MSVC)
|
|
@ -3,9 +3,6 @@
|
|||
#include <olectl.h>
|
||||
|
||||
HINSTANCE netshell_hInstance;
|
||||
const GUID CLSID_LANConnectUI = {0x7007ACC5, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}};
|
||||
const GUID CLSID_NetworkConnections = {0x7007ACC7, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}};
|
||||
const GUID CLSID_LanConnectStatusUI = {0x7007ACCF, 0x3202, 0x11D1, {0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E}};
|
||||
|
||||
static const WCHAR szNetConnectClass[] = L"CLSID\\{7007ACC7-3202-11D1-AAD2-00805FC1270E}";
|
||||
static const WCHAR szLanConnectUI[] = L"CLSID\\{7007ACC5-3202-11D1-AAD2-00805FC1270E}";
|
|
@ -18,6 +18,7 @@
|
|||
#include <setupapi.h>
|
||||
#include <devguid.h>
|
||||
#include <netcon.h>
|
||||
#include <shlguid_undoc.h>
|
||||
|
||||
#include <wine/debug.h>
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
|
@ -54,9 +55,6 @@ typedef struct tagVALUEStruct
|
|||
|
||||
/* globals */
|
||||
extern HINSTANCE netshell_hInstance;
|
||||
extern const GUID CLSID_NetworkConnections;
|
||||
extern const GUID CLSID_LANConnectUI;
|
||||
extern const GUID CLSID_LanConnectStatusUI;
|
||||
|
||||
/* shfldr_netconnect.c */
|
||||
HRESULT ShowNetConnectionProperties(INetConnection * pNetConnect, HWND hwnd);
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
|
@ -138,20 +138,6 @@ HRESULT ShowNetConnectionStatus(IOleCommandTarget * lpOleCmd, INetConnection * p
|
|||
|
||||
CNetworkConnections::CNetworkConnections()
|
||||
{
|
||||
ref = 0;
|
||||
HRESULT hr = CoCreateInstance(CLSID_LanConnectStatusUI, NULL, CLSCTX_INPROC_SERVER, IID_IOleCommandTarget, (LPVOID*)&lpOleCmd);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
ERR("CoCreateInstance failed\n");
|
||||
lpOleCmd = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
hr = lpOleCmd->Exec(&CGID_ShellServiceObject, 2, OLECMDEXECOPT_DODEFAULT, NULL, NULL);
|
||||
if (FAILED(hr))
|
||||
ERR("Exec CGID_ShellServiceObject failed\n");
|
||||
}
|
||||
|
||||
pidlRoot = _ILCreateNetConnect(); /* my qualified pidl */
|
||||
}
|
||||
|
|
@ -15,11 +15,31 @@ SysTrayIconHandlers_t g_IconHandlers [] = {
|
|||
};
|
||||
const int g_NumIcons = _countof(g_IconHandlers);
|
||||
|
||||
const GUID CLSID_SysTray = { 0x35CEC8A3, 0x2BE6, 0x11D2, { 0x87, 0x73, 0x92, 0xE2, 0x20, 0x52, 0x41, 0x53 } };
|
||||
|
||||
CSysTray::CSysTray() {}
|
||||
CSysTray::~CSysTray() {}
|
||||
|
||||
HRESULT CSysTray::InitNetShell()
|
||||
{
|
||||
HRESULT hr = CoCreateInstance(CLSID_ConnectionTray, 0, 1u, IID_PPV_ARG(IOleCommandTarget, &pctNetShell));
|
||||
if (FAILED(hr))
|
||||
return hr;
|
||||
|
||||
return pctNetShell->Exec(&CGID_ShellServiceObject,
|
||||
OLECMDID_NEW,
|
||||
OLECMDEXECOPT_DODEFAULT, NULL, NULL);
|
||||
}
|
||||
|
||||
HRESULT CSysTray::ShutdownNetShell()
|
||||
{
|
||||
if (!pctNetShell)
|
||||
return S_FALSE;
|
||||
HRESULT hr = pctNetShell->Exec(&CGID_ShellServiceObject,
|
||||
OLECMDID_SAVE,
|
||||
OLECMDEXECOPT_DODEFAULT, NULL, NULL);
|
||||
pctNetShell.Release();
|
||||
return hr;
|
||||
}
|
||||
|
||||
HRESULT CSysTray::InitIcons()
|
||||
{
|
||||
TRACE("Initializing Notification icons...\n");
|
||||
|
@ -30,7 +50,7 @@ HRESULT CSysTray::InitIcons()
|
|||
return hr;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
return InitNetShell();
|
||||
}
|
||||
|
||||
HRESULT CSysTray::ShutdownIcons()
|
||||
|
@ -43,7 +63,7 @@ HRESULT CSysTray::ShutdownIcons()
|
|||
return hr;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
return ShutdownNetShell();
|
||||
}
|
||||
|
||||
HRESULT CSysTray::UpdateIcons()
|
||||
|
|
|
@ -22,6 +22,8 @@ class CSysTray :
|
|||
public CWindowImpl<CSysTray, CWindow, CMessageWndClass>,
|
||||
public IOleCommandTarget
|
||||
{
|
||||
CComPtr<IOleCommandTarget> pctNetShell;
|
||||
|
||||
// TODO: keep icon handlers here
|
||||
|
||||
HWND hwndSysTray;
|
||||
|
@ -37,6 +39,9 @@ class CSysTray :
|
|||
HRESULT UpdateIcons();
|
||||
HRESULT ProcessIconMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
HRESULT InitNetShell();
|
||||
HRESULT ShutdownNetShell();
|
||||
|
||||
public:
|
||||
HRESULT NotifyIcon(INT code, UINT uId, HICON hIcon, LPCWSTR szTip);
|
||||
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include <atlbase.h>
|
||||
#include <atlcom.h>
|
||||
#include <atlwin.h>
|
||||
#include <undocshell.h>
|
||||
#include <shellutils.h>
|
||||
|
||||
#include <shellapi.h>
|
||||
|
||||
|
@ -62,46 +64,3 @@ extern HRESULT STDMETHODCALLTYPE Volume_Init(_In_ CSysTray * pSysTray);
|
|||
extern HRESULT STDMETHODCALLTYPE Volume_Shutdown(_In_ CSysTray * pSysTray);
|
||||
extern HRESULT STDMETHODCALLTYPE Volume_Update(_In_ CSysTray * pSysTray);
|
||||
extern HRESULT STDMETHODCALLTYPE Volume_Message(_In_ CSysTray * pSysTray, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
/* --------------- Utils ------------------------------ */
|
||||
|
||||
static __inline ULONG
|
||||
Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...)
|
||||
{
|
||||
char szMsg[512];
|
||||
char *szMsgStart;
|
||||
const char *fname;
|
||||
va_list vl;
|
||||
ULONG uRet;
|
||||
|
||||
fname = strrchr(filename, '\\');
|
||||
if (fname == NULL)
|
||||
{
|
||||
fname = strrchr(filename, '/');
|
||||
}
|
||||
|
||||
if (fname == NULL)
|
||||
fname = filename;
|
||||
else
|
||||
fname++;
|
||||
|
||||
szMsgStart = szMsg + sprintf(szMsg, "[%10lu] %s:%d: ", GetTickCount(), fname, line);
|
||||
|
||||
va_start(vl, lpFormat);
|
||||
uRet = (ULONG) vsprintf(szMsgStart, lpFormat, vl);
|
||||
va_end(vl);
|
||||
|
||||
OutputDebugStringA(szMsg);
|
||||
|
||||
return uRet;
|
||||
}
|
||||
|
||||
#define DbgPrint(fmt, ...) \
|
||||
Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__)
|
||||
|
||||
#if 1
|
||||
#define FAILED_UNEXPECTEDLY(hr) (FAILED(hr) && (DbgPrint("Unexpected failure %08x.\n", hr), TRUE))
|
||||
#else
|
||||
#define FAILED_UNEXPECTEDLY(hr) FAILED(hr)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -133,7 +133,6 @@ add_subdirectory(netapi32)
|
|||
add_subdirectory(netcfgx)
|
||||
add_subdirectory(netevent)
|
||||
add_subdirectory(netid)
|
||||
add_subdirectory(netshell)
|
||||
add_subdirectory(newdev)
|
||||
add_subdirectory(npptools)
|
||||
add_subdirectory(ntdsapi)
|
||||
|
|
0
reactos/dll/win32/netshell/lang/.gitignore
vendored
|
@ -114,6 +114,15 @@ DEFINE_GUID(IID_IAugmentedShellFolder3, 0x4F755EA8, 0x247D, 0x479B, 0x91, 0x8
|
|||
|
||||
DEFINE_GUID(CGID_MenuDeskBar, 0x5C9F0A12, 0x959E, 0x11D0, 0xA3, 0xA4, 0x00, 0xA0, 0xC9, 0x08, 0x26, 0x36);
|
||||
|
||||
DEFINE_GUID(CLSID_LANConnectUI, 0x7007ACC5, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E);
|
||||
DEFINE_GUID(CLSID_NetworkConnections, 0x7007ACC7, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E);
|
||||
DEFINE_GUID(CLSID_LanConnectStatusUI, 0x7007ACCF, 0x3202, 0x11D1, 0xAA, 0xD2, 0x00, 0x80, 0x5F, 0xC1, 0x27, 0x0E);
|
||||
|
||||
DEFINE_GUID(CLSID_SysTray, 0x35CEC8A3, 0x2BE6, 0x11D2, 0x87, 0x73, 0x92, 0xE2, 0x20, 0x52, 0x41, 0x53);
|
||||
|
||||
|
||||
#define CLSID_ConnectionTray CLSID_LanConnectStatusUI
|
||||
|
||||
#define CGID_IExplorerToolbar IID_IExplorerToolbar
|
||||
#define SID_IExplorerToolbar IID_IExplorerToolbar
|
||||
#define SID_ITargetFrame2 IID_ITargetFrame2
|
||||
|
|