LPCITEMIDLIST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog:
* declare LPCITEMIDLIST as 'const' pointer and adjust shell32 implementation 
to the corrected type


-- 
Martin Fuchs
martin-fuchs@gmx.net


Index: shlobj.h
===================================================================
RCS file: /home/wine/wine/include/shlobj.h,v
retrieving revision 1.68
diff -u -r1.68 shlobj.h
--- shlobj.h	28 Aug 2003 21:43:35 -0000	1.68
+++ shlobj.h	30 Aug 2003 16:47:33 -0000
@@ -42,12 +42,13 @@
     WORD cb;      /* nr of bytes in this item */
     BYTE abID[1]; /* first byte in this item */
 } SHITEMID, *LPSHITEMID;
-typedef LPSHITEMID const LPCSHITEMID;
+typedef SHITEMID const* LPCSHITEMID;
 
 typedef struct _ITEMIDLIST
 {
     SHITEMID mkid; /* first itemid in list */
-} ITEMIDLIST,*LPITEMIDLIST,*LPCITEMIDLIST;
+} ITEMIDLIST,*LPITEMIDLIST;
+typedef struct _ITEMIDLIST const* LPCITEMIDLIST;
 #include <poppack.h>
 
 BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
Index: brsfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/brsfolder.c,v
retrieving revision 1.46
diff -u -r1.46 brsfolder.c
--- brsfolder.c	2 Jul 2003 00:37:16 -0000	1.46
+++ brsfolder.c	30 Aug 2003 16:48:05 -0000
@@ -40,7 +40,7 @@
 static LPITEMIDLIST	pidlRet;
 
 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 | \
                         BIF_BROWSEFORCOMPUTER | \
@@ -153,7 +153,7 @@
    IEnumIDList*  pEnumIL;
 } 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;
 	STRRET str;
@@ -173,7 +173,7 @@
 	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;
 	TVINSERTSTRUCTW	tvins;
@@ -212,7 +212,7 @@
 static void FillTreeView(IShellFolder * lpsf, LPITEMIDLIST  pidl, HTREEITEM hParent, IEnumIDList* lpe)
 {
 	HTREEITEM	hPrev = 0;
-	LPITEMIDLIST	pidlTemp=0;
+	LPITEMIDLIST	pidlTemp = 0;
 	ULONG		ulFetched;
 	HRESULT		hr;
 	HWND		hwnd=GetParent(hwndTreeView);
@@ -226,7 +226,7 @@
 	    ULONG ulAttrs = SFGAO_HASSUBFOLDER | SFGAO_FOLDER;
 	    IEnumIDList* pEnumIL = NULL;
 	    IShellFolder* pSFChild = NULL;
-	    IShellFolder_GetAttributesOf(lpsf, 1, &pidlTemp, &ulAttrs);
+	    IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulAttrs);
 	    if (ulAttrs & SFGAO_FOLDER)
 	    {
 	        hr = IShellFolder_BindToObject(lpsf,pidlTemp,NULL,&IID_IShellFolder,(LPVOID*)&pSFChild);
@@ -278,14 +278,14 @@
     if (lpBrowseInfo->ulFlags & BIF_RETURNFSANCESTORS)
     {
         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)
             bEnabled = FALSE;
     }
     if (lpBrowseInfo->ulFlags & BIF_RETURNONLYFSDIRS)
     {
         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)))
             bEnabled = FALSE;
     }
Index: changenotify.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/changenotify.c,v
retrieving revision 1.24
diff -u -r1.24 changenotify.c
--- changenotify.c	29 Aug 2003 22:11:23 -0000	1.24
+++ changenotify.c	30 Aug 2003 16:48:05 -0000
@@ -48,7 +48,7 @@
 	LONG wEventMask;	/* subscribed events */
 	LONG wSignalledEvent;   /* event that occurred */
 	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;
 
