CancelThreadpoolIo
Cancels the notification from the StartThreadpoolIo function.
Syntax
void CancelThreadpoolIo(
PTP_IO pio
)
Parameters
pio
Type: PTP_IO
[in, out] A TP_IO structure that defines the I/O completion object. The CreateThreadpoolIo function returns this structure.
Return value
None.
Remarks
To prevent memory leaks, you must call the CancelThreadpoolIo function for either of the following scenarios:
- An overlapped (asynchronous) I/O operation fails (that is, the asynchronous I/O function call returns failure with an error code other than ERROR_IO_PENDING).
- An asynchronous I/O operation returns immediately with success and the file handle associated with the I/O completion object has the notification mode FILE_SKIP_COMPLETION_PORT_ON_SUCCESS. The file handle will not notify the I/O completion port and the associated I/O callback function will not be called.
Requirements
Header: Declared in threadpoolapiset.h.
Library: Use kernelx.lib.