Sebastian Lackner : kernel32: Add SetFileCompletionNotificationModes implementation.

Alexandre Julliard julliard at winehq.org
Thu Oct 25 15:24:35 CDT 2018


Module: wine
Branch: master
Commit: 139cc95610d7c14a5eab62df971fe5505b0b067c
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=139cc95610d7c14a5eab62df971fe5505b0b067c

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Thu Oct 25 14:56:31 2018 +0200

kernel32: Add SetFileCompletionNotificationModes implementation.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38960
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/file.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
index 081f076..eeccf67 100644
--- a/dlls/kernel32/file.c
+++ b/dlls/kernel32/file.c
@@ -1065,13 +1065,20 @@ BOOL WINAPI SetEndOfFile( HANDLE hFile )
     return FALSE;
 }
 
+
 /**************************************************************************
  *           SetFileCompletionNotificationModes   (KERNEL32.@)
  */
-BOOL WINAPI SetFileCompletionNotificationModes( HANDLE handle, UCHAR flags )
+BOOL WINAPI SetFileCompletionNotificationModes( HANDLE file, UCHAR flags )
 {
-    FIXME("%p %x - stub\n", handle, flags);
-    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    FILE_IO_COMPLETION_NOTIFICATION_INFORMATION info;
+    IO_STATUS_BLOCK io;
+    NTSTATUS status;
+
+    info.Flags = flags;
+    status = NtSetInformationFile( file, &io, &info, sizeof(info), FileIoCompletionNotificationInformation );
+    if (status == STATUS_SUCCESS) return TRUE;
+    SetLastError( RtlNtStatusToDosError(status) );
     return FALSE;
 }
 




More information about the wine-cvs mailing list