Author: tfaber
Date: Sun Apr 19 20:56:42 2015
New Revision: 67310
URL:
http://svn.reactos.org/svn/reactos?rev=67310&view=rev
Log:
[NETSHELL]
- Some additions to the previous commit
- Make destructors private
- Use delete to free object allocated using new
- Try to fix some ITEMIDLIST typing
Modified:
trunk/reactos/dll/shellext/netshell/classfactory.cpp
trunk/reactos/dll/shellext/netshell/connectmanager.cpp
trunk/reactos/dll/shellext/netshell/enumlist.cpp
trunk/reactos/dll/shellext/netshell/enumlist.h
trunk/reactos/dll/shellext/netshell/lanconnectui.cpp
trunk/reactos/dll/shellext/netshell/lanstatusui.cpp
trunk/reactos/dll/shellext/netshell/precomp.h
trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp
Modified: trunk/reactos/dll/shellext/netshell/classfactory.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/clas…
==============================================================================
--- trunk/reactos/dll/shellext/netshell/classfactory.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/netshell/classfactory.cpp [iso-8859-1] Sun Apr 19 20:56:42
2015
@@ -1,6 +1,6 @@
#include "precomp.h"
-class CNetshellClassFactory :
+class CNetshellClassFactory final :
public IClassFactory
{
public:
@@ -58,7 +58,7 @@
ULONG refCount = InterlockedDecrement(&m_ref);
if (!refCount)
- CoTaskMemFree(this);
+ delete this;
return refCount;
}
Modified: trunk/reactos/dll/shellext/netshell/connectmanager.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/conn…
==============================================================================
--- trunk/reactos/dll/shellext/netshell/connectmanager.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/netshell/connectmanager.cpp [iso-8859-1] Sun Apr 19
20:56:42 2015
@@ -40,7 +40,6 @@
{
public:
CNetConnection(PINetConnectionItem pItem);
- ~CNetConnection();
// IUnknown
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
@@ -57,6 +56,8 @@
HRESULT WINAPI Rename(LPCWSTR pszwDuplicateName);
private:
+ ~CNetConnection();
+
LONG m_ref;
NETCON_PROPERTIES m_Props;
DWORD m_dwAdapterIndex;
Modified: trunk/reactos/dll/shellext/netshell/enumlist.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/enum…
==============================================================================
--- trunk/reactos/dll/shellext/netshell/enumlist.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/netshell/enumlist.cpp [iso-8859-1] Sun Apr 19 20:56:42
2015
@@ -4,7 +4,7 @@
* AddToEnumList()
*/
BOOL
-CEnumIDList::AddToEnumList(LPITEMIDLIST pidl)
+CEnumIDList::AddToEnumList(PITEMID_CHILD pidl)
{
LPENUMLIST pNew;
@@ -99,17 +99,15 @@
WINAPI
CEnumIDList::Next(
ULONG celt,
- LPITEMIDLIST * rgelt,
+ PITEMID_CHILD *rgelt,
ULONG *pceltFetched)
{
ULONG i;
HRESULT hr = S_OK;
- LPITEMIDLIST temp;
+ PITEMID_CHILD temp;
if (pceltFetched)
*pceltFetched = 0;
-
- *rgelt=0;
if (celt > 1 && !pceltFetched)
{
@@ -170,15 +168,13 @@
CEnumIDList::Clone(
LPENUMIDLIST * ppenum)
{
- //IEnumIDListImpl *This = (IEnumIDListImpl *)iface;
-
return E_NOTIMPL;
}
-LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
+LPPIDLDATA _ILGetDataPointer(LPITEMIDLIST pidl)
{
if (pidl && pidl->mkid.cb != 0x00)
- return (LPPIDLDATA) &(pidl->mkid.abID);
+ return reinterpret_cast<LPPIDLDATA>(&pidl->mkid.abID);
return NULL;
}
@@ -186,7 +182,7 @@
{
LPITEMIDLIST pidlOut = NULL;
- pidlOut = (LPITEMIDLIST)SHAlloc(size + 5);
+ pidlOut = static_cast<LPITEMIDLIST>(SHAlloc(size + 5));
if (pidlOut)
{
LPPIDLDATA pData;
@@ -202,9 +198,9 @@
return pidlOut;
}
-LPITEMIDLIST _ILCreateNetConnect()
-{
- LPITEMIDLIST pidlOut;
+PITEMID_CHILD _ILCreateNetConnect()
+{
+ PITEMID_CHILD pidlOut;
pidlOut = _ILAlloc(PT_GUID, sizeof(PIDLDATA));
if (pidlOut)
@@ -216,9 +212,9 @@
return pidlOut;
}
-IID* _ILGetGUIDPointer(LPCITEMIDLIST pidl)
-{
- LPPIDLDATA pdata =_ILGetDataPointer(pidl);
+GUID* _ILGetGUIDPointer(LPITEMIDLIST pidl)
+{
+ LPPIDLDATA pdata = _ILGetDataPointer(pidl);
if (!pdata)
return NULL;
@@ -232,7 +228,7 @@
BOOL _ILIsNetConnect(LPCITEMIDLIST pidl)
{
- IID *piid = _ILGetGUIDPointer(pidl);
+ const IID *piid = _ILGetGUIDPointer(const_cast<LPITEMIDLIST>(pidl));
if (piid)
return IsEqualIID(*piid, CLSID_NetworkConnections);
@@ -240,9 +236,9 @@
return FALSE;
}
-LPITEMIDLIST ILCreateNetConnectItem(INetConnection * pItem)
-{
- LPITEMIDLIST pidl;
+PITEMID_CHILD ILCreateNetConnectItem(INetConnection * pItem)
+{
+ PITEMID_CHILD pidl;
LPPIDLDATA pdata;
pidl = _ILAlloc(0x99, sizeof(PIDLDATA));
@@ -252,12 +248,12 @@
return pidl;
}
-VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl)
-{
- LPPIDLDATA pdata = _ILGetDataPointer(pidl);
+const VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl)
+{
+ LPPIDLDATA pdata = _ILGetDataPointer(const_cast<LPITEMIDLIST>(pidl));
if (pdata && pdata->type==0x99)
- return (VALUEStruct*)&(pdata->u.value);
+ return reinterpret_cast<const VALUEStruct*>(&pdata->u.value);
return NULL;
}
Modified: trunk/reactos/dll/shellext/netshell/enumlist.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/enum…
==============================================================================
--- trunk/reactos/dll/shellext/netshell/enumlist.h [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/netshell/enumlist.h [iso-8859-1] Sun Apr 19 20:56:42 2015
@@ -21,7 +21,7 @@
typedef struct tagENUMLIST
{
struct tagENUMLIST *pNext;
- LPITEMIDLIST pidl;
+ PITEMID_CHILD pidl;
} ENUMLIST, *LPENUMLIST;
class CEnumIDList final :
@@ -29,7 +29,7 @@
{
public:
CEnumIDList();
- BOOL AddToEnumList(LPITEMIDLIST pidl);
+ BOOL AddToEnumList(PITEMID_CHILD pidl);
// IUnknown
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
@@ -37,7 +37,7 @@
virtual ULONG WINAPI Release();
// IEnumIDList
- virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG
*pceltFetched);
+ virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, PITEMID_CHILD *rgelt, ULONG
*pceltFetched);
virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
virtual HRESULT STDMETHODCALLTYPE Reset();
virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum);
Modified: trunk/reactos/dll/shellext/netshell/lanconnectui.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/lanc…
==============================================================================
--- trunk/reactos/dll/shellext/netshell/lanconnectui.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/netshell/lanconnectui.cpp [iso-8859-1] Sun Apr 19 20:56:42
2015
@@ -31,7 +31,6 @@
{
public:
CNetConnectionPropertyUi();
- ~CNetConnectionPropertyUi();
// IUnknown
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
@@ -51,6 +50,8 @@
virtual HRESULT WINAPI Disconnect(HWND hwndParent, DWORD dwFlags);
private:
+ ~CNetConnectionPropertyUi();
+
BOOL GetINetCfgComponent(INetCfg *pNCfg, INetCfgComponent ** pOut);
VOID EnumComponents(HWND hDlgCtrl, INetCfg *pNCfg, const GUID *CompGuid, UINT
Type);
VOID InitializeLANPropertiesUIDlg(HWND hwndDlg);
Modified: trunk/reactos/dll/shellext/netshell/lanstatusui.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/lans…
==============================================================================
--- trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/netshell/lanstatusui.cpp [iso-8859-1] Sun Apr 19 20:56:42
2015
@@ -53,16 +53,16 @@
HRESULT InitializeNetTaskbarNotifications();
HRESULT ShowStatusDialogByCLSID(const GUID *pguidCmdGroup);
- INetConnectionManager *lpNetMan;
- LONG ref;
- NOTIFICATION_ITEM *pHead;
+ INetConnectionManager *m_lpNetMan;
+ LONG m_ref;
+ NOTIFICATION_ITEM *m_pHead;
};
-CLanStatus::CLanStatus()
-{
- ref = 0;
- lpNetMan = NULL;
- pHead = NULL;
+CLanStatus::CLanStatus() :
+ m_lpNetMan(NULL),
+ m_ref(0),
+ m_pHead(NULL)
+{
}
VOID
@@ -965,9 +965,9 @@
TRACE("InitializeNetTaskbarNotifications\n");
- if (pHead)
- {
- pItem = pHead;
+ if (m_pHead)
+ {
+ pItem = m_pHead;
while (pItem)
{
hr = pItem->pNet->GetProperties(&pProps);
@@ -1074,7 +1074,7 @@
if (pLast)
pLast->pNext = pItem;
else
- pHead = pItem;
+ m_pHead = pItem;
pLast = pItem;
Index++;
@@ -1092,7 +1092,7 @@
}
} while (hr == S_OK);
- lpNetMan = pNetConMan;
+ m_lpNetMan = pNetConMan;
pEnumCon->Release();
return S_OK;
}
@@ -1102,7 +1102,7 @@
{
NOTIFICATION_ITEM *pItem;
- pItem = pHead;
+ pItem = m_pHead;
while (pItem)
{
if (IsEqualGUID(pItem->guidItem, *pguidCmdGroup))
@@ -1140,7 +1140,7 @@
WINAPI
CLanStatus::AddRef()
{
- ULONG refCount = InterlockedIncrement(&ref);
+ ULONG refCount = InterlockedIncrement(&m_ref);
return refCount;
}
@@ -1150,7 +1150,7 @@
CLanStatus::Release()
{
#if 0 // WTF?!
- ULONG refCount = InterlockedDecrement(&ref);
+ ULONG refCount = InterlockedDecrement(&m_ref);
if (!refCount)
delete this;
Modified: trunk/reactos/dll/shellext/netshell/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/prec…
==============================================================================
--- trunk/reactos/dll/shellext/netshell/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/netshell/precomp.h [iso-8859-1] Sun Apr 19 20:56:42 2015
@@ -61,11 +61,10 @@
HRESULT WINAPI ISF_NetConnect_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *
ppv);
/* enumlist.c */
-LPITEMIDLIST _ILCreateNetConnect(void);
-LPITEMIDLIST ILCreateNetConnectItem(INetConnection *pItem);
+PITEMID_CHILD _ILCreateNetConnect(void);
+PITEMID_CHILD ILCreateNetConnectItem(INetConnection *pItem);
BOOL _ILIsNetConnect(LPCITEMIDLIST pidl);
-//BOOL AddToEnumList(IEnumIDList *iface, LPITEMIDLIST pidl);
-VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl);
+const VALUEStruct * _ILGetValueStruct(LPCITEMIDLIST pidl);
/* classfactory.c */
HRESULT IClassFactory_fnConstructor(REFCLSID rclsid, REFIID riid, LPVOID *ppvOut);
Modified: trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/netshell/shfl…
==============================================================================
--- trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/shellext/netshell/shfldr_netconnect.cpp [iso-8859-1] Sun Apr 19
20:56:42 2015
@@ -33,7 +33,6 @@
{
public:
CNetworkConnections();
- ~CNetworkConnections();
/* IUnknown */
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
@@ -41,38 +40,40 @@
virtual ULONG WINAPI Release();
// IShellFolder
- virtual HRESULT WINAPI ParseDisplayName (HWND hwndOwner, LPBC pbc, LPOLESTR
lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
+ virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR
lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes);
virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST
*ppEnumIDList);
- virtual HRESULT WINAPI BindToObject(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID
riid, LPVOID *ppvOut);
- virtual HRESULT WINAPI BindToStorage(LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID
riid, LPVOID *ppvOut);
- virtual HRESULT WINAPI CompareIDs(LPARAM lParam, LPCITEMIDLIST pidl1,
LPCITEMIDLIST pidl2);
+ virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved,
REFIID riid, LPVOID *ppvOut);
+ virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved,
REFIID riid, LPVOID *ppvOut);
+ virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1,
PCUIDLIST_RELATIVE pidl2);
virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID
*ppvOut);
- virtual HRESULT WINAPI GetAttributesOf (UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
DWORD *rgfInOut);
+ virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl,
DWORD *rgfInOut);
virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl,
PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut);
- virtual HRESULT WINAPI GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags,
LPSTRRET strRet);
- virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, LPCITEMIDLIST pidl, LPCOLESTR
lpName, DWORD dwFlags, LPITEMIDLIST *pPidlOut);
+ virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags,
LPSTRRET strRet);
+ virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR
lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut);
/* IShellFolder2 */
virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid);
virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum);
virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG
*pDisplay);
virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags);
- virtual HRESULT WINAPI GetDetailsEx(LPCITEMIDLIST pidl, const SHCOLUMNID *pscid,
VARIANT *pv);
- virtual HRESULT WINAPI GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn,
SHELLDETAILS *psd);
+ virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID
*pscid, VARIANT *pv);
+ virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD 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);
+ virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl);
+ virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE *pidl);
// IShellExecuteHookW
virtual HRESULT WINAPI Execute(LPSHELLEXECUTEINFOW pei);
private:
+ ~CNetworkConnections();
+
LONG m_ref;
/* both paths are parsible from the desktop */
- LPITEMIDLIST m_pidlRoot; /* absolute pidl */
+ PIDLIST_ABSOLUTE m_pidlRoot;
IOleCommandTarget *m_lpOleCmd;
};
@@ -83,7 +84,7 @@
public IExtractIconW
{
public:
- CNetConUiObject(LPCITEMIDLIST apidl, IOleCommandTarget *lpOleCmd);
+ CNetConUiObject(PCUITEMID_CHILD pidl, IOleCommandTarget *lpOleCmd);
// IUnknown
virtual HRESULT WINAPI QueryInterface(REFIID riid, LPVOID *ppvOut);
@@ -111,7 +112,7 @@
private:
LONG m_ref;
- LPCITEMIDLIST m_apidl;
+ PCUITEMID_CHILD m_pidl;
IUnknown *m_pUnknown;
IOleCommandTarget *m_lpOleCmd;
};
@@ -136,10 +137,10 @@
HRESULT ShowNetConnectionStatus(IOleCommandTarget * lpOleCmd, INetConnection *
pNetConnect, HWND hwnd);
-CNetworkConnections::CNetworkConnections()
- : m_ref(0),
- m_pidlRoot(_ILCreateNetConnect()),
- m_lpOleCmd(NULL)
+CNetworkConnections::CNetworkConnections() :
+ m_ref(0),
+ m_pidlRoot(_ILCreateNetConnect()),
+ m_lpOleCmd(NULL)
{
}
@@ -218,7 +219,7 @@
*/
HRESULT WINAPI CNetworkConnections::ParseDisplayName (
HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName,
- DWORD * pchEaten, LPITEMIDLIST * ppidl, DWORD * pdwAttributes)
+ DWORD * pchEaten, PIDLIST_RELATIVE * ppidl, DWORD * pdwAttributes)
{
HRESULT hr = E_UNEXPECTED;
@@ -239,7 +240,7 @@
IEnumNetConnection *pEnumCon;
INetConnection *INetCon;
ULONG Count;
- LPITEMIDLIST pidl;
+ PITEMID_CHILD pidl;
/* get an instance to of IConnectionManager */
hr = INetConnectionManager_Constructor(NULL, IID_INetConnectionManager,
(LPVOID*)&pNetConMan);
@@ -296,7 +297,7 @@
* ISF_NetConnect_fnBindToObject
*/
HRESULT WINAPI CNetworkConnections::BindToObject (
- LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
+ PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
{
return E_NOTIMPL;
}
@@ -305,7 +306,7 @@
* ISF_NetConnect_fnBindToStorage
*/
HRESULT WINAPI CNetworkConnections::BindToStorage(
- LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
+ PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID * ppvOut)
{
*ppvOut = NULL;
return E_NOTIMPL;
@@ -316,12 +317,8 @@
*/
HRESULT WINAPI CNetworkConnections::CompareIDs(
- LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
-{
- //IGenericSFImpl *This = (IGenericSFImpl *)iface;
-
-
-
+ LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
+{
return E_NOTIMPL;
}
@@ -404,9 +401,9 @@
*
*/
-HRESULT IContextMenuImpl_Constructor(REFIID riid, LPCITEMIDLIST apidl, LPVOID * ppvOut,
IOleCommandTarget * lpOleCmd)
-{
- CNetConUiObject *pMenu = new CNetConUiObject(apidl, lpOleCmd);
+HRESULT IContextMenuImpl_Constructor(REFIID riid, PCUITEMID_CHILD pidl, LPVOID * ppvOut,
IOleCommandTarget * lpOleCmd)
+{
+ CNetConUiObject *pMenu = new CNetConUiObject(pidl, lpOleCmd);
if (!pMenu)
return E_OUTOFMEMORY;
@@ -444,12 +441,12 @@
* ISF_NetConnect_fnGetDisplayNameOf
*
*/
-HRESULT WINAPI CNetworkConnections::GetDisplayNameOf(LPCITEMIDLIST pidl, DWORD dwFlags,
LPSTRRET strRet)
+HRESULT WINAPI CNetworkConnections::GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags,
LPSTRRET strRet)
{
LPWSTR pszName;
HRESULT hr = E_FAIL;
NETCON_PROPERTIES * pProperties;
- VALUEStruct * val;
+ const VALUEStruct * val;
if (!strRet)
return E_INVALIDARG;
@@ -510,10 +507,10 @@
* ppidlOut [out] simple pidl returned
*/
HRESULT WINAPI CNetworkConnections::SetNameOf (
- HWND hwndOwner, LPCITEMIDLIST pidl, /*simple pidl */
- LPCOLESTR lpName, DWORD dwFlags, LPITEMIDLIST * pPidlOut)
-{
- VALUEStruct * val;
+ HWND hwndOwner, PCUITEMID_CHILD pidl, /*simple pidl */
+ LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD * pPidlOut)
+{
+ const VALUEStruct * val;
val = _ILGetValueStruct(pidl);
if (!val)
@@ -554,17 +551,17 @@
}
HRESULT WINAPI CNetworkConnections::GetDetailsEx(
- LPCITEMIDLIST pidl, const SHCOLUMNID * pscid, VARIANT * pv)
+ PCUITEMID_CHILD pidl, const SHCOLUMNID * pscid, VARIANT * pv)
{
return E_NOTIMPL;
}
HRESULT WINAPI CNetworkConnections::GetDetailsOf(
- LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS * psd)
+ PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS * psd)
{
WCHAR buffer[MAX_PATH] = {0};
HRESULT hr = E_FAIL;
- VALUEStruct * val;
+ const VALUEStruct * val;
NETCON_PROPERTIES * pProperties;
if (iColumn >= NETCONNECTSHELLVIEWCOLUMNS)
@@ -667,9 +664,9 @@
* IContextMenu2 Implementation
*/
-CNetConUiObject::CNetConUiObject(LPCITEMIDLIST apidl, IOleCommandTarget *lpOleCmd)
+CNetConUiObject::CNetConUiObject(PCUITEMID_CHILD pidl, IOleCommandTarget *lpOleCmd)
: m_ref(0),
- m_apidl(apidl),
+ m_pidl(pidl),
m_pUnknown(NULL),
m_lpOleCmd(lpOleCmd)
{
@@ -784,10 +781,10 @@
UINT idCmdLast,
UINT uFlags)
{
- VALUEStruct * val;
+ const VALUEStruct * val;
NETCON_PROPERTIES * pProperties;
- val = _ILGetValueStruct(m_apidl);
+ val = _ILGetValueStruct(m_pidl);
if (!val)
return E_FAIL;
@@ -923,9 +920,9 @@
*/
HRESULT WINAPI CNetConUiObject::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi)
{
- VALUEStruct * val;
-
- val = _ILGetValueStruct(m_apidl);
+ const VALUEStruct * val;
+
+ val = _ILGetValueStruct(m_pidl);
if (!val)
return E_FAIL;
@@ -1032,7 +1029,7 @@
int *piIndex,
UINT *pwFlags)
{
- VALUEStruct *val;
+ const VALUEStruct *val;
NETCON_PROPERTIES *pProperties;
*pwFlags = 0;
@@ -1042,7 +1039,7 @@
return E_FAIL;
}
- val = _ILGetValueStruct(m_apidl);
+ val = _ILGetValueStruct(m_pidl);
if (!val)
{
ERR("_ILGetValueStruct failed\n");
@@ -1110,7 +1107,7 @@
*
* NOTES: it makes no sense to change the pidl
*/
-HRESULT WINAPI CNetworkConnections::Initialize(LPCITEMIDLIST pidl)
+HRESULT WINAPI CNetworkConnections::Initialize(PCIDLIST_ABSOLUTE pidl)
{
SHFree(m_pidlRoot);
m_pidlRoot = ILClone(pidl);
@@ -1121,7 +1118,7 @@
/**************************************************************************
* ISF_NetConnect_PersistFolder2_GetCurFolder
*/
-HRESULT WINAPI CNetworkConnections::GetCurFolder(LPITEMIDLIST *pidl)
+HRESULT WINAPI CNetworkConnections::GetCurFolder(PIDLIST_ABSOLUTE *pidl)
{
if (!pidl)
return E_POINTER;
@@ -1136,7 +1133,7 @@
*/
HRESULT WINAPI CNetworkConnections::Execute(LPSHELLEXECUTEINFOW pei)
{
- VALUEStruct *val;
+ const VALUEStruct *val;
NETCON_PROPERTIES * pProperties;
val = _ILGetValueStruct(ILFindLastID((ITEMIDLIST*)pei->lpIDList));