Stefan Leichter : shell32: Fix return value of PathProcessCommand.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Dec 16 07:31:23 CST 2005


Module: wine
Branch: refs/heads/master
Commit: a4af4b95b5636a6202df2f0ea4d369551d7587cf
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=a4af4b95b5636a6202df2f0ea4d369551d7587cf

Author: Stefan Leichter <Stefan.Leichter at camLine.com>
Date:   Fri Dec 16 12:41:11 2005 +0100

shell32: Fix return value of PathProcessCommand.

---

 dlls/shell32/shellpath.c |   16 +++++++++-------
 include/shlobj.h         |    1 +
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 80bb33c..e706dd9 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -700,7 +700,7 @@ BOOL WINAPI PathResolveAW(
 /*************************************************************************
 *	PathProcessCommandA	[SHELL32.653]
 */
-HRESULT WINAPI PathProcessCommandA (
+LONG WINAPI PathProcessCommandA (
 	LPCSTR lpszPath,
 	LPSTR lpszBuff,
 	DWORD dwBuffSize,
@@ -708,14 +708,15 @@ HRESULT WINAPI PathProcessCommandA (
 {
 	FIXME("%s %p 0x%04lx 0x%04lx stub\n",
 	lpszPath, lpszBuff, dwBuffSize, dwFlags);
-	strcpy(lpszBuff, lpszPath);
-	return 0;
+	if(!lpszPath) return -1;
+	if(lpszBuff) strcpy(lpszBuff, lpszPath);
+	return strlen(lpszPath);
 }
 
 /*************************************************************************
 *	PathProcessCommandW
 */
-HRESULT WINAPI PathProcessCommandW (
+LONG WINAPI PathProcessCommandW (
 	LPCWSTR lpszPath,
 	LPWSTR lpszBuff,
 	DWORD dwBuffSize,
@@ -723,14 +724,15 @@ HRESULT WINAPI PathProcessCommandW (
 {
 	FIXME("(%s, %p, 0x%04lx, 0x%04lx) stub\n",
 	debugstr_w(lpszPath), lpszBuff, dwBuffSize, dwFlags);
-	strcpyW(lpszBuff, lpszPath);
-	return 0;
+	if(!lpszPath) return -1;
+	if(lpszBuff) strcpyW(lpszBuff, lpszPath);
+	return strlenW(lpszPath);
 }
 
 /*************************************************************************
 *	PathProcessCommand (SHELL32.653)
 */
-HRESULT WINAPI PathProcessCommandAW (
+LONG WINAPI PathProcessCommandAW (
 	LPCVOID lpszPath,
 	LPVOID lpszBuff,
 	DWORD dwBuffSize,
diff --git a/include/shlobj.h b/include/shlobj.h
index 94f716c..94f0776 100644
--- a/include/shlobj.h
+++ b/include/shlobj.h
@@ -1165,6 +1165,7 @@ BOOL WINAPI WriteCabinetState(CABINETSTA
  * Path Manipulation Routines
  */
 VOID WINAPI PathGetShortPath(LPWSTR pszPath);
+LONG WINAPI PathProcessCommand(LPCWSTR, LPWSTR, int, DWORD);
 
 /****************************************************************************
  * Drag And Drop Routines




More information about the wine-cvs mailing list