kernel32/tests: Avoid crash on Win95 (GetLongPathNameW).

This commit is contained in:
Detlef Riekenberg 2006-11-19 16:31:51 +01:00 committed by Alexandre Julliard
parent e33a6d61fe
commit c8a12d0f62
1 changed files with 3 additions and 2 deletions

View File

@ -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());