kernelbase: Use NtQueryInformationFile for consoles handles in GetFileSizeEx.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-11-20 15:40:04 +01:00 committed by Alexandre Julliard
parent 382b2072e3
commit a055f41286
2 changed files with 0 additions and 8 deletions

View file

@ -3959,12 +3959,10 @@ static void test_file_info(HANDLE input, HANDLE output)
ok(status == STATUS_INVALID_DEVICE_REQUEST, "NtQueryInformationFile returned: %#x\n", status);
ret = GetFileSizeEx(input, &size);
todo_wine
ok(!ret && GetLastError() == ERROR_INVALID_FUNCTION,
"GetFileSizeEx returned %x(%u)\n", ret, GetLastError());
ret = GetFileSizeEx(output, &size);
todo_wine
ok(!ret && GetLastError() == ERROR_INVALID_FUNCTION,
"GetFileSizeEx returned %x(%u)\n", ret, GetLastError());
}

View file

@ -3047,12 +3047,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetFileSizeEx( HANDLE file, PLARGE_INTEGER size )
FILE_STANDARD_INFORMATION info;
IO_STATUS_BLOCK io;
if (is_console_handle( file ))
{
SetLastError( ERROR_INVALID_HANDLE );
return FALSE;
}
if (!set_ntstatus( NtQueryInformationFile( file, &io, &info, sizeof(info), FileStandardInformation )))
return FALSE;