[PATCH] shell32: Choose return value for SHFileOperationW depending on windows version
From: Michael Müller <michael(a)fds-team.de> Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dlls/shell32/shlfileop.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 4507b72..244b34b 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -1019,7 +1019,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles) /* empty list */ if (!szFiles[0]) - return ERROR_ACCESS_DENIED; + return ERROR_ACCESS_DENIED; /* S_OK for Windows 95/98 */ flList->feFiles = heap_alloc_zero(flList->num_alloc * sizeof(FILE_ENTRY)); @@ -1525,7 +1525,19 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) ZeroMemory(&flTo, sizeof(FILE_LIST)); if ((ret = parse_file_list(&flFrom, lpFileOp->pFrom))) + { + if (ret != ERROR_ACCESS_DENIED) + return ret; + + /* Windows 95/98 */ + if (GetVersion() & 0x80000000) + return S_OK; + + WARN("The return value of this function call depends on the windows version.\n"); + WARN("For older software it might be necessary to set the windows version to 95/98 using winecfg.\n"); + return ret; + } if (lpFileOp->wFunc != FO_DELETE) parse_file_list(&flTo, lpFileOp->pTo); -- 1.9.1
Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> writes:
@@ -1525,7 +1525,19 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) ZeroMemory(&flTo, sizeof(FILE_LIST));
if ((ret = parse_file_list(&flFrom, lpFileOp->pFrom))) + { + if (ret != ERROR_ACCESS_DENIED) + return ret; + + /* Windows 95/98 */ + if (GetVersion() & 0x80000000) + return S_OK; + + WARN("The return value of this function call depends on the windows version.\n"); + WARN("For older software it might be necessary to set the windows version to 95/98 using winecfg.\n");
The W function doesn't even exist in win95, it would be better to add that special case only to the A function. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Alistair Leslie-Hughes