From a26a6b877d64effe947b29854d1c3492a5c27e66 Mon Sep 17 00:00:00 2001 From: Austin English Date: Mon, 12 Oct 2015 10:29:27 -0500 Subject: [PATCH] kernel32: Add a stub for CancelSynchronousIo. Signed-off-by: Austin English Signed-off-by: Alexandre Julliard --- .../api-ms-win-core-io-l1-1-1.spec | 2 +- dlls/kernel32/file.c | 19 +++++++++++++++++++ dlls/kernel32/kernel32.spec | 2 +- include/winbase.h | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-core-io-l1-1-1/api-ms-win-core-io-l1-1-1.spec b/dlls/api-ms-win-core-io-l1-1-1/api-ms-win-core-io-l1-1-1.spec index e05728ee277..73aae1aa9ac 100644 --- a/dlls/api-ms-win-core-io-l1-1-1/api-ms-win-core-io-l1-1-1.spec +++ b/dlls/api-ms-win-core-io-l1-1-1/api-ms-win-core-io-l1-1-1.spec @@ -1,6 +1,6 @@ @ stdcall CancelIo(long) kernel32.CancelIo @ stdcall CancelIoEx(long ptr) kernel32.CancelIoEx -@ stub CancelSynchronousIo +@ stdcall CancelSynchronousIo(long) kernel32.CancelSynchronousIo @ stdcall CreateIoCompletionPort(long long long long) kernel32.CreateIoCompletionPort @ stdcall DeviceIoControl(long long ptr long ptr long ptr ptr) kernel32.DeviceIoControl @ stdcall GetOverlappedResult(long ptr ptr long) kernel32.GetOverlappedResult diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index e43829ea67e..ee43b10a36f 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -685,6 +685,25 @@ BOOL WINAPI CancelIo(HANDLE handle) return TRUE; } +/*********************************************************************** + * CancelSynchronousIo (KERNEL32.@) + * + * Marks pending synchronous I/O operations issued by the specified thread as cancelled + * + * PARAMS + * handle [I] handle to the thread whose I/O operations should be cancelled + * + * RETURNS + * Success: TRUE. + * Failure: FALSE, check GetLastError(). + */ +BOOL WINAPI CancelSynchronousIo(HANDLE thread) +{ + FIXME("(%p): stub\n", thread); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + /*********************************************************************** * _hread (KERNEL32.@) */ diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index e0cb154dfff..dfc305b86e9 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -210,7 +210,7 @@ @ stub CancelDeviceWakeupRequest @ stdcall CancelIo(long) @ stdcall CancelIoEx(long ptr) -# @ stub CancelSynchronousIo +@ stdcall CancelSynchronousIo(long) # @ stub CancelThreadpoolIo @ stdcall CancelTimerQueueTimer(ptr ptr) @ stdcall CancelWaitableTimer(long) diff --git a/include/winbase.h b/include/winbase.h index dd320c20999..25bc5936f2d 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1694,6 +1694,7 @@ WINBASEAPI BOOL WINAPI CallNamedPipeW(LPCWSTR,LPVOID,DWORD,LPVOID,DWORD,L #define CallNamedPipe WINELIB_NAME_AW(CallNamedPipe) WINBASEAPI BOOL WINAPI CancelIo(HANDLE); WINBASEAPI BOOL WINAPI CancelIoEx(HANDLE,LPOVERLAPPED); +WINBASEAPI BOOL WINAPI CancelSynchronousIo(HANDLE); WINBASEAPI BOOL WINAPI CancelTimerQueueTimer(HANDLE,HANDLE); WINBASEAPI BOOL WINAPI CancelWaitableTimer(HANDLE); WINBASEAPI BOOL WINAPI CheckNameLegalDOS8Dot3A(const char*,char*,DWORD,BOOL*,BOOL*);