@@ -424,7 +424,7 @@
 HANDLE WINAPI SHChangeNotification_Lock(
 	HANDLE hChange,
 	DWORD dwProcessId,
-	LPITEMIDLIST **lppidls,
+	LPCITEMIDLIST **lppidls,
 	LPLONG lpwEventId)
 {
     DWORD i;
Index: dataobject.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/dataobject.c,v
retrieving revision 1.38
diff -u -r1.38 dataobject.c
--- dataobject.c	26 Jul 2003 20:32:43 -0000	1.38
+++ dataobject.c	30 Aug 2003 16:48:05 -0000
@@ -226,7 +226,7 @@
 /**************************************************************************
 *  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;
 
Index: debughlp.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/debughlp.c,v
retrieving revision 1.7
diff -u -r1.7 debughlp.c
--- debughlp.c	19 May 2003 21:42:44 -0000	1.7
+++ debughlp.c	30 Aug 2003 16:48:06 -0000
@@ -32,7 +32,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(pidl);
 
-LPITEMIDLIST  _dbg_ILGetNext(LPITEMIDLIST pidl)
+LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
 {
 	WORD len;
 
@@ -41,8 +41,7 @@
 	  len =  pidl->mkid.cb;
 	  if (len)
 	  {
-	    pidl = (LPITEMIDLIST) (((LPBYTE)pidl)+len);
-	    return pidl;
+	    return (LPITEMIDLIST) (((LPBYTE)pidl)+len);
 	  }
 	}
 	return NULL;
@@ -53,7 +52,7 @@
 	return ( !pidl || (pidl && pidl->mkid.cb == 0x00) );
 }
 
-LPPIDLDATA _dbg_ILGetDataPointer(LPITEMIDLIST pidl)
+LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
 {
 	if(pidl && pidl->mkid.cb != 0x00)
 	  return (LPPIDLDATA) &(pidl->mkid.abID);
@@ -174,7 +173,7 @@
 
 void pdump (LPCITEMIDLIST pidl)
 {
-	LPITEMIDLIST pidltemp = pidl;
+	LPCITEMIDLIST pidltemp = pidl;
 
 	if (!TRACE_ON(pidl)) return;
 
@@ -220,7 +219,7 @@
 BOOL pcheck (LPCITEMIDLIST pidl)
 {
         DWORD type, ret=TRUE;
-        LPITEMIDLIST pidltemp = pidl;
+        LPCITEMIDLIST pidltemp = pidl;
 
         if (pidltemp && pidltemp->mkid.cb)
         { do
Index: iconcache.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/iconcache.c,v
retrieving revision 1.66
diff -u -r1.66 iconcache.c
--- iconcache.c	12 Aug 2003 23:50:55 -0000	1.66
+++ iconcache.c	30 Aug 2003 16:48:06 -0000
@@ -320,7 +320,7 @@
  */
 BOOL PidlToSicIndex (
 	IShellFolder * sh,
-	LPITEMIDLIST pidl,
+	LPCITEMIDLIST pidl,
 	BOOL bBigIcon,
 	UINT uFlags,
 	UINT * pIndex)
Index: pidl.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/pidl.c,v
retrieving revision 1.86
diff -u -r1.86 pidl.c
--- pidl.c	26 Jul 2003 20:32:43 -0000	1.86
+++ pidl.c	30 Aug 2003 16:48:08 -0000
@@ -87,7 +87,7 @@
 {
 	LPSHELLFOLDER psfParent, lsf = psf;
 	HRESULT ret = NO_ERROR;
-	LPITEMIDLIST pidllast;
+	LPCITEMIDLIST pidllast;
 	STRRET strret;
 	DWORD flag;
 
@@ -176,8 +176,8 @@
  * NOTES
  *   observed: pidl=Desktop return=pidl
  */
-LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl)
-{	LPITEMIDLIST   pidlLast = pidl;
+LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
+{	LPCITEMIDLIST   pidlLast = pidl;
 
 	TRACE("(pidl=%p)\n",pidl);
 
@@ -186,7 +186,7 @@
 	  pidlLast = pidl;
 	  pidl = ILGetNext(pidl);
 	}
-	return pidlLast;
+	return (LPITEMIDLIST)pidlLast;
 }
 /*************************************************************************
  * ILRemoveLastID [SHELL32.17]
@@ -319,7 +319,7 @@
  */
 HRESULT WINAPI ILSaveToStream (IStream * pStream, LPCITEMIDLIST pPidl)
 {
-	LPITEMIDLIST	pidl;
+	LPCITEMIDLIST	pidl;
 	WORD		wLen = 0;
 	HRESULT		ret = E_FAIL;
 
@@ -445,8 +445,8 @@
 	char	szData1[MAX_PATH];
 	char	szData2[MAX_PATH];
 
-	LPITEMIDLIST pidltemp1 = pidl1;
-	LPITEMIDLIST pidltemp2 = pidl2;
+	LPCITEMIDLIST pidltemp1 = pidl1;
+	LPCITEMIDLIST pidltemp2 = pidl2;
 
 	TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2);
 
@@ -490,8 +490,8 @@
 	char	szData1[MAX_PATH];
 	char	szData2[MAX_PATH];
 
-	LPITEMIDLIST pParent = pidlParent;
-	LPITEMIDLIST pChild = pidlChild;
+	LPCITEMIDLIST pParent = pidlParent;
+	LPCITEMIDLIST pChild = pidlChild;
 
 	TRACE("%p %p %x\n", pidlParent, pidlChild, bImmediate);
 
@@ -528,14 +528,14 @@
  *  pidl2 shorter pidl1		0
  *  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	szData2[MAX_PATH];
 
-	LPITEMIDLIST pidltemp1 = pidl1;
-	LPITEMIDLIST pidltemp2 = pidl2;
-	LPITEMIDLIST ret=NULL;
+	LPCITEMIDLIST pidltemp1 = pidl1;
+	LPCITEMIDLIST pidltemp2 = pidl2;
+	LPCITEMIDLIST ret=NULL;
 
 	TRACE("pidl1=%p pidl2=%p\n",pidl1, pidl2);
 
@@ -572,7 +572,7 @@
 	  }
 	}
 	TRACE_(shell)("--- %p\n", ret);
