kernel32: Fix return values of GetConsoleCursorInfo.
This commit is contained in:
parent
296bbde1c1
commit
dd01d39f3b
|
@ -2239,7 +2239,15 @@ BOOL WINAPI GetConsoleCursorInfo(HANDLE hCon, LPCONSOLE_CURSOR_INFO cinfo)
|
||||||
}
|
}
|
||||||
SERVER_END_REQ;
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -168,12 +168,9 @@ static void testCursorInfo(HANDLE hCon)
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = GetConsoleCursorInfo(hCon, NULL);
|
ret = GetConsoleCursorInfo(hCon, NULL);
|
||||||
todo_wine
|
|
||||||
{
|
|
||||||
ok(!ret, "Expected failure\n");
|
ok(!ret, "Expected failure\n");
|
||||||
ok(GetLastError() == ERROR_INVALID_ACCESS, "GetLastError: expecting %u got %u\n",
|
ok(GetLastError() == ERROR_INVALID_ACCESS, "GetLastError: expecting %u got %u\n",
|
||||||
ERROR_INVALID_ACCESS, GetLastError());
|
ERROR_INVALID_ACCESS, GetLastError());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void testWriteSimple(HANDLE hCon, COORD sbSize)
|
static void testWriteSimple(HANDLE hCon, COORD sbSize)
|
||||||
|
|
Loading…
Reference in New Issue