Commit c0a5a27c authored by Martin Fuchs's avatar Martin Fuchs Committed by Alexandre Julliard

Correct return type of SHFileOperationA/W.

parent 6518b5ca
...@@ -723,10 +723,11 @@ DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more) ...@@ -723,10 +723,11 @@ DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
* NOTES * NOTES
* exported by name * exported by name
*/ */
DWORD WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp) int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
{ {
SHFILEOPSTRUCTW nFileOp = *((LPSHFILEOPSTRUCTW)lpFileOp); SHFILEOPSTRUCTW nFileOp = *((LPSHFILEOPSTRUCTW)lpFileOp);
DWORD retCode = 0, size; int retCode = 0;
DWORD size;
LPWSTR ForFree = NULL, /* we change wString in SHNameTranslate and can't use it for freeing */ LPWSTR ForFree = NULL, /* we change wString in SHNameTranslate and can't use it for freeing */
wString = NULL; /* we change this in SHNameTranslate */ wString = NULL; /* we change this in SHNameTranslate */
...@@ -792,7 +793,7 @@ static const char * debug_shfileops_action( DWORD op ) ...@@ -792,7 +793,7 @@ static const char * debug_shfileops_action( DWORD op )
* *
* See SHFileOperationA * See SHFileOperationA
*/ */
DWORD WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
{ {
SHFILEOPSTRUCTW nFileOp = *(lpFileOp); SHFILEOPSTRUCTW nFileOp = *(lpFileOp);
...@@ -807,7 +808,7 @@ DWORD WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) ...@@ -807,7 +808,7 @@ DWORD WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
LPWSTR pFromFile; LPWSTR pFromFile;
LPWSTR pToFile = NULL; LPWSTR pToFile = NULL;
LPWSTR lpFileName; LPWSTR lpFileName;
long retCode = 0; int retCode = 0;
DWORD ToAttr; DWORD ToAttr;
DWORD ToPathAttr; DWORD ToPathAttr;
DWORD FromPathAttr; DWORD FromPathAttr;
...@@ -1257,7 +1258,7 @@ shfileop_error: ...@@ -1257,7 +1258,7 @@ shfileop_error:
{ {
nFileOp.fAnyOperationsAborted = TRUE; nFileOp.fAnyOperationsAborted = TRUE;
} }
TRACE("%s level=%ld AnyOpsAborted=%s ret=0x%lx, with %s %s%s\n", TRACE("%s level=%ld AnyOpsAborted=%s ret=0x%x, with %s %s%s\n",
debug_shfileops_action(FuncSwitch), level, debug_shfileops_action(FuncSwitch), level,
nFileOp.fAnyOperationsAborted ? "TRUE":"FALSE", nFileOp.fAnyOperationsAborted ? "TRUE":"FALSE",
retCode, debugstr_w(pFrom), pTo ? "-> ":"", debugstr_w(pTo)); retCode, debugstr_w(pFrom), pTo ? "-> ":"", debugstr_w(pTo));
......
...@@ -209,8 +209,8 @@ typedef struct _SHFILEOPSTRUCTW ...@@ -209,8 +209,8 @@ typedef struct _SHFILEOPSTRUCTW
#define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT) #define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
#define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT) #define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
DWORD WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp); int WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp);
DWORD WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp); int WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp);
#define SHFileOperation WINELIB_NAME_AW(SHFileOperation) #define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
/****************************************** /******************************************
......
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