Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Marks pending synchronous I/O operations that are issued by the specified thread as canceled.
BOOL CancelSynchronousIo(
[in] HANDLE hThread
);
[in] hThread
A handle to the thread.
If the function succeeds, the return value is nonzero.
If the function fails, the return value is 0 (zero). To get extended error information, call the GetLastError function.
If this function cannot find a request to cancel, the return value is 0 (zero), and GetLastError returns ERROR_NOT_FOUND.
The caller must have the THREAD_TERMINATE access right.
If there are any pending I/O operations in progress for the specified thread, the CancelSynchronousIo function marks them for cancellation. Most types of operations can be canceled immediately; other operations can continue toward completion before they are actually canceled and the caller is notified. The CancelSynchronousIo function does not wait for all canceled operations to complete. For more information, see Canceling Pending I/O Operations.
The operation being canceled is completed with one of three statuses; you must check the completion status to determine the completion state. The three statuses are:
Technology | Supported |
---|---|
Server Message Block (SMB) 3.0 protocol | Yes |
SMB 3.0 Transparent Failover (TFO) | Yes |
SMB 3.0 with Scale-out File Shares (SO) | Yes |
Cluster Shared Volume File System (CsvFS) | Yes |
Resilient File System (ReFS) | Yes |
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | ioapiset.h (include Windows.h) |
Library | Kernel32.lib |
DLL | Kernel32.dll |
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!