kernel32/tests: Avoid crash on Win95 (GetLongPathNameW)
Detlef Riekenberg
wine.dev at web.de
Sun Nov 19 09:31:51 CST 2006
On Mo, 2006-10-02 at 15:00 -0500, Alexandre Julliard wrote:
> Author: Louis. Lenders <xerox_xerox2000 at yahoo.co.uk>
> Date: Fri Sep 29 08:21:31 2006 +0100
>
> kernel32: Add 2 simple tests for GetLongPathNameW.
Changelog:
kernel32/tests: Avoid crash on Win95 (GetLongPathNameW)
--
By by ... Detlef
-------------- next part --------------
>From 353a54721aead25c6086fdd13611f873e1db7f41 Mon Sep 17 00:00:00 2001
From: Detlef Riekenberg <wine.dev at web.de>
Date: Sun, 19 Nov 2006 16:24:30 +0100
Subject: [PATCH] kernel32/tests: Avoid crash on Win95 (GetLongPathNameW)
---
dlls/kernel32/tests/path.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c
index 4f4c0d7..b4165e6 100644
--- a/dlls/kernel32/tests/path.c
+++ b/dlls/kernel32/tests/path.c
@@ -935,10 +935,11 @@ static void test_GetLongPathNameW(void)
DWORD length;
WCHAR empty[MAX_PATH];
- SetLastError(0xdeadbeef);
- length = pGetLongPathNameW(NULL,NULL,0);
+ /* Not present in all windows versions */
if(pGetLongPathNameW)
{
+ SetLastError(0xdeadbeef);
+ length = pGetLongPathNameW(NULL,NULL,0);
ok(0==length,"GetLongPathNameW returned %d but expected 0\n",length);
ok(GetLastError()==ERROR_INVALID_PARAMETER,"GetLastError returned %x but expected ERROR_INVALID_PARAMETER\n",GetLastError());
--
1.4.1
More information about the wine-patches
mailing list