-	return ret; /* pidl 1 is shorter */
+	return (LPITEMIDLIST)ret; /* pidl 1 is shorter */
 }
 
 /*************************************************************************
@@ -662,9 +662,9 @@
  * NOTES
  *  exported by ordinal
  */
-DWORD WINAPI ILGetSize(LPITEMIDLIST pidl)
+DWORD WINAPI ILGetSize(LPCITEMIDLIST pidl)
 {
-	LPSHITEMID si = &(pidl->mkid);
+	LPCSHITEMID si = &(pidl->mkid);
 	DWORD  len=0;
 
 	if (pidl)
@@ -688,7 +688,7 @@
  *  simple pidl -> pointer to 0x0000 element
  *
  */
-LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl)
+LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
 {
 	WORD len;
 
@@ -701,7 +701,7 @@
 	  {
 	    pidl = (LPITEMIDLIST) (((LPBYTE)pidl)+len);
 	    TRACE("-- %p\n", pidl);
-	    return pidl;
+	    return (LPITEMIDLIST)pidl;
 	  }
 	}
 	return NULL;
@@ -764,7 +764,7 @@
  * ILGlobalFree [SHELL32.156]
  *
  */
-void WINAPI ILGlobalFree( LPCITEMIDLIST pidl)
+void WINAPI ILGlobalFree( LPITEMIDLIST pidl)
 {
 	TRACE("%p\n",pidl);
 
@@ -1363,14 +1363,14 @@
 
 	  case PT_SPECIAL:
 	  case PT_MYCOMP:
-	    pData =_ILGetDataPointer(pidlOut);
+	    pData = _ILGetDataPointer(pidlOut);
 	    pData->type = type;
 	    memcpy(&(pData->u.mycomp.guid), pIn, uInSize);
 	    TRACE("-- create GUID-pidl %s\n", debugstr_guid(&(pData->u.mycomp.guid)));
 	    break;
 
 	  case PT_DRIVE:
-	    pData =_ILGetDataPointer(pidlOut);
+	    pData = _ILGetDataPointer(pidlOut);
 	    pData->type = type;
 	    pszDest = _ILGetTextPointer(pidlOut);
 	    memcpy(pszDest, pIn, uInSize);
@@ -1379,7 +1379,7 @@
 
 	  case PT_FOLDER:
 	  case PT_VALUE:
-	    pData =_ILGetDataPointer(pidlOut);
+	    pData = _ILGetDataPointer(pidlOut);
 	    pData->type = type;
 	    pszDest =  _ILGetTextPointer(pidlOut);
 	    memcpy(pszDest, pIn, uInSize);
@@ -1588,7 +1588,7 @@
  **************************************************************************
  *  _ILGetDataPointer()
  */
-LPPIDLDATA _ILGetDataPointer(LPITEMIDLIST pidl)
+LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
 {
 	if(pidl && pidl->mkid.cb != 0x00)
 	  return (LPPIDLDATA) &(pidl->mkid.abID);
@@ -1602,7 +1602,7 @@
 LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
 {/*	TRACE(pidl,"(pidl%p)\n", pidl);*/
 
-	LPPIDLDATA pdata =_ILGetDataPointer(pidl);
+	LPPIDLDATA pdata = _ILGetDataPointer(pidl);
 
 	if (pdata)
 	{
@@ -1707,7 +1707,7 @@
  */
 BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt)
 {
-    LPPIDLDATA pdata =_ILGetDataPointer(pidl);
+    LPPIDLDATA pdata = _ILGetDataPointer(pidl);
 
     if(! pdata) return FALSE;
 
@@ -1762,7 +1762,7 @@
  */
 DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
 {
-	LPPIDLDATA pdata =_ILGetDataPointer(pidl);
+	LPPIDLDATA pdata = _ILGetDataPointer(pidl);
 	DWORD dwSize;
 
 	if(! pdata) return 0;
@@ -1782,7 +1782,7 @@
 {
 	char szTemp[MAX_PATH];
 	const char * pPoint;
-	LPITEMIDLIST  pidlTemp=pidl;
+	LPCITEMIDLIST  pidlTemp=pidl;
 
 	TRACE("pidl=%p\n",pidl);
 
@@ -1864,7 +1864,7 @@
  */
 DWORD _ILGetFileAttributes(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
 {
-	LPPIDLDATA pData =_ILGetDataPointer(pidl);
+	LPPIDLDATA pData = _ILGetDataPointer(pidl);
 	WORD wAttrib = 0;
 	int i;
 
@@ -1929,7 +1929,7 @@
 *
 * copies an aPidl struct
 */
-LPITEMIDLIST *  _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl)
+LPITEMIDLIST* _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl)
 {
 	UINT i;
 	LPITEMIDLIST * apidldest = (LPITEMIDLIST*)SHAlloc(cidl * sizeof(LPITEMIDLIST));
@@ -1946,7 +1946,7 @@
 *
 * creates aPidl from CIDA
 */
-LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida)
+LPITEMIDLIST* _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida)
 {
 	UINT i;
 	LPITEMIDLIST * dst = (LPITEMIDLIST*)SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
Index: pidl.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/pidl.h,v
retrieving revision 1.29
diff -u -r1.29 pidl.h
--- pidl.h	26 Jul 2003 20:32:43 -0000	1.29
+++ pidl.h	30 Aug 2003 16:48:08 -0000
@@ -198,7 +198,7 @@
  * aPidl helper
  */
 void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl);
-LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl);
+LPITEMIDLIST * _ILCopyaPidl(LPCITEMIDLIST * apidlsrc, UINT cidl);
 LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPIDA cida);
 
 BOOL WINAPI ILGetDisplayNameExA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPSTR path, DWORD type);
Index: shell32_main.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32_main.c,v
retrieving revision 1.118
diff -u -r1.118 shell32_main.c
--- shell32_main.c	8 Jul 2003 21:07:49 -0000	1.118
+++ shell32_main.c	30 Aug 2003 16:48:09 -0000
@@ -317,7 +317,7 @@
         {
 	   /* get the parent shellfolder */
 	   if (pidl) {
-	      hr = SHBindToParent( pidl, &IID_IShellFolder, (LPVOID*)&psfParent, &pidlLast);
+	      hr = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psfParent, (LPCITEMIDLIST*)&pidlLast);
 	      ILFree(pidl);
 	   } else {
 	      ERR("pidl is null!\n");
@@ -332,7 +332,7 @@
 	  {
 	    psfi->dwAttributes = 0xffffffff;
 	  }
-	  IShellFolder_GetAttributesOf(psfParent, 1 , &pidlLast, &(psfi->dwAttributes));
+	  IShellFolder_GetAttributesOf(psfParent, 1, (LPCITEMIDLIST*)&pidlLast, &(psfi->dwAttributes));
 	}
 
 	/* get the displayname */
@@ -387,7 +387,7 @@
 	if (SUCCEEDED(hr) && (flags & SHGFI_ICONLOCATION ))
 	{
 	  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))
 	  {
Index: shell32_main.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32_main.h,v
retrieving revision 1.66
diff -u -r1.66 shell32_main.h
--- shell32_main.h	26 Jul 2003 20:32:43 -0000	1.66
+++ shell32_main.h	30 Aug 2003 16:48:10 -0000
@@ -52,7 +52,7 @@
 #define INVALID_INDEX -1
 BOOL SIC_Initialize(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 );
 
 /* Classes Root */
@@ -78,7 +78,7 @@
 /****************************************************************************
  * 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 []);
 
 LPCLASSFACTORY	IClassFactory_Constructor(REFCLSID);
@@ -99,8 +99,8 @@
 
 LPENUMIDLIST	IEnumIDList_Constructor(LPCSTR,DWORD,DWORD);
 
-LPEXTRACTICONA	IExtractIconA_Constructor(LPITEMIDLIST);
-LPEXTRACTICONW	IExtractIconW_Constructor(LPITEMIDLIST);
+LPEXTRACTICONA	IExtractIconA_Constructor(LPCITEMIDLIST);
+LPEXTRACTICONW	IExtractIconW_Constructor(LPCITEMIDLIST);
 HRESULT		CreateStreamOnFile (LPCWSTR pszFilename, DWORD grfMode, IStream ** ppstm);
 
 /* FIXME: rename the functions when the shell32.dll has it's own exports namespace */
Index: shfldr.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shfldr.h,v
retrieving revision 1.1
diff -u -r1.1 shfldr.h
--- shfldr.h	24 Jul 2002 01:56:03 -0000	1.1
+++ shfldr.h	30 Aug 2003 16:48:10 -0000
@@ -34,10 +34,10 @@
 LPCWSTR GetNextElementW (LPCWSTR pszNext, LPWSTR pszOut, DWORD dwOut);
 HRESULT SHELL32_ParseNextElement (HWND hwndOwner, IShellFolder2 * psf, LPITEMIDLIST * pidlInOut, LPOLESTR szNext,
 				  DWORD * pEaten, DWORD * pdwAttributes);
-HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPITEMIDLIST pidl, LPDWORD pdwAttributes);
-HRESULT SHELL32_CoCreateInitSF (LPITEMIDLIST pidlRoot, LPITEMIDLIST pidlChild, REFCLSID clsid, REFIID iid,
+HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes);
+HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID iid,
 				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);
 HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl, DWORD dwFlags, LPSTR szOut,
 				       DWORD dwOutLen);
