server: Add NtQueryInformationFile(FileIoCompletionNotificationInformation) implementation.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2018-10-23 17:45:42 +02:00 committed by Alexandre Julliard
parent 6c2ac81084
commit 66e20ce576
2 changed files with 22 additions and 0 deletions

View File

@ -1284,6 +1284,11 @@ static void _test_file_info(unsigned line, HANDLE handle)
status = pNtQueryInformationFile(handle, &io, buf, sizeof(buf), FileAccessInformation);
ok_(__FILE__,line)(status == STATUS_SUCCESS, "FileAccessInformation returned %x\n", status);
status = pNtQueryInformationFile(handle, &io, buf, sizeof(buf),
FileIoCompletionNotificationInformation);
ok_(__FILE__,line)(status == STATUS_SUCCESS || broken(status == STATUS_INVALID_INFO_CLASS),
"FileIoCompletionNotificationInformation returned %x\n", status);
}
#define test_no_file_info(a) _test_no_file_info(__LINE__,a)
@ -1300,6 +1305,11 @@ static void _test_no_file_info(unsigned line, HANDLE handle)
status = pNtQueryInformationFile(handle, &io, buf, sizeof(buf), FileAccessInformation);
ok_(__FILE__,line)(status == STATUS_OBJECT_TYPE_MISMATCH,
"FileAccessInformation returned %x\n", status);
status = pNtQueryInformationFile(handle, &io, buf, sizeof(buf),
FileIoCompletionNotificationInformation);
ok_(__FILE__,line)(status == STATUS_OBJECT_TYPE_MISMATCH || broken(status == STATUS_INVALID_INFO_CLASS),
"FileIoCompletionNotificationInformation returned %x\n", status);
}
static void test_query_object(void)

View File

@ -2192,6 +2192,18 @@ void default_fd_get_file_info( struct fd *fd, obj_handle_t handle, unsigned int
set_reply_data( &info, sizeof(info) );
break;
}
case FileIoCompletionNotificationInformation:
{
FILE_IO_COMPLETION_NOTIFICATION_INFORMATION info;
if (get_reply_max_size() < sizeof(info))
{
set_error( STATUS_INFO_LENGTH_MISMATCH );
return;
}
info.Flags = 0; /* FIXME */
set_reply_data( &info, sizeof(info) );
break;
}
default:
set_error( STATUS_NOT_IMPLEMENTED );
}