[NETSHELL]

- Fix warnings

svn path=/trunk/; revision=59532
This commit is contained in:
Thomas Faber 2013-07-20 09:56:58 +00:00
parent 4248694ae9
commit e713afc1f4
8 changed files with 49 additions and 44 deletions

View file

@ -15,7 +15,7 @@ if(GCC_VERSION VERSION_GREATER 4.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)

View file

@ -2,7 +2,8 @@
WINE_DEFAULT_DEBUG_CHANNEL (shell);
class CNetshellClassFactory: public IClassFactory
class CNetshellClassFactory :
public IClassFactory
{
public:
CNetshellClassFactory(REFCLSID rclsid);

View file

@ -9,45 +9,45 @@ typedef struct tagINetConnectionItem
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 @@ class CNetConnection:
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 @@ CNetConnectionManager::Release()
{
ULONG refCount = InterlockedDecrement(&ref);
if (!refCount)
if (!refCount)
delete this;
return refCount;
@ -190,7 +190,7 @@ CNetConnection::Release()
{
ULONG refCount = InterlockedDecrement(&ref);
if (!refCount)
if (!refCount)
{
CoTaskMemFree(Props.pszwName);
CoTaskMemFree(Props.pszwDeviceName);
@ -494,7 +494,7 @@ CNetConnectionManager::EnumerateINetConnections()
}
dwSize = 0;
dwResult = GetAdaptersInfo(NULL, &dwSize);
dwResult = GetAdaptersInfo(NULL, &dwSize);
if (dwResult!= ERROR_BUFFER_OVERFLOW)
{
CoTaskMemFree(pIfTable);

View file

@ -22,24 +22,24 @@ typedef struct tagENUMLIST
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;

View file

@ -22,38 +22,38 @@ typedef struct
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 @@ CNetConnectionPropertyUi::Release()
HRESULT
WINAPI
CNetConnectionPropertyUi::AddPages(
HWND hwndParent,
HWND hwndParent,
LPFNADDPROPSHEETPAGE pfnAddPage,
LPARAM lParam)
{

View file

@ -34,7 +34,7 @@ typedef struct
UINT Status;
} LANSTATUSUI_CONTEXT;
class CLanStatus:
class CLanStatus :
public IOleCommandTarget
{
public:

View file

@ -25,6 +25,10 @@
#include "resource.h"
#if defined(_MSC_VER) && _MSC_VER < 1700
#define final sealed
#endif
#define NCF_VIRTUAL 0x1
#define NCF_SOFTWARE_ENUMERATED 0x2
#define NCF_PHYSICAL 0x4

View file

@ -28,19 +28,19 @@ WINE_DEFAULT_DEBUG_CHANNEL (shell);
* 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 @@ class CNetworkConnections:
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 @@ class CNetworkConnections:
IOleCommandTarget * lpOleCmd;
};
class CNetConUiObject:
class CNetConUiObject final :
public IContextMenu3,
public IObjectWithSite,
public IQueryInfo,
@ -86,31 +86,31 @@ class CNetConUiObject:
{
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 @@ HRESULT WINAPI CNetworkConnections::GetAttributesOf(
{
//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 WINAPI CNetConUiObject::Release()
ULONG refCount;
refCount = InterlockedDecrement(&ref);
if (!refCount)
if (!refCount)
delete this;
return refCount;
@ -816,12 +816,12 @@ HRESULT WINAPI CNetConUiObject::QueryContextMenu(
_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);