Index: shlfolder.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlfolder.c,v
retrieving revision 1.80
diff -u -r1.80 shlfolder.c
--- shlfolder.c	21 Aug 2003 21:26:07 -0000	1.80
+++ shlfolder.c	30 Aug 2003 16:48:11 -0000
@@ -139,8 +139,8 @@
  * This function is meant for virtual forders not backed by a file system
  * folder.
  */
-HRESULT SHELL32_CoCreateInitSF (LPITEMIDLIST pidlRoot,
-				LPITEMIDLIST pidlChild, REFCLSID clsid, REFIID iid, LPVOID * ppvOut)
+HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot,
+				LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID iid, LPVOID * ppvOut)
 {
     HRESULT hr;
 
@@ -177,8 +177,8 @@
  *   pathRoot can be NULL for Folders beeing a drive.
  *   In this case the absolute path is build from pidlChild (eg. C:)
  */
-HRESULT SHELL32_CoCreateInitSFEx (LPITEMIDLIST pidlRoot,
-				  LPCSTR pathRoot, LPITEMIDLIST pidlChild, REFCLSID clsid, REFIID riid, LPVOID * ppvOut)
+HRESULT SHELL32_CoCreateInitSFEx (LPCITEMIDLIST pidlRoot,
+				  LPCSTR pathRoot, LPCITEMIDLIST pidlChild, REFCLSID clsid, REFIID riid, LPVOID * ppvOut)
 {
     HRESULT hr;
     IPersistFolder3 *ppf;
@@ -203,7 +203,9 @@
 	    } else {
 		szDestPath[0] = '\0';
 	    }
-	    lstrcatA (szDestPath, _ILGetTextPointer (pidlChild));
+
+	    if (pidlChild)
+		lstrcatA (szDestPath, _ILGetTextPointer (pidlChild));
 
 	    /* fill the PERSIST_FOLDER_TARGET_INFO */
 	    ppfti.dwAttributes = -1;
@@ -330,7 +332,7 @@
  *
  * 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;
     DWORD dwAttributes;
Index: shlmenu.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlmenu.c,v
retrieving revision 1.32
diff -u -r1.32 shlmenu.c
--- shlmenu.c	17 Apr 2003 02:18:33 -0000	1.32
+++ shlmenu.c	30 Aug 2003 16:48:11 -0000
@@ -120,12 +120,12 @@
  * FM_InitMenuPopup				[internal]
  *
  */
-static int FM_InitMenuPopup(HMENU hmenu, LPITEMIDLIST pAlternatePidl)
+static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl)
 {	IShellFolder	*lpsf, *lpsf2;
 	ULONG		ulItemAttr = SFGAO_FOLDER;
 	UINT		uID, uFlags, uEnumFlags;
 	LPFNFMCALLBACK	lpfnCallback;
-	LPITEMIDLIST	pidl;
+	LPCITEMIDLIST	pidl;
 	char		sTemp[MAX_PATH];
 	int		NumberOfItems = 0, iIcon;
 	MENUINFO	MenuInfo;
@@ -150,7 +150,7 @@
 	if (menudata->bInitialized)
 	  return 0;
 
-	pidl = ((pAlternatePidl) ? pAlternatePidl : menudata->pidl);
+	pidl = (pAlternatePidl? pAlternatePidl: menudata->pidl);
 	if (!pidl)
 	  return 0;
 
@@ -176,7 +176,7 @@
 
 	      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);
 		  if (! (PidlToSicIndex(lpsf, pidlTemp, FALSE, 0, &iIcon)))
