Commit db882bfb authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

kernel32/tests: Check what happens if QueryDosDeviceA() is given an insufficient buffer.

parent 8e67930b
......@@ -44,6 +44,12 @@ static void test_query_dos_deviceA(void)
DWORD ret, ret2, buflen=32768;
BOOL found = FALSE;
/* callers must guess the buffer size */
SetLastError(0xdeadbeef);
ret = QueryDosDeviceA( NULL, NULL, 0 );
ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER,
"QueryDosDeviceA(no buffer): returned %u, le=%u\n", ret, GetLastError());
buffer = HeapAlloc( GetProcessHeap(), 0, buflen );
SetLastError(0xdeadbeef);
ret = QueryDosDeviceA( NULL, buffer, buflen );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment