Module: wine Branch: master Commit: 66e20ce576fd815cffd016f3d36f84c619ea7bc4 URL: https://source.winehq.org/git/wine.git/?a=commit;h=66e20ce576fd815cffd016f3d...
Author: Jacek Caban jacek@codeweavers.com Date: Tue Oct 23 17:45:42 2018 +0200
server: Add NtQueryInformationFile(FileIoCompletionNotificationInformation) implementation.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 c340839..5240854 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 65dc8a2..3e73fae 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 ); }