Index: shlview.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlview.c,v
retrieving revision 1.79
diff -u -r1.79 shlview.c
--- shlview.c	20 Aug 2003 18:22:31 -0000	1.79
+++ shlview.c	30 Aug 2003 16:48:13 -0000
@@ -813,7 +813,7 @@
 	/* look, what's selected and create a context menu object of it*/
 	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);
 
 	  if(pContextMenu)
@@ -1217,11 +1217,11 @@
 
 	      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 */
 
-	  	  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)
 		    {
@@ -1247,7 +1247,7 @@
 
 	      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)
 	      {
 	        return FALSE;
@@ -1355,7 +1355,7 @@
 		}
 
 		/* perform the item deletion */
-		ISFHelper_DeleteItems(psfhlp, i, pItems);
+		ISFHelper_DeleteItems(psfhlp, i, (LPCITEMIDLIST*)pItems);
 
 		/* free pidl array memory */
 		HeapFree(GetProcessHeap(), 0, pItems);
@@ -1841,7 +1841,7 @@
 
 	  case SVGIO_SELECTION:
 	    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;
 	}
 	TRACE("-- (%p)->(interface=%p)\n",This, *ppvOut);
@@ -1853,7 +1853,7 @@
 
 static HRESULT WINAPI IShellView_fnEditItem(
 	IShellView * iface,
-	LPITEMIDLIST pidl)
+	LPCITEMIDLIST pidl)
 {
 	ICOM_THIS(IShellViewImpl, iface);
 	int i;
Index: shv_bg_cmenu.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shv_bg_cmenu.c,v
retrieving revision 1.25
diff -u -r1.25 shv_bg_cmenu.c
--- shv_bg_cmenu.c	10 Apr 2003 18:17:34 -0000	1.25
+++ shv_bg_cmenu.c	30 Aug 2003 16:48:14 -0000
@@ -263,7 +263,7 @@
 	      /* do the copy/move */
 	      if (psfhlpdst && psfhlpsrc)
 	      {
-	        ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, apidl);
+	        ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl);
 		/* FIXME handle move
 		ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl);
 		*/
