kernel32: Fix return values of GetConsoleCursorInfo.

This commit is contained in:
Paul Vriens 2008-06-24 12:23:07 +02:00 committed by Alexandre Julliard
parent 296bbde1c1
commit dd01d39f3b
2 changed files with 9 additions and 4 deletions

View File

@ -2239,7 +2239,15 @@ BOOL WINAPI GetConsoleCursorInfo(HANDLE hCon, LPCONSOLE_CURSOR_INFO cinfo)
}
SERVER_END_REQ;
TRACE("(%p) returning (%d,%d)\n", hCon, cinfo->dwSize, cinfo->bVisible);
if (!ret) return FALSE;
if (!cinfo)
{
SetLastError(ERROR_INVALID_ACCESS);
ret = FALSE;
}
else TRACE("(%p) returning (%d,%d)\n", hCon, cinfo->dwSize, cinfo->bVisible);
return ret;
}

View File

@ -168,12 +168,9 @@ static void testCursorInfo(HANDLE hCon)
SetLastError(0xdeadbeef);
ret = GetConsoleCursorInfo(hCon, NULL);
todo_wine
{
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_ACCESS, "GetLastError: expecting %u got %u\n",
ERROR_INVALID_ACCESS, GetLastError());
}
}
static void testWriteSimple(HANDLE hCon, COORD sbSize)