Commit 63fecde9 authored by Martin Fuchs's avatar Martin Fuchs Committed by Alexandre Julliard

Declare LPCITEMIDLIST as 'const' pointer and adjust shell32

implementation to the corrected type.
parent 8a4f2ada
...@@ -3109,7 +3109,7 @@ LPITEMIDLIST GetPidlFromName(IShellFolder *lpsf,LPWSTR lpcstrFileName) ...@@ -3109,7 +3109,7 @@ LPITEMIDLIST GetPidlFromName(IShellFolder *lpsf,LPWSTR lpcstrFileName)
/* /*
*/ */
BOOL IsPidlFolder (LPSHELLFOLDER psf, LPITEMIDLIST pidl) BOOL IsPidlFolder (LPSHELLFOLDER psf, LPCITEMIDLIST pidl)
{ {
ULONG uAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER; ULONG uAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
HRESULT ret; HRESULT ret;
......
...@@ -102,7 +102,7 @@ static void COMDLG32_UpdateCurrentDir(FileOpenDlgInfos *fodInfos) ...@@ -102,7 +102,7 @@ static void COMDLG32_UpdateCurrentDir(FileOpenDlgInfos *fodInfos)
} }
/* copied from shell32 to avoid linking to it */ /* copied from shell32 to avoid linking to it */
static HRESULT COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl) static HRESULT COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPCITEMIDLIST pidl)
{ {
TRACE("dest=%p len=0x%lx strret=%p pidl=%p stub\n",dest,len,src,pidl); TRACE("dest=%p len=0x%lx strret=%p pidl=%p stub\n",dest,len,src,pidl);
...@@ -722,7 +722,7 @@ HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowse ...@@ -722,7 +722,7 @@ HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowse
HRESULT hRes; HRESULT hRes;
ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER; ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr); IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, (LPCITEMIDLIST *)&pidl, &ulAttr);
if (ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER) ) if (ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER) )
{ {
hRes = IShellBrowser_BrowseObject((IShellBrowser *)This,pidl,SBSP_RELATIVE); hRes = IShellBrowser_BrowseObject((IShellBrowser *)This,pidl,SBSP_RELATIVE);
......
...@@ -151,7 +151,7 @@ LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex); ...@@ -151,7 +151,7 @@ LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex);
UINT GetNumSelected(IDataObject *doSelected); UINT GetNumSelected(IDataObject *doSelected);
/* pidl handling */ /* pidl handling */
BOOL IsPidlFolder (LPSHELLFOLDER psf, LPITEMIDLIST pidl); BOOL IsPidlFolder (LPSHELLFOLDER psf, LPCITEMIDLIST pidl);
/* Functions used by the EDIT box */ /* Functions used by the EDIT box */
void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd); void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd);
......
...@@ -40,7 +40,7 @@ static LPBROWSEINFOW lpBrowseInfo; ...@@ -40,7 +40,7 @@ static LPBROWSEINFOW lpBrowseInfo;
static LPITEMIDLIST pidlRet; static LPITEMIDLIST pidlRet;
static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hParent, IEnumIDList* lpe); static void FillTreeView(LPSHELLFOLDER lpsf, LPITEMIDLIST lpifq, HTREEITEM hParent, IEnumIDList* lpe);
static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPITEMIDLIST pidl, LPITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent); static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent);
#define SUPPORTEDFLAGS (BIF_STATUSTEXT | \ #define SUPPORTEDFLAGS (BIF_STATUSTEXT | \
BIF_BROWSEFORCOMPUTER | \ BIF_BROWSEFORCOMPUTER | \
...@@ -153,7 +153,7 @@ typedef struct tagID ...@@ -153,7 +153,7 @@ typedef struct tagID
IEnumIDList* pEnumIL; IEnumIDList* pEnumIL;
} TV_ITEMDATA, *LPTV_ITEMDATA; } TV_ITEMDATA, *LPTV_ITEMDATA;
static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPWSTR lpFriendlyName) static BOOL GetName(LPSHELLFOLDER lpsf, LPCITEMIDLIST lpi, DWORD dwFlags, LPWSTR lpFriendlyName)
{ {
BOOL bSuccess=TRUE; BOOL bSuccess=TRUE;
STRRET str; STRRET str;
...@@ -173,7 +173,7 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPWSTR ...@@ -173,7 +173,7 @@ static BOOL GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST lpi, DWORD dwFlags, LPWSTR
return bSuccess; return bSuccess;
} }
static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPITEMIDLIST pidl, LPITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent) static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPCITEMIDLIST pidl, LPCITEMIDLIST pidlParent, IEnumIDList* pEnumIL, HTREEITEM hParent)
{ {
TVITEMW tvi; TVITEMW tvi;
TVINSERTSTRUCTW tvins; TVINSERTSTRUCTW tvins;
...@@ -212,7 +212,7 @@ static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPITEMIDLIST pidl, LPIT ...@@ -212,7 +212,7 @@ static HTREEITEM InsertTreeViewItem(IShellFolder * lpsf, LPITEMIDLIST pidl, LPIT
static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hParent, IEnumIDList* lpe) static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hParent, IEnumIDList* lpe)
{ {
HTREEITEM hPrev = 0; HTREEITEM hPrev = 0;
LPITEMIDLIST pidlTemp=0; LPITEMIDLIST pidlTemp = 0;
ULONG ulFetched; ULONG ulFetched;
HRESULT hr; HRESULT hr;
HWND hwnd=GetParent(hwndTreeView); HWND hwnd=GetParent(hwndTreeView);
...@@ -226,7 +226,7 @@ static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hPar ...@@ -226,7 +226,7 @@ static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST pidl, HTREEITEM hPar
ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER; ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER;
IEnumIDList* pEnumIL = NULL; IEnumIDList* pEnumIL = NULL;
IShellFolder* pSFChild = NULL; IShellFolder* pSFChild = NULL;
IShellFolder_GetAttributesOf(lpsf, 1, &pidlTemp, &ulAttrs); IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulAttrs);
if (ulAttrs & SFGAO_FOLDER) if (ulAttrs & SFGAO_FOLDER)
{ {
hr = IShellFolder_BindToObject(lpsf,pidlTemp,NULL,&IID_IShellFolder,(LPVOID*)&pSFChild); hr = IShellFolder_BindToObject(lpsf,pidlTemp,NULL,&IID_IShellFolder,(LPVOID*)&pSFChild);
...@@ -278,14 +278,14 @@ static void BrsFolder_CheckValidSelection(HWND hWndTree, LPTV_ITEMDATA lptvid) ...@@ -278,14 +278,14 @@ static void BrsFolder_CheckValidSelection(HWND hWndTree, LPTV_ITEMDATA lptvid)
if (lpBrowseInfo->ulFlags & BIF_RETURNFSANCESTORS) if (lpBrowseInfo->ulFlags & BIF_RETURNFSANCESTORS)
{ {
dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM; dwAttributes = SFGAO_FILESYSANCESTOR | SFGAO_FILESYSTEM;
if (FAILED(IShellFolder_GetAttributesOf(lptvid->lpsfParent, 1, &lptvid->lpi, &dwAttributes)) || if (FAILED(IShellFolder_GetAttributesOf(lptvid->lpsfParent, 1, (LPCITEMIDLIST*)&lptvid->lpi, &dwAttributes)) ||
!dwAttributes) !dwAttributes)
bEnabled = FALSE; bEnabled = FALSE;
} }
if (lpBrowseInfo->ulFlags & BIF_RETURNONLYFSDIRS) if (lpBrowseInfo->ulFlags & BIF_RETURNONLYFSDIRS)
{ {
dwAttributes = SFGAO_FOLDER | SFGAO_FILESYSTEM; dwAttributes = SFGAO_FOLDER | SFGAO_FILESYSTEM;
if (FAILED(IShellFolder_GetAttributesOf(lptvid->lpsfParent, 1, &lptvid->lpi, &dwAttributes)) || if (FAILED(IShellFolder_GetAttributesOf(lptvid->lpsfParent, 1, (LPCITEMIDLIST*)&lptvid->lpi, &dwAttributes)) ||
(dwAttributes != (SFGAO_FOLDER | SFGAO_FILESYSTEM))) (dwAttributes != (SFGAO_FOLDER | SFGAO_FILESYSTEM)))
bEnabled = FALSE; bEnabled = FALSE;
} }
......
...@@ -48,7 +48,7 @@ typedef struct _NOTIFICATIONLIST ...@@ -48,7 +48,7 @@ typedef struct _NOTIFICATIONLIST
LONG wEventMask; /* subscribed events */ LONG wEventMask; /* subscribed events */
LONG wSignalledEvent; /* event that occurred */ LONG wSignalledEvent; /* event that occurred */
DWORD dwFlags; /* client flags */ DWORD dwFlags; /* client flags */
LPCITEMIDLIST pidlSignaled; /*pidl of the path that caused the signal*/ LPCITEMIDLIST pidlSignaled; /*pidl of the path that caused the signal*/
} NOTIFICATIONLIST, *LPNOTIFICATIONLIST; } NOTIFICATIONLIST, *LPNOTIFICATIONLIST;
...@@ -424,7 +424,7 @@ DWORD WINAPI NTSHChangeNotifyRegister( ...@@ -424,7 +424,7 @@ DWORD WINAPI NTSHChangeNotifyRegister(
HANDLE WINAPI SHChangeNotification_Lock( HANDLE WINAPI SHChangeNotification_Lock(
HANDLE hChange, HANDLE hChange,
DWORD dwProcessId, DWORD dwProcessId,
LPITEMIDLIST **lppidls, LPCITEMIDLIST **lppidls,
LPLONG lpwEventId) LPLONG lpwEventId)
{ {
DWORD i; DWORD i;
......
...@@ -226,7 +226,7 @@ static struct ICOM_VTABLE(IDataObject) dtovt; ...@@ -226,7 +226,7 @@ static struct ICOM_VTABLE(IDataObject) dtovt;
/************************************************************************** /**************************************************************************
* IDataObject_Constructor * IDataObject_Constructor
*/ */
LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPITEMIDLIST pMyPidl, LPITEMIDLIST * apidl, UINT cidl) LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST pMyPidl, LPCITEMIDLIST * apidl, UINT cidl)
{ {
IDataObjectImpl* dto; IDataObjectImpl* dto;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(pidl); WINE_DEFAULT_DEBUG_CHANNEL(pidl);
LPITEMIDLIST _dbg_ILGetNext(LPITEMIDLIST pidl) LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
{ {
WORD len; WORD len;
...@@ -41,8 +41,7 @@ LPITEMIDLIST _dbg_ILGetNext(LPITEMIDLIST pidl) ...@@ -41,8 +41,7 @@ LPITEMIDLIST _dbg_ILGetNext(LPITEMIDLIST pidl)
len = pidl->mkid.cb; len = pidl->mkid.cb;
if (len) if (len)
{ {
pidl = (LPITEMIDLIST) (((LPBYTE)pidl)+len); return (LPITEMIDLIST) (((LPBYTE)pidl)+len);
return pidl;
} }
} }
return NULL; return NULL;
...@@ -53,7 +52,7 @@ BOOL _dbg_ILIsDesktop(LPCITEMIDLIST pidl) ...@@ -53,7 +52,7 @@ BOOL _dbg_ILIsDesktop(LPCITEMIDLIST pidl)
return ( !pidl || (pidl && pidl->mkid.cb == 0x00) ); return ( !pidl || (pidl && pidl->mkid.cb == 0x00) );
} }
LPPIDLDATA _dbg_ILGetDataPointer(LPITEMIDLIST pidl) LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
{ {
if(pidl && pidl->mkid.cb != 0x00) if(pidl && pidl->mkid.cb != 0x00)
return (LPPIDLDATA) &(pidl->mkid.abID); return (LPPIDLDATA) &(pidl->mkid.abID);
...@@ -174,7 +173,7 @@ DWORD _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize) ...@@ -174,7 +173,7 @@ DWORD _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
void pdump (LPCITEMIDLIST pidl) void pdump (LPCITEMIDLIST pidl)
{ {
LPITEMIDLIST pidltemp = pidl; LPCITEMIDLIST pidltemp = pidl;
if (!TRACE_ON(pidl)) return; if (!TRACE_ON(pidl)) return;
...@@ -220,7 +219,7 @@ void pdump (LPCITEMIDLIST pidl) ...@@ -220,7 +219,7 @@ void pdump (LPCITEMIDLIST pidl)
BOOL pcheck (LPCITEMIDLIST pidl) BOOL pcheck (LPCITEMIDLIST pidl)
{ {
DWORD type, ret=TRUE; DWORD type, ret=TRUE;
LPITEMIDLIST pidltemp = pidl; LPCITEMIDLIST pidltemp = pidl;
if (pidltemp && pidltemp->mkid.cb) if (pidltemp && pidltemp->mkid.cb)
{ do { do
......
...@@ -320,7 +320,7 @@ BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList) ...@@ -320,7 +320,7 @@ BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList)
*/ */
BOOL PidlToSicIndex ( BOOL PidlToSicIndex (
IShellFolder * sh, IShellFolder * sh,
LPITEMIDLIST pidl, LPCITEMIDLIST pidl,
BOOL bBigIcon, BOOL bBigIcon,
UINT uFlags, UINT uFlags,
UINT * pIndex) UINT * pIndex)
......
...@@ -87,7 +87,7 @@ BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR pa ...@@ -87,7 +87,7 @@ BOOL WINAPI ILGetDisplayNameExW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR pa
{ {
LPSHELLFOLDER psfParent, lsf = psf; LPSHELLFOLDER psfParent, lsf = psf;
HRESULT ret = NO_ERROR; HRESULT ret = NO_ERROR;
LPITEMIDLIST pidllast; LPCITEMIDLIST pidllast;
STRRET strret; STRRET strret;
DWORD flag; DWORD flag;
...@@ -176,8 +176,8 @@ BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl, LPVOID path) ...@@ -176,8 +176,8 @@ BOOL WINAPI ILGetDisplayName(LPCITEMIDLIST pidl, LPVOID path)
* NOTES * NOTES
* observed: pidl=Desktop return=pidl * observed: pidl=Desktop return=pidl
*/ */
LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl) LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
{ LPITEMIDLIST pidlLast = pidl; { LPCITEMIDLIST pidlLast = pidl;
TRACE("(pidl=%p)\n",pidl); TRACE("(pidl=%p)\n",pidl);
...@@ -186,7 +186,7 @@ LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl) ...@@ -186,7 +186,7 @@ LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl)
pidlLast = pidl; pidlLast = pidl;
pidl = ILGetNext(pidl); pidl = ILGetNext(pidl);
} }
return pidlLast; return (LPITEMIDLIST)pidlLast;
} }
/************************************************************************* /*************************************************************************
* ILRemoveLastID [SHELL32.17] * ILRemoveLastID [SHELL32.17]
...@@ -319,7 +319,7 @@ HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl) ...@@ -319,7 +319,7 @@ HRESULT WINAPI ILLoadFromStream (IStream * pStream, LPITEMIDLIST * ppPidl)
*/ */
HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl) HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl)
{ {
LPITEMIDLIST pidl; LPCITEMIDLIST pidl;
WORD wLen = 0; WORD wLen = 0;
HRESULT ret = E_FAIL; HRESULT ret = E_FAIL;
...@@ -445,8 +445,8 @@ BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) ...@@ -445,8 +445,8 @@ BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
char szData1[MAX_PATH]; char szData1[MAX_PATH];
char szData2[MAX_PATH]; char szData2[MAX_PATH];
LPITEMIDLIST pidltemp1 = pidl1; LPCITEMIDLIST pidltemp1 = pidl1;
LPITEMIDLIST pidltemp2 = pidl2; LPCITEMIDLIST pidltemp2 = pidl2;
TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2); TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2);
...@@ -490,8 +490,8 @@ BOOL WINAPI ILIsParent( LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL ...@@ -490,8 +490,8 @@ BOOL WINAPI ILIsParent( LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL
char szData1[MAX_PATH]; char szData1[MAX_PATH];
char szData2[MAX_PATH]; char szData2[MAX_PATH];
LPITEMIDLIST pParent = pidlParent; LPCITEMIDLIST pParent = pidlParent;
LPITEMIDLIST pChild = pidlChild; LPCITEMIDLIST pChild = pidlChild;
TRACE("%p %p %x\n", pidlParent, pidlChild, bImmediate); TRACE("%p %p %x\n", pidlParent, pidlChild, bImmediate);
...@@ -528,14 +528,14 @@ BOOL WINAPI ILIsParent( LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL ...@@ -528,14 +528,14 @@ BOOL WINAPI ILIsParent( LPCITEMIDLIST pidlParent, LPCITEMIDLIST pidlChild, BOOL
* pidl2 shorter pidl1 0 * pidl2 shorter pidl1 0
* pidl2 equal pidl1 pointer to last 0x00-element of pidl2 * pidl2 equal pidl1 pointer to last 0x00-element of pidl2
*/ */
LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2) LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
{ {
char szData1[MAX_PATH]; char szData1[MAX_PATH];
char szData2[MAX_PATH]; char szData2[MAX_PATH];
LPITEMIDLIST pidltemp1 = pidl1; LPCITEMIDLIST pidltemp1 = pidl1;
LPITEMIDLIST pidltemp2 = pidl2; LPCITEMIDLIST pidltemp2 = pidl2;
LPITEMIDLIST ret=NULL; LPCITEMIDLIST ret=NULL;
TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2); TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2);
...@@ -572,7 +572,7 @@ LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2) ...@@ -572,7 +572,7 @@ LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
} }
} }
TRACE_(shell)("--- %p\n", ret); TRACE_(shell)("--- %p\n", ret);
return ret; /* pidl 1 is shorter */ return (LPITEMIDLIST)ret; /* pidl 1 is shorter */
} }
/************************************************************************* /*************************************************************************
...@@ -662,9 +662,9 @@ LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl) ...@@ -662,9 +662,9 @@ LPITEMIDLIST WINAPI SHLogILFromFSIL(LPITEMIDLIST pidl)
* NOTES * NOTES
* exported by ordinal * exported by ordinal
*/ */
DWORD WINAPI ILGetSize(LPITEMIDLIST pidl) DWORD WINAPI ILGetSize(LPCITEMIDLIST pidl)
{ {
LPSHITEMID si = &(pidl->mkid); LPCSHITEMID si = &(pidl->mkid);
DWORD len=0; DWORD len=0;
if (pidl) if (pidl)
...@@ -688,7 +688,7 @@ DWORD WINAPI ILGetSize(LPITEMIDLIST pidl) ...@@ -688,7 +688,7 @@ DWORD WINAPI ILGetSize(LPITEMIDLIST pidl)
* simple pidl -> pointer to 0x0000 element * simple pidl -> pointer to 0x0000 element
* *
*/ */
LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl) LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
{ {
WORD len; WORD len;
...@@ -701,7 +701,7 @@ LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl) ...@@ -701,7 +701,7 @@ LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl)
{ {
pidl = (LPITEMIDLIST) (((LPBYTE)pidl)+len); pidl = (LPITEMIDLIST) (((LPBYTE)pidl)+len);
TRACE("-- %p\n", pidl); TRACE("-- %p\n", pidl);
return pidl; return (LPITEMIDLIST)pidl;
} }
} }
return NULL; return NULL;
...@@ -764,7 +764,7 @@ DWORD WINAPI ILFree(LPITEMIDLIST pidl) ...@@ -764,7 +764,7 @@ DWORD WINAPI ILFree(LPITEMIDLIST pidl)
* ILGlobalFree [SHELL32.156] * ILGlobalFree [SHELL32.156]
* *
*/ */
void WINAPI ILGlobalFree( LPCITEMIDLIST pidl) void WINAPI ILGlobalFree( LPITEMIDLIST pidl)
{ {
TRACE("%p\n",pidl); TRACE("%p\n",pidl);
...@@ -1363,14 +1363,14 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT uInSize) ...@@ -1363,14 +1363,14 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT uInSize)
case PT_SPECIAL: case PT_SPECIAL:
case PT_MYCOMP: case PT_MYCOMP:
pData =_ILGetDataPointer(pidlOut); pData = _ILGetDataPointer(pidlOut);
pData->type = type; pData->type = type;
memcpy(&(pData->u.mycomp.guid), pIn, uInSize); memcpy(&(pData->u.mycomp.guid), pIn, uInSize);
TRACE("-- create GUID-pidl %s\n", debugstr_guid(&(pData->u.mycomp.guid))); TRACE("-- create GUID-pidl %s\n", debugstr_guid(&(pData->u.mycomp.guid)));
break; break;
case PT_DRIVE: case PT_DRIVE:
pData =_ILGetDataPointer(pidlOut); pData = _ILGetDataPointer(pidlOut);
pData->type = type; pData->type = type;
pszDest = _ILGetTextPointer(pidlOut); pszDest = _ILGetTextPointer(pidlOut);
memcpy(pszDest, pIn, uInSize); memcpy(pszDest, pIn, uInSize);
...@@ -1379,7 +1379,7 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT uInSize) ...@@ -1379,7 +1379,7 @@ LPITEMIDLIST _ILCreate(PIDLTYPE type, LPCVOID pIn, UINT uInSize)
case PT_FOLDER: case PT_FOLDER:
case PT_VALUE: case PT_VALUE:
pData =_ILGetDataPointer(pidlOut); pData = _ILGetDataPointer(pidlOut);
pData->type = type; pData->type = type;
pszDest = _ILGetTextPointer(pidlOut); pszDest = _ILGetTextPointer(pidlOut);
memcpy(pszDest, pIn, uInSize); memcpy(pszDest, pIn, uInSize);
...@@ -1588,7 +1588,7 @@ DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize) ...@@ -1588,7 +1588,7 @@ DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR szOut, UINT uOutSize)
************************************************************************** **************************************************************************
* _ILGetDataPointer() * _ILGetDataPointer()
*/ */
LPPIDLDATA _ILGetDataPointer(LPITEMIDLIST pidl) LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
{ {
if(pidl && pidl->mkid.cb != 0x00) if(pidl && pidl->mkid.cb != 0x00)
return (LPPIDLDATA) &(pidl->mkid.abID); return (LPPIDLDATA) &(pidl->mkid.abID);
...@@ -1602,7 +1602,7 @@ LPPIDLDATA _ILGetDataPointer(LPITEMIDLIST pidl) ...@@ -1602,7 +1602,7 @@ LPPIDLDATA _ILGetDataPointer(LPITEMIDLIST pidl)
LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl) LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
{/* TRACE(pidl,"(pidl%p)\n", pidl);*/ {/* TRACE(pidl,"(pidl%p)\n", pidl);*/
LPPIDLDATA pdata =_ILGetDataPointer(pidl); LPPIDLDATA pdata = _ILGetDataPointer(pidl);
if (pdata) if (pdata)
{ {
...@@ -1707,7 +1707,7 @@ REFIID _ILGetGUIDPointer(LPCITEMIDLIST pidl) ...@@ -1707,7 +1707,7 @@ REFIID _ILGetGUIDPointer(LPCITEMIDLIST pidl)
*/ */
BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt) BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt)
{ {
LPPIDLDATA pdata =_ILGetDataPointer(pidl); LPPIDLDATA pdata = _ILGetDataPointer(pidl);
if(! pdata) return FALSE; if(! pdata) return FALSE;
...@@ -1762,7 +1762,7 @@ BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) ...@@ -1762,7 +1762,7 @@ BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
*/ */
DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
{ {
LPPIDLDATA pdata =_ILGetDataPointer(pidl); LPPIDLDATA pdata = _ILGetDataPointer(pidl);
DWORD dwSize; DWORD dwSize;
if(! pdata) return 0; if(! pdata) return 0;
...@@ -1782,7 +1782,7 @@ BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) ...@@ -1782,7 +1782,7 @@ BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
{ {
char szTemp[MAX_PATH]; char szTemp[MAX_PATH];
const char * pPoint; const char * pPoint;
LPITEMIDLIST pidlTemp=pidl; LPCITEMIDLIST pidlTemp=pidl;
TRACE("pidl=%p\n",pidl); TRACE("pidl=%p\n",pidl);
...@@ -1864,7 +1864,7 @@ void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) ...@@ -1864,7 +1864,7 @@ void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
*/ */
DWORD _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DWORD _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
{ {
LPPIDLDATA pData =_ILGetDataPointer(pidl); LPPIDLDATA pData = _ILGetDataPointer(pidl);
WORD wAttrib = 0; WORD wAttrib = 0;
int i; int i;
...@@ -1929,7 +1929,7 @@ void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl) ...@@ -1929,7 +1929,7 @@ void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl)
* *
* copies an aPidl struct * copies an aPidl struct
*/ */
LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl) LPITEMIDLIST* _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl)
{ {
UINT i; UINT i;
LPITEMIDLIST * apidldest = (LPITEMIDLIST*)SHAlloc(cidl * sizeof(LPITEMIDLIST)); LPITEMIDLIST * apidldest = (LPITEMIDLIST*)SHAlloc(cidl * sizeof(LPITEMIDLIST));
...@@ -1946,7 +1946,7 @@ LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl) ...@@ -1946,7 +1946,7 @@ LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl)
* *
* creates aPidl from CIDA * creates aPidl from CIDA
*/ */
LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida) LPITEMIDLIST* _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida)
{ {
UINT i; UINT i;
LPITEMIDLIST * dst = (LPITEMIDLIST*)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST)); LPITEMIDLIST * dst = (LPITEMIDLIST*)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
......
...@@ -198,7 +198,7 @@ BOOL pcheck (LPCITEMIDLIST pidl); ...@@ -198,7 +198,7 @@ BOOL pcheck (LPCITEMIDLIST pidl);
* aPidl helper * aPidl helper
*/ */
void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl); void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl);
LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl); LPITEMIDLIST * _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl);
LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida); LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida);
BOOL WINAPI ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD type); BOOL WINAPI ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD type);
......
...@@ -317,7 +317,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, ...@@ -317,7 +317,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
{ {
/* get the parent shellfolder */ /* get the parent shellfolder */
if (pidl) { if (pidl) {
hr = SHBindToParent( pidl, &IID_IShellFolder, (LPVOID*)&psfParent, &pidlLast); hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&pidlLast);
ILFree(pidl); ILFree(pidl);
} else { } else {
ERR("pidl is null!\n"); ERR("pidl is null!\n");
...@@ -332,7 +332,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, ...@@ -332,7 +332,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
{ {
psfi->dwAttributes = 0xffffffff; psfi->dwAttributes = 0xffffffff;
} }
IShellFolder_GetAttributesOf(psfParent, 1 , &pidlLast, &(psfi->dwAttributes)); IShellFolder_GetAttributesOf(psfParent, 1, (LPCITEMIDLIST*)&pidlLast, &(psfi->dwAttributes));
} }
/* get the displayname */ /* get the displayname */
...@@ -387,7 +387,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, ...@@ -387,7 +387,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
if (SUCCEEDED(hr) && (flags & SHGFI_ICONLOCATION )) if (SUCCEEDED(hr) && (flags & SHGFI_ICONLOCATION ))
{ {
UINT uDummy,uFlags; UINT uDummy,uFlags;
hr = IShellFolder_GetUIObjectOf(psfParent, 0, 1, &pidlLast, &IID_IExtractIconA, &uDummy, (LPVOID*)&pei); hr = IShellFolder_GetUIObjectOf(psfParent, 0, 1, (LPCITEMIDLIST*)&pidlLast, &IID_IExtractIconA, &uDummy, (LPVOID*)&pei);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
......
...@@ -52,7 +52,7 @@ BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList) ...@@ -52,7 +52,7 @@ BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList)
#define INVALID_INDEX -1 #define INVALID_INDEX -1
BOOL SIC_Initialize(void); BOOL SIC_Initialize(void);
void SIC_Destroy(void); void SIC_Destroy(void);
BOOL PidlToSicIndex (IShellFolder * sh, LPITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, UINT * pIndex); BOOL PidlToSicIndex (IShellFolder * sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, UINT * pIndex);
INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex ); INT SIC_GetIconIndex (LPCSTR sSourceFile, INT dwSourceIndex );
/* Classes Root */ /* Classes Root */
...@@ -78,7 +78,7 @@ DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len); ...@@ -78,7 +78,7 @@ DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len);
/**************************************************************************** /****************************************************************************
* Class constructors * Class constructors
*/ */
LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPITEMIDLIST myPidl, LPITEMIDLIST * apidl, UINT cidl); LPDATAOBJECT IDataObject_Constructor(HWND hwndOwner, LPCITEMIDLIST myPidl, LPCITEMIDLIST * apidl, UINT cidl);
LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []); LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT, const FORMATETC []);
LPCLASSFACTORY IClassFactory_Constructor(REFCLSID); LPCLASSFACTORY IClassFactory_Constructor(REFCLSID);
...@@ -99,8 +99,8 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid, ...@@ -99,8 +99,8 @@ HRESULT WINAPI IDropTargetHelper_Constructor (IUnknown * pUnkOuter, REFIID riid,
LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,DWORD); LPENUMIDLIST IEnumIDList_Constructor(LPCSTR,DWORD,DWORD);
LPEXTRACTICONA IExtractIconA_Constructor(LPITEMIDLIST); LPEXTRACTICONA IExtractIconA_Constructor(LPCITEMIDLIST);
LPEXTRACTICONW IExtractIconW_Constructor(LPITEMIDLIST); LPEXTRACTICONW IExtractIconW_Constructor(LPCITEMIDLIST);
HRESULT CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm); HRESULT CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm);
/* FIXME: rename the functions when the shell32.dll has it's own exports namespace */ /* FIXME: rename the functions when the shell32.dll has it's own exports namespace */
......
...@@ -34,10 +34,10 @@ typedef struct { ...@@ -34,10 +34,10 @@ typedef struct {
LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut); LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut);
HRESULT SHELL32_ParseNextElement (HWND hwndOwner, IShellFolder2 * psf, LPITEMIDLIST * pidlInOut, LPOLESTR szNext, HRESULT SHELL32_ParseNextElement (HWND hwndOwner, IShellFolder2 * psf, LPITEMIDLIST * pidlInOut, LPOLESTR szNext,
DWORD * pEaten, DWORD * pdwAttributes); DWORD * pEaten, DWORD * pdwAttributes);
HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPITEMIDLIST pidl, LPDWORD pdwAttributes); HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes);
HRESULT SHELL32_CoCreateInitSF (LPITEMIDLIST pidlRoot, LPITEMIDLIST pidlChild, REFCLSID clsid, REFIID iid, HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID iid,
LPVOID * ppvOut); LPVOID * ppvOut);
HRESULT SHELL32_CoCreateInitSFEx (LPITEMIDLIST pidlRoot, LPCSTR pathRoot, LPITEMIDLIST pidlChild, REFCLSID clsid, HRESULT SHELL32_CoCreateInitSFEx (LPCITEMIDLIST pidlRoot, LPCSTR pathRoot, LPCITEMIDLIST pidlChild, REFCLSID clsid,
REFIID iid, LPVOID * ppvOut); REFIID iid, LPVOID * ppvOut);
HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTR szOut, HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTR szOut,
DWORD dwOutLen); DWORD dwOutLen);
......
...@@ -139,8 +139,8 @@ HRESULT SHELL32_ParseNextElement (HWND hwndOwner, ...@@ -139,8 +139,8 @@ HRESULT SHELL32_ParseNextElement (HWND hwndOwner,
* This function is meant for virtual forders not backed by a file system * This function is meant for virtual forders not backed by a file system
* folder. * folder.
*/ */
HRESULT SHELL32_CoCreateInitSF (LPITEMIDLIST pidlRoot, HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot,
LPITEMIDLIST pidlChild, REFCLSID clsid, REFIID iid, LPVOID * ppvOut) LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID iid, LPVOID * ppvOut)
{ {
HRESULT hr; HRESULT hr;
...@@ -177,8 +177,8 @@ HRESULT SHELL32_CoCreateInitSF (LPITEMIDLIST pidlRoot, ...@@ -177,8 +177,8 @@ HRESULT SHELL32_CoCreateInitSF (LPITEMIDLIST pidlRoot,
* pathRoot can be NULL for Folders beeing a drive. * pathRoot can be NULL for Folders beeing a drive.
* In this case the absolute path is build from pidlChild (eg. C:) * In this case the absolute path is build from pidlChild (eg. C:)
*/ */
HRESULT SHELL32_CoCreateInitSFEx (LPITEMIDLIST pidlRoot, HRESULT SHELL32_CoCreateInitSFEx (LPCITEMIDLIST pidlRoot,
LPCSTR pathRoot, LPITEMIDLIST pidlChild, REFCLSID clsid, REFIID riid, LPVOID * ppvOut) LPCSTR pathRoot, LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID riid, LPVOID * ppvOut)
{ {
HRESULT hr; HRESULT hr;
IPersistFolder3 *ppf; IPersistFolder3 *ppf;
...@@ -203,7 +203,9 @@ HRESULT SHELL32_CoCreateInitSFEx (LPITEMIDLIST pidlRoot, ...@@ -203,7 +203,9 @@ HRESULT SHELL32_CoCreateInitSFEx (LPITEMIDLIST pidlRoot,
} else { } else {
szDestPath[0] = '\0'; szDestPath[0] = '\0';
} }
lstrcatA (szDestPath, _ILGetTextPointer (pidlChild));
if (pidlChild)
lstrcatA (szDestPath, _ILGetTextPointer (pidlChild));
/* fill the PERSIST_FOLDER_TARGET_INFO */ /* fill the PERSIST_FOLDER_TARGET_INFO */
ppfti.dwAttributes = -1; ppfti.dwAttributes = -1;
...@@ -330,7 +332,7 @@ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, ...@@ -330,7 +332,7 @@ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf,
* *
* This functions does not set flags!! It only resets flags when nessesary. * This functions does not set flags!! It only resets flags when nessesary.
*/ */
HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPITEMIDLIST pidl, LPDWORD pdwAttributes) HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes)
{ {
GUID const *clsid; GUID const *clsid;
DWORD dwAttributes; DWORD dwAttributes;
......
...@@ -120,12 +120,12 @@ static LPFMINFO FM_SetMenuParameter( ...@@ -120,12 +120,12 @@ static LPFMINFO FM_SetMenuParameter(
* FM_InitMenuPopup [internal] * FM_InitMenuPopup [internal]
* *
*/ */
static int FM_InitMenuPopup(HMENU hmenu, LPITEMIDLIST pAlternatePidl) static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl)
{ IShellFolder *lpsf, *lpsf2; { IShellFolder *lpsf, *lpsf2;
ULONG ulItemAttr = SFGAO_FOLDER; ULONG ulItemAttr = SFGAO_FOLDER;
UINT uID, uFlags, uEnumFlags; UINT uID, uFlags, uEnumFlags;
LPFNFMCALLBACK lpfnCallback; LPFNFMCALLBACK lpfnCallback;
LPITEMIDLIST pidl; LPCITEMIDLIST pidl;
char sTemp[MAX_PATH]; char sTemp[MAX_PATH];
int NumberOfItems = 0, iIcon; int NumberOfItems = 0, iIcon;
MENUINFO MenuInfo; MENUINFO MenuInfo;
...@@ -150,7 +150,7 @@ static int FM_InitMenuPopup(HMENU hmenu, LPITEMIDLIST pAlternatePidl) ...@@ -150,7 +150,7 @@ static int FM_InitMenuPopup(HMENU hmenu, LPITEMIDLIST pAlternatePidl)
if (menudata->bInitialized) if (menudata->bInitialized)
return 0; return 0;
pidl = ((pAlternatePidl) ? pAlternatePidl : menudata->pidl); pidl = (pAlternatePidl? pAlternatePidl: menudata->pidl);
if (!pidl) if (!pidl)
return 0; return 0;
...@@ -176,7 +176,7 @@ static int FM_InitMenuPopup(HMENU hmenu, LPITEMIDLIST pAlternatePidl) ...@@ -176,7 +176,7 @@ static int FM_InitMenuPopup(HMENU hmenu, LPITEMIDLIST pAlternatePidl)
while ((!bAbortInit) && (NOERROR == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched))) while ((!bAbortInit) && (NOERROR == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched)))
{ {
if (SUCCEEDED (IShellFolder_GetAttributesOf(lpsf, 1, &pidlTemp, &ulItemAttr))) if (SUCCEEDED (IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulItemAttr)))
{ {
ILGetDisplayNameExA(NULL, pidlTemp, sTemp, ILGDN_FORPARSING); ILGetDisplayNameExA(NULL, pidlTemp, sTemp, ILGDN_FORPARSING);
if (! (PidlToSicIndex(lpsf, pidlTemp, FALSE, 0, &iIcon))) if (! (PidlToSicIndex(lpsf, pidlTemp, FALSE, 0, &iIcon)))
......
...@@ -813,7 +813,7 @@ static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL ...@@ -813,7 +813,7 @@ static void ShellView_DoContextMenu(IShellViewImpl * This, WORD x, WORD y, BOOL
/* look, what's selected and create a context menu object of it*/ /* look, what's selected and create a context menu object of it*/
if( ShellView_GetSelections(This) ) if( ShellView_GetSelections(This) )
{ {
IShellFolder_GetUIObjectOf( This->pSFParent, This->hWndParent, This->cidl, This->apidl, IShellFolder_GetUIObjectOf( This->pSFParent, This->hWndParent, This->cidl, (LPCITEMIDLIST*)This->apidl,
(REFIID)&IID_IContextMenu, NULL, (LPVOID *)&pContextMenu); (REFIID)&IID_IContextMenu, NULL, (LPVOID *)&pContextMenu);
if(pContextMenu) if(pContextMenu)
...@@ -1217,11 +1217,11 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn ...@@ -1217,11 +1217,11 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
if(GetShellOle() && pDoDragDrop) if(GetShellOle() && pDoDragDrop)
{ {
if (SUCCEEDED(IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, This->apidl, &IID_IDataObject,0,(LPVOID *)&pda))) if (SUCCEEDED(IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, &IID_IDataObject,0,(LPVOID *)&pda)))
{ {
IDropSource * pds = (IDropSource*)&(This->lpvtblDropSource); /* own DropSource interface */ IDropSource * pds = (IDropSource*)&(This->lpvtblDropSource); /* own DropSource interface */
if (SUCCEEDED(IShellFolder_GetAttributesOf(This->pSFParent, This->cidl, This->apidl, &dwAttributes))) if (SUCCEEDED(IShellFolder_GetAttributesOf(This->pSFParent, This->cidl, (LPCITEMIDLIST*)This->apidl, &dwAttributes)))
{ {
if (dwAttributes & SFGAO_CANLINK) if (dwAttributes & SFGAO_CANLINK)
{ {
...@@ -1247,7 +1247,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn ...@@ -1247,7 +1247,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
TRACE("-- LVN_BEGINLABELEDITA %p\n",This); TRACE("-- LVN_BEGINLABELEDITA %p\n",This);
IShellFolder_GetAttributesOf(This->pSFParent, 1, &pidl, &dwAttr); IShellFolder_GetAttributesOf(This->pSFParent, 1, (LPCITEMIDLIST*)&pidl, &dwAttr);
if (SFGAO_CANRENAME & dwAttr) if (SFGAO_CANRENAME & dwAttr)
{ {
return FALSE; return FALSE;
...@@ -1355,7 +1355,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn ...@@ -1355,7 +1355,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
} }
/* perform the item deletion */ /* perform the item deletion */
ISFHelper_DeleteItems(psfhlp, i, pItems); ISFHelper_DeleteItems(psfhlp, i, (LPCITEMIDLIST*)pItems);
/* free pidl array memory */ /* free pidl array memory */
HeapFree(GetProcessHeap(), 0, pItems); HeapFree(GetProcessHeap(), 0, pItems);
...@@ -1841,7 +1841,7 @@ static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, ...@@ -1841,7 +1841,7 @@ static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem,
case SVGIO_SELECTION: case SVGIO_SELECTION:
ShellView_GetSelections(This); ShellView_GetSelections(This);
IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, This->apidl, riid, 0, ppvOut); IShellFolder_GetUIObjectOf(This->pSFParent, This->hWnd, This->cidl, (LPCITEMIDLIST*)This->apidl, riid, 0, ppvOut);
break; break;
} }
TRACE("-- (%p)->(interface=%p)\n",This, *ppvOut); TRACE("-- (%p)->(interface=%p)\n",This, *ppvOut);
...@@ -1853,7 +1853,7 @@ static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem, ...@@ -1853,7 +1853,7 @@ static HRESULT WINAPI IShellView_fnGetItemObject(IShellView * iface, UINT uItem,
static HRESULT WINAPI IShellView_fnEditItem( static HRESULT WINAPI IShellView_fnEditItem(
IShellView * iface, IShellView * iface,
LPITEMIDLIST pidl) LPCITEMIDLIST pidl)
{ {
ICOM_THIS(IShellViewImpl, iface); ICOM_THIS(IShellViewImpl, iface);
int i; int i;
......
...@@ -263,7 +263,7 @@ static BOOL DoPaste( ...@@ -263,7 +263,7 @@ static BOOL DoPaste(
/* do the copy/move */ /* do the copy/move */
if (psfhlpdst && psfhlpsrc) if (psfhlpdst && psfhlpsrc)
{ {
ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, apidl); ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl);
/* FIXME handle move /* FIXME handle move
ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl); ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl);
*/ */
......
...@@ -65,7 +65,7 @@ static BOOL ISvItemCm_CanRenameItems(ItemCmImpl *This) ...@@ -65,7 +65,7 @@ static BOOL ISvItemCm_CanRenameItems(ItemCmImpl *This)
for(i = 0; i < This->cidl; i++){} for(i = 0; i < This->cidl; i++){}
if(i > 1) return FALSE; /* can't rename more than one item at a time*/ if(i > 1) return FALSE; /* can't rename more than one item at a time*/
dwAttributes = SFGAO_CANRENAME; dwAttributes = SFGAO_CANRENAME;
IShellFolder_GetAttributesOf(This->pSFParent, 1, This->apidl, &dwAttributes); IShellFolder_GetAttributesOf(This->pSFParent, 1, (LPCITEMIDLIST*)This->apidl, &dwAttributes);
return dwAttributes & SFGAO_CANRENAME; return dwAttributes & SFGAO_CANRENAME;
} }
return FALSE; return FALSE;
...@@ -339,7 +339,7 @@ static void DoDelete(IContextMenu *iface) ...@@ -339,7 +339,7 @@ static void DoDelete(IContextMenu *iface)
IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlp); IShellFolder_QueryInterface(This->pSFParent, &IID_ISFHelper, (LPVOID*)&psfhlp);
if (psfhlp) if (psfhlp)
{ {
ISFHelper_DeleteItems(psfhlp, This->cidl, This->apidl); ISFHelper_DeleteItems(psfhlp, This->cidl, (LPCITEMIDLIST *)This->apidl);
ISFHelper_Release(psfhlp); ISFHelper_Release(psfhlp);
} }
} }
......
...@@ -37,10 +37,10 @@ LPITEMIDLIST WINAPI ILCombine( ...@@ -37,10 +37,10 @@ LPITEMIDLIST WINAPI ILCombine(
LPCITEMIDLIST iil1, LPCITEMIDLIST iil1,
LPCITEMIDLIST iil2); LPCITEMIDLIST iil2);
DWORD WINAPI ILGetSize(LPITEMIDLIST pidl); DWORD WINAPI ILGetSize(LPCITEMIDLIST pidl);
LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl); LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl);
LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl); LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl);
BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl); BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl);
LPITEMIDLIST WINAPI ILFindChild( LPITEMIDLIST WINAPI ILFindChild(
...@@ -87,7 +87,7 @@ HRESULT WINAPI ILLoadFromStream( ...@@ -87,7 +87,7 @@ HRESULT WINAPI ILLoadFromStream(
LPITEMIDLIST *ppidl); LPITEMIDLIST *ppidl);
LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl); LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl);
void WINAPI ILGlobalFree(LPCITEMIDLIST pidl); void WINAPI ILGlobalFree(LPITEMIDLIST pidl);
LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath); LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath); LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
...@@ -144,7 +144,7 @@ HRESULT WINAPI StrRetToStrNAW ( ...@@ -144,7 +144,7 @@ HRESULT WINAPI StrRetToStrNAW (
typedef struct typedef struct
{ {
LPCITEMIDLIST pidlPath; LPITEMIDLIST pidlPath;
BOOL bWatchSubtree; BOOL bWatchSubtree;
} NOTIFYREGISTER, *LPNOTIFYREGISTER; } NOTIFYREGISTER, *LPNOTIFYREGISTER;
...@@ -163,7 +163,7 @@ HANDLE WINAPI SHChangeNotifyRegister( ...@@ -163,7 +163,7 @@ HANDLE WINAPI SHChangeNotifyRegister(
LONG wEventMask, LONG wEventMask,
UINT uMsg, UINT uMsg,
int cItems, int cItems,
LPCNOTIFYREGISTER lpItems); LPNOTIFYREGISTER lpItems);
BOOL WINAPI SHChangeNotifyDeregister(HANDLE hNotify); BOOL WINAPI SHChangeNotifyDeregister(HANDLE hNotify);
...@@ -424,8 +424,8 @@ BOOL WINAPI FileMenu_TrackPopupMenuEx( ...@@ -424,8 +424,8 @@ BOOL WINAPI FileMenu_TrackPopupMenuEx(
BOOL WINAPI FileMenu_GetLastSelectedItemPidls( BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
UINT uReserved, UINT uReserved,
LPITEMIDLIST *ppidlFolder, LPCITEMIDLIST *ppidlFolder,
LPITEMIDLIST *ppidlItem); LPCITEMIDLIST *ppidlItem);
LRESULT WINAPI FileMenu_MeasureItem( LRESULT WINAPI FileMenu_MeasureItem(
HWND hWnd, HWND hWnd,
......
...@@ -42,12 +42,13 @@ typedef struct ...@@ -42,12 +42,13 @@ typedef struct
WORD cb; /* nr of bytes in this item */ WORD cb; /* nr of bytes in this item */
BYTE abID[1]; /* first byte in this item */ BYTE abID[1]; /* first byte in this item */
} SHITEMID, *LPSHITEMID; } SHITEMID, *LPSHITEMID;
typedef LPSHITEMID const LPCSHITEMID; typedef const SHITEMID *LPCSHITEMID;
typedef struct _ITEMIDLIST typedef struct _ITEMIDLIST
{ {
SHITEMID mkid; /* first itemid in list */ SHITEMID mkid; /* first itemid in list */
} ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST; } ITEMIDLIST,*LPITEMIDLIST;
typedef const ITEMIDLIST *LPCITEMIDLIST;
#include <poppack.h> #include <poppack.h>
BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath); BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment