Commit a5c03fbc authored by Mike Kaplinskiy's avatar Mike Kaplinskiy Committed by Alexandre Julliard

kernel32: Implement CancelIoEx.

parent af25949a
......@@ -625,6 +625,32 @@ BOOL WINAPI GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped,
}
/***********************************************************************
* CancelIoEx (KERNEL32.@)
*
* Cancels pending I/O operations on a file given the overlapped used.
*
* PARAMS
* handle [I] File handle.
* lpOverlapped [I,OPT] pointer to overlapped (if null, cancel all)
*
* RETURNS
* Success: TRUE.
* Failure: FALSE, check GetLastError().
*/
BOOL WINAPI CancelIoEx(HANDLE handle, LPOVERLAPPED lpOverlapped)
{
IO_STATUS_BLOCK io_status;
NtCancelIoFileEx(handle, (PIO_STATUS_BLOCK) lpOverlapped, &io_status);
if (io_status.u.Status)
{
SetLastError( RtlNtStatusToDosError( io_status.u.Status ) );
return FALSE;
}
return TRUE;
}
/***********************************************************************
* CancelIo (KERNEL32.@)
*
* Cancels pending I/O operations initiated by the current thread on a file.
......
......@@ -177,6 +177,7 @@
@ stdcall CallNamedPipeW(wstr ptr long ptr long ptr long)
@ stub CancelDeviceWakeupRequest
@ stdcall CancelIo(long)
@ stdcall CancelIoEx(long ptr)
# @ stub CancelTimerQueueTimer
@ stdcall CancelWaitableTimer(long)
@ stdcall ChangeTimerQueueTimer(ptr ptr long long)
......
......@@ -1323,6 +1323,7 @@ WINBASEAPI BOOL WINAPI CallNamedPipeA(LPCSTR,LPVOID,DWORD,LPVOID,DWORD,LP
WINBASEAPI BOOL WINAPI CallNamedPipeW(LPCWSTR,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,DWORD);
#define CallNamedPipe WINELIB_NAME_AW(CallNamedPipe)
WINBASEAPI BOOL WINAPI CancelIo(HANDLE);
WINBASEAPI BOOL WINAPI CancelIoEx(HANDLE,LPOVERLAPPED);
WINBASEAPI BOOL WINAPI CancelWaitableTimer(HANDLE);
WINBASEAPI BOOL WINAPI ChangeTimerQueueTimer(HANDLE,HANDLE,ULONG,ULONG);
WINADVAPI BOOL WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment