Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

StartThreadpoolIo function (threadpoolapiset.h)

Notifies the thread pool that I/O operations may possibly begin for the specified I/O completion object. A worker thread calls the I/O completion object's callback function after the operation completes on the file handle bound to this object.

Syntax

VOID StartThreadpoolIo(
 [in, out] PTP_IO pio
);

Parameters

[in, out] pio

A pointer to a TP_IO structure that defines the I/O completion object. The CreateThreadpoolIo function returns this pointer.

Return value

None

Remarks

You must call this function before initiating each asynchronous I/O operation on the file handle bound to the I/O completion object. Failure to do so will cause the thread pool to ignore an I/O operation when it completes and will cause memory corruption.

If the I/O operation fails, call the CancelThreadpoolIo function to cancel this notification.

If the file handle bound to the I/O completion object has the notification mode FILE_SKIP_COMPLETION_PORT_ON_SUCCESS and an asynchronous I/O operation returns immediately with success, the object's I/O completion callback function is not called and threadpool I/O notifications must be canceled. For more information, see CancelThreadpoolIo.

To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or higher.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header threadpoolapiset.h (include Windows.h on Windows 7, Windows Server 2008 Windows Server 2008 R2)
Library Kernel32.lib
DLL Kernel32.dll

See also

CancelThreadpoolIo

CloseThreadpoolIo

CreateThreadpoolIo

Thread Pools

WaitForThreadpoolIoCallbacks


Feedback

Was this page helpful?

Additional resources