Index: shv_item_cmenu.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shv_item_cmenu.c,v
retrieving revision 1.17
diff -u -r1.17 shv_item_cmenu.c
--- shv_item_cmenu.c	24 Jun 2003 02:33:53 -0000	1.17
+++ shv_item_cmenu.c	30 Aug 2003 16:48:14 -0000
@@ -65,7 +65,7 @@
 	  for(i = 0; i < This->cidl; i++){}
 	  if(i > 1) return FALSE;		/* can't rename more than one item at a time*/
 	  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 FALSE;
Index: undocshell.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/undocshell.h,v
retrieving revision 1.13
diff -u -r1.13 undocshell.h
--- undocshell.h	29 Aug 2003 22:11:23 -0000	1.13
+++ undocshell.h	30 Aug 2003 16:48:15 -0000
@@ -37,10 +37,10 @@
 	LPCITEMIDLIST iil1,
 	LPCITEMIDLIST iil2);
 
-DWORD WINAPI ILGetSize(LPITEMIDLIST pidl);
+DWORD WINAPI ILGetSize(LPCITEMIDLIST pidl);
 
-LPITEMIDLIST WINAPI ILGetNext(LPITEMIDLIST pidl);
-LPITEMIDLIST WINAPI ILFindLastID(LPITEMIDLIST pidl);
+LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl);
+LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl);
 BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl);
 
 LPITEMIDLIST WINAPI ILFindChild(
@@ -87,7 +87,7 @@
 	LPITEMIDLIST *ppidl);
 
 LPITEMIDLIST WINAPI ILGlobalClone(LPCITEMIDLIST pidl);
