Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
StartThreadpoolIo
Collapse the table of content
Expand the table of content

StartThreadpoolIo function

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 WINAPI StartThreadpoolIo(
  _Inout_ PTP_IO pio
);

Parameters

pio [in, out]

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

Return value

This function does not return a value.

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinBase.h on Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (include Windows.h);
Threadpoolapiset.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

CancelThreadpoolIo
CloseThreadpoolIo
CreateThreadpoolIo
Thread Pools
WaitForThreadpoolIoCallbacks

 

 

Community Additions

ADD
Show:
© 2015 Microsoft