Commit in reactos/lib/shell32 on MAIN
debughlp.c+9-21.4 -> 1.5
pidl.c+6-31.24 -> 1.25
pidl.h+1-11.9 -> 1.10
+16-6
3 modified files
Juan Lang <juan_lang@yahoo.com>
- Correct return value in a couple of error cases.
Marcus Meissner <marcus@jet.franken.de>
- Marked some functions in debughlp as static.
- Do not use REFIID as return, but IID*.

reactos/lib/shell32
debughlp.c 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- debughlp.c	21 Sep 2004 19:34:21 -0000	1.4
+++ debughlp.c	21 Sep 2004 19:38:17 -0000	1.5
@@ -35,6 +35,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(pidl);
 
+static
 LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
 {
 	WORD len;
@@ -50,11 +51,13 @@
 	return NULL;
 }
 
+static
 BOOL _dbg_ILIsDesktop(LPCITEMIDLIST pidl)
 {
 	return ( !pidl || (pidl && pidl->mkid.cb == 0x00) );
 }
 
+static
 LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
 {
 	if(pidl && pidl->mkid.cb != 0x00)
@@ -62,6 +65,7 @@
 	return NULL;
 }
 
+static
 LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
 {
 	LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
@@ -99,6 +103,7 @@
 	return NULL;
 }
 
+static
 LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
 {
 	LPPIDLDATA pdata =_dbg_ILGetDataPointer(pidl);
@@ -121,7 +126,8 @@
 	return NULL;
 }
 
-REFIID _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl)
+static
+IID* _dbg_ILGetGUIDPointer(LPCITEMIDLIST pidl)
 {
 	LPPIDLDATA pdata =_ILGetDataPointer(pidl);
 
@@ -131,12 +137,13 @@
 	  {
 	    case PT_SHELLEXT:
 	    case PT_GUID:
-	      return (REFIID) &(pdata->u.guid.guid);
+	      return &(pdata->u.guid.guid);
 	  }
 	}
 	return NULL;
 }
 
+static
 DWORD _dbg_ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
 {
 	DWORD		dwReturn=0;

reactos/lib/shell32
pidl.c 1.24 -> 1.25
diff -u -r1.24 -r1.25
--- pidl.c	21 Sep 2004 19:34:21 -0000	1.24
+++ pidl.c	21 Sep 2004 19:38:17 -0000	1.25
@@ -1621,6 +1621,9 @@
 	HANDLE hFile;
 	WIN32_FIND_DATAA stffile;
 
+    if (!ppidl)
+        return E_INVALIDARG;
+
 	hFile = FindFirstFileA(szPath, &stffile);
 
 	if (hFile == INVALID_HANDLE_VALUE)
@@ -1630,7 +1633,7 @@
 
 	*ppidl = _ILCreateFromFindDataA(&stffile);
 
-	return S_OK;
+	return *ppidl ? S_OK : E_OUTOFMEMORY;
 }
 
 LPITEMIDLIST _ILCreateDrive(LPCWSTR lpszNew)
@@ -1937,7 +1940,7 @@
  *
  * returns reference to guid stored in some pidls
  */
-REFIID _ILGetGUIDPointer(LPCITEMIDLIST pidl)
+IID* _ILGetGUIDPointer(LPCITEMIDLIST pidl)
 {
 	LPPIDLDATA pdata =_ILGetDataPointer(pidl);
 
@@ -1950,7 +1953,7 @@
 	  {
 	    case PT_SHELLEXT:
 	    case PT_GUID:
-	      return (REFIID) &(pdata->u.guid.guid);
+	      return &(pdata->u.guid.guid);
 
 	    default:
 		TRACE("Unknown pidl type 0x%04x\n", pdata->type);

reactos/lib/shell32
pidl.h 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- pidl.h	21 Sep 2004 19:34:21 -0000	1.9
+++ pidl.h	21 Sep 2004 19:38:17 -0000	1.10
@@ -228,7 +228,7 @@
 LPPIDLDATA	_ILGetDataPointer	(LPCITEMIDLIST);
 LPSTR		_ILGetTextPointer	(LPCITEMIDLIST);
 LPSTR		_ILGetSTextPointer	(LPCITEMIDLIST);
-REFIID		_ILGetGUIDPointer	(LPCITEMIDLIST pidl);
+IID		*_ILGetGUIDPointer	(LPCITEMIDLIST pidl);
 
 /*
  * debug helper
CVSspam 0.2.8