Author: tfaber
Date: Sat Jul 20 09:56:58 2013
New Revision: 59532
URL:
http://svn.reactos.org/svn/reactos?rev=59532&view=rev
Log:
[NETSHELL]
- Fix warnings
Modified:
trunk/reactos/cmake/gcc.cmake
trunk/reactos/dll/win32/netshell/classfactory.cpp
trunk/reactos/dll/win32/netshell/connectmanager.cpp
trunk/reactos/dll/win32/netshell/enumlist.h
trunk/reactos/dll/win32/netshell/lanconnectui.cpp
trunk/reactos/dll/win32/netshell/lanstatusui.cpp
trunk/reactos/dll/win32/netshell/precomp.h
trunk/reactos/dll/win32/netshell/shfldr_netconnect.cpp
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=59532&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Sat Jul 20 09:56:58 2013
@@ -15,7 +15,7 @@
add_compile_flags("-mstackrealign")
endif()
-add_compile_flags_language("-fno-rtti -fno-exceptions" "CXX")
+add_compile_flags_language("-fno-rtti -fno-exceptions -std=c++11"
"CXX")
#bug
#file(TO_NATIVE_PATH ${REACTOS_SOURCE_DIR} REACTOS_SOURCE_DIR_NATIVE)
Modified: trunk/reactos/dll/win32/netshell/classfactory.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/classfa…
==============================================================================
--- trunk/reactos/dll/win32/netshell/classfactory.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/classfactory.cpp [iso-8859-1] Sat Jul 20 09:56:58
2013
@@ -2,7 +2,8 @@
WINE_DEFAULT_DEBUG_CHANNEL (shell);
-class CNetshellClassFactory: public IClassFactory
+class CNetshellClassFactory :
+ public IClassFactory
{
public:
CNetshellClassFactory(REFCLSID rclsid);
Modified: trunk/reactos/dll/win32/netshell/connectmanager.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/connect…
==============================================================================
--- trunk/reactos/dll/win32/netshell/connectmanager.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/connectmanager.cpp [iso-8859-1] Sat Jul 20 09:56:58
2013
@@ -9,45 +9,45 @@
NETCON_PROPERTIES Props;
} INetConnectionItem, *PINetConnectionItem;
-class CNetConnectionManager:
+class CNetConnectionManager final :
public INetConnectionManager,
public IEnumNetConnection
{
public:
CNetConnectionManager();
BOOL EnumerateINetConnections();
-
+
// IUnknown
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
virtual ULONG WINAPI AddRef();
virtual ULONG WINAPI Release();
-
+
// INetConnectionManager
virtual HRESULT WINAPI EnumConnections(NETCONMGR_ENUM_FLAGS Flags,
IEnumNetConnection **ppEnum);
-
+
// IEnumNetConnection
virtual HRESULT WINAPI Next(ULONG celt, INetConnection **rgelt, ULONG
*pceltFetched);
virtual HRESULT WINAPI Skip(ULONG celt);
virtual HRESULT WINAPI Reset();
virtual HRESULT WINAPI Clone(IEnumNetConnection **ppenum);
-
+
private:
LONG ref;
PINetConnectionItem pHead;
PINetConnectionItem pCurrent;
};
-class CNetConnection:
+class CNetConnection final :
public INetConnection
{
public:
CNetConnection(PINetConnectionItem pItem);
-
+
// IUnknown
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
virtual ULONG WINAPI AddRef();
virtual ULONG WINAPI Release();
-
+
// INetConnection
HRESULT WINAPI Connect();
HRESULT WINAPI Disconnect();
@@ -56,7 +56,7 @@
HRESULT WINAPI GetProperties(NETCON_PROPERTIES **ppProps);
HRESULT WINAPI GetUiObjectClassId(CLSID *pclsid);
HRESULT WINAPI Rename(LPCWSTR pszwDuplicateName);
-
+
private:
LONG ref;
NETCON_PROPERTIES Props;
@@ -106,7 +106,7 @@
{
ULONG refCount = InterlockedDecrement(&ref);
- if (!refCount)
+ if (!refCount)
delete this;
return refCount;
@@ -190,7 +190,7 @@
{
ULONG refCount = InterlockedDecrement(&ref);
- if (!refCount)
+ if (!refCount)
{
CoTaskMemFree(Props.pszwName);
CoTaskMemFree(Props.pszwDeviceName);
@@ -494,7 +494,7 @@
}
dwSize = 0;
- dwResult = GetAdaptersInfo(NULL, &dwSize);
+ dwResult = GetAdaptersInfo(NULL, &dwSize);
if (dwResult!= ERROR_BUFFER_OVERFLOW)
{
CoTaskMemFree(pIfTable);
Modified: trunk/reactos/dll/win32/netshell/enumlist.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/enumlis…
==============================================================================
--- trunk/reactos/dll/win32/netshell/enumlist.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/enumlist.h [iso-8859-1] Sat Jul 20 09:56:58 2013
@@ -22,24 +22,24 @@
LPITEMIDLIST pidl;
} ENUMLIST, *LPENUMLIST;
-class CEnumIDList:
+class CEnumIDList final :
public IEnumIDList
{
public:
CEnumIDList();
BOOL AddToEnumList(LPITEMIDLIST pidl);
-
+
// IUnknown
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
virtual ULONG WINAPI AddRef();
virtual ULONG WINAPI Release();
-
+
// IEnumIDList
virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG
*pceltFetched);
virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
virtual HRESULT STDMETHODCALLTYPE Reset();
virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum);
-
+
private:
LONG ref;
LPENUMLIST mpFirst;
Modified: trunk/reactos/dll/win32/netshell/lanconnectui.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanconn…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lanconnectui.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lanconnectui.cpp [iso-8859-1] Sat Jul 20 09:56:58
2013
@@ -22,38 +22,38 @@
UINT NumPropDialogOpen;
} NET_ITEM, *PNET_ITEM;
-class CNetConnectionPropertyUi:
+class CNetConnectionPropertyUi final :
public INetConnectionPropertyUi2,
public INetLanConnectionUiInfo,
public INetConnectionConnectUi
{
public:
CNetConnectionPropertyUi();
-
+
// IUnknown
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
virtual ULONG WINAPI AddRef();
virtual ULONG WINAPI Release();
-
+
// INetConnectionPropertyUi2
virtual HRESULT WINAPI AddPages(HWND hwndParent, LPFNADDPROPSHEETPAGE pfnAddPage,
LPARAM lParam);
virtual HRESULT WINAPI GetIcon(DWORD dwSize, HICON *phIcon);
// INetLanConnectionUiInfo
virtual HRESULT WINAPI GetDeviceGuid(GUID *pGuid);
-
+
// INetConnectionConnectUi
virtual HRESULT WINAPI SetConnection(INetConnection* pCon);
virtual HRESULT WINAPI Connect(HWND hwndParent, DWORD dwFlags);
virtual HRESULT WINAPI Disconnect(HWND hwndParent, DWORD dwFlags);
-
+
private:
BOOL GetINetCfgComponent(INetCfg *pNCfg, INetCfgComponent ** pOut);
VOID EnumComponents(HWND hDlgCtrl, INetCfg *pNCfg, const GUID *CompGuid, UINT
Type);
VOID InitializeLANPropertiesUIDlg(HWND hwndDlg);
VOID ShowNetworkComponentProperties(HWND hwndDlg);
static INT_PTR CALLBACK LANPropertiesUIDlg(HWND hwndDlg, UINT uMsg, WPARAM
wParam, LPARAM lParam);
-
+
INetConnection * pCon;
INetCfgLock *NCfgLock;
INetCfg * pNCfg;
@@ -505,7 +505,7 @@
HRESULT
WINAPI
CNetConnectionPropertyUi::AddPages(
- HWND hwndParent,
+ HWND hwndParent,
LPFNADDPROPSHEETPAGE pfnAddPage,
LPARAM lParam)
{
Modified: trunk/reactos/dll/win32/netshell/lanstatusui.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/lanstat…
==============================================================================
--- trunk/reactos/dll/win32/netshell/lanstatusui.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/lanstatusui.cpp [iso-8859-1] Sat Jul 20 09:56:58
2013
@@ -34,7 +34,7 @@
UINT Status;
} LANSTATUSUI_CONTEXT;
-class CLanStatus:
+class CLanStatus :
public IOleCommandTarget
{
public:
Modified: trunk/reactos/dll/win32/netshell/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/precomp…
==============================================================================
--- trunk/reactos/dll/win32/netshell/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/precomp.h [iso-8859-1] Sat Jul 20 09:56:58 2013
@@ -24,6 +24,10 @@
#include <wine/debug.h>
#include "resource.h"
+
+#if defined(_MSC_VER) && _MSC_VER < 1700
+#define final sealed
+#endif
#define NCF_VIRTUAL 0x1
#define NCF_SOFTWARE_ENUMERATED 0x2
Modified: trunk/reactos/dll/win32/netshell/shfldr_netconnect.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netshell/shfldr_…
==============================================================================
--- trunk/reactos/dll/win32/netshell/shfldr_netconnect.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netshell/shfldr_netconnect.cpp [iso-8859-1] Sat Jul 20
09:56:58 2013
@@ -28,19 +28,19 @@
* IShellFolder implementation
*/
-class CNetworkConnections:
+class CNetworkConnections final :
public IShellFolder2,
public IPersistFolder2,
public IShellExecuteHookW
{
public:
CNetworkConnections();
-
+
/* IUnknown */
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
virtual ULONG WINAPI AddRef();
virtual ULONG WINAPI Release();
-
+
// IShellFolder
virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR
lpszDisplayName, DWORD *pchEaten, LPITEMIDLIST *ppidl, DWORD *pdwAttributes);
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST
*ppEnumIDList);
@@ -61,15 +61,15 @@
virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid,
VARIANT *pv);
virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn,
SHELLDETAILS *psd);
virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid);
-
+
// IPersistFolder2
virtual HRESULT WINAPI GetClassID(CLSID *lpClassId);
virtual HRESULT WINAPI Initialize(LPCITEMIDLIST pidl);
virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST *pidl);
-
+
// IShellExecuteHookW
virtual HRESULT WINAPI Execute(LPSHELLEXECUTEINFOW pei);
-
+
private:
LONG ref;
/* both paths are parsible from the desktop */
@@ -78,7 +78,7 @@
IOleCommandTarget * lpOleCmd;
};
-class CNetConUiObject:
+class CNetConUiObject final :
public IContextMenu3,
public IObjectWithSite,
public IQueryInfo,
@@ -86,31 +86,31 @@
{
public:
CNetConUiObject(LPCITEMIDLIST apidl, IOleCommandTarget *lpOleCmd);
-
+
// IUnknown
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
virtual ULONG WINAPI AddRef();
virtual ULONG WINAPI Release();
-
+
// IContextMenu3
virtual HRESULT WINAPI QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT
idCmdFirst, UINT idCmdLast, UINT uFlags);
virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpici);
virtual HRESULT WINAPI GetCommandString(UINT_PTR idCmd, UINT uType, UINT
*pwReserved, LPSTR pszName, UINT cchMax);
virtual HRESULT WINAPI HandleMenuMsg( UINT uMsg, WPARAM wParam, LPARAM lParam);
virtual HRESULT WINAPI HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam,
LRESULT *plResult);
-
+
// IObjectWithSite
virtual HRESULT WINAPI SetSite(IUnknown *punk);
virtual HRESULT WINAPI GetSite(REFIID iid, void **ppvSite);
-
+
// IQueryInfo
virtual HRESULT WINAPI GetInfoFlags(DWORD *pdwFlags);
virtual HRESULT WINAPI GetInfoTip(DWORD dwFlags, WCHAR **ppwszTip);
-
+
// IExtractIconW
virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, LPWSTR szIconFile,
UINT cchMax, int *piIndex, UINT *pwFlags);
virtual HRESULT STDMETHODCALLTYPE Extract(LPCWSTR pszFile, UINT nIconIndex, HICON
*phiconLarge, HICON *phiconSmall, UINT nIconSize);
-
+
private:
LONG ref;
LPCITEMIDLIST apidl;
@@ -376,10 +376,10 @@
{
//IGenericSFImpl *This = (IGenericSFImpl *)iface;
HRESULT hr = S_OK;
- static const DWORD dwNetConnectAttributes = SFGAO_STORAGE | SFGAO_HASPROPSHEET |
SFGAO_STORAGEANCESTOR |
+ static const DWORD dwNetConnectAttributes = SFGAO_STORAGE | SFGAO_HASPROPSHEET |
SFGAO_STORAGEANCESTOR |
SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_HASSUBFOLDER |
SFGAO_CANRENAME | SFGAO_CANDELETE;
- static const DWORD dwNetConnectItemAttributes = SFGAO_HASPROPSHEET |
SFGAO_STORAGEANCESTOR |
+ static const DWORD dwNetConnectItemAttributes = SFGAO_HASPROPSHEET |
SFGAO_STORAGEANCESTOR |
SFGAO_FILESYSANCESTOR | SFGAO_CANRENAME;
if (!rgfInOut)
@@ -725,7 +725,7 @@
ULONG refCount;
refCount = InterlockedDecrement(&ref);
- if (!refCount)
+ if (!refCount)
delete this;
return refCount;
@@ -816,12 +816,12 @@
_InsertMenuItemW(hMenu, indexMenu++, TRUE, -1, MFT_SEPARATOR, NULL, MFS_ENABLED);
_InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_CREATELINK, MFT_STRING,
MAKEINTRESOURCEW(IDS_NET_CREATELINK), MFS_ENABLED);
- if (pProperties->dwCharacter & NCCF_ALLOW_REMOVAL)
+ if (pProperties->dwCharacter & NCCF_ALLOW_REMOVAL)
_InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_DELETE, MFT_STRING,
MAKEINTRESOURCEW(IDS_NET_DELETE), MFS_ENABLED);
else
_InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_DELETE, MFT_STRING,
MAKEINTRESOURCEW(IDS_NET_DELETE), MFS_GRAYED);
- if (pProperties->dwCharacter & NCCF_ALLOW_RENAME)
+ if (pProperties->dwCharacter & NCCF_ALLOW_RENAME)
_InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_RENAME, MFT_STRING,
MAKEINTRESOURCEW(IDS_NET_RENAME), MFS_ENABLED);
else
_InsertMenuItemW(hMenu, indexMenu++, TRUE, IDS_NET_RENAME, MFT_STRING,
MAKEINTRESOURCEW(IDS_NET_RENAME), MFS_GRAYED);