From 66e20ce576fd815cffd016f3d36f84c619ea7bc4 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 23 Oct 2018 17:45:42 +0200 Subject: [PATCH] server: Add NtQueryInformationFile(FileIoCompletionNotificationInformation) implementation. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/ntdll/tests/om.c | 10 ++++++++++ server/fd.c | 12 ++++++++++++ 2 files changed, 22 insertions(+) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index c340839acd0..524085474d7 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -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) diff --git a/server/fd.c b/server/fd.c index 65dc8a2a450..3e73faed443 100644 --- a/server/fd.c +++ b/server/fd.c @@ -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 ); } -- 2.11.4.GIT