-void WINAPI ILGlobalFree(LPCITEMIDLIST pidl);
+void WINAPI ILGlobalFree(LPITEMIDLIST pidl);
 
 LPITEMIDLIST WINAPI SHSimpleIDListFromPathA (LPCSTR lpszPath);
 LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath);
@@ -144,7 +144,7 @@
 
 typedef struct
 {
-        LPCITEMIDLIST pidlPath;
+        LPITEMIDLIST pidlPath;
         BOOL bWatchSubtree;
 } NOTIFYREGISTER, *LPNOTIFYREGISTER;
 
@@ -163,7 +163,7 @@
 	LONG wEventMask,
 	UINT uMsg,
 	int cItems,
-	LPCNOTIFYREGISTER lpItems);
+	LPNOTIFYREGISTER lpItems);
 
 BOOL WINAPI SHChangeNotifyDeregister(HANDLE hNotify);
 
@@ -424,8 +424,8 @@
 
 BOOL WINAPI FileMenu_GetLastSelectedItemPidls(
 	UINT uReserved,
-	LPITEMIDLIST *ppidlFolder,
-	LPITEMIDLIST *ppidlItem);
+	LPCITEMIDLIST *ppidlFolder,
+	LPCITEMIDLIST *ppidlItem);
 
 LRESULT WINAPI FileMenu_MeasureItem(
 	HWND hWnd,

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux