Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

WaitForThreadpoolIoCallbacks function

Waits for outstanding I/O completion callbacks to complete and optionally cancels pending callbacks that have not yet started to execute.

Syntax


VOID WINAPI WaitForThreadpoolIoCallbacks(
  _Inout_ PTP_IO pio,
  _In_    BOOL   fCancelPendingCallbacks
);

Parameters

pio [in, out]

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

fCancelPendingCallbacks [in]

Indicates whether to cancel queued callbacks that have not yet started to execute.

Return value

This function does not return a value.

Remarks

When fCancelPendingCallbacks is set to TRUE, only queued callbacks are canceled. Pending I/O requests are not canceled. Therefore, the caller should call GetOverlappedResult for the OVERLAPPED structure to check whether the I/O operation has completed before freeing the structure. As an alternative, set fCancelPendingCallbacks to FALSE and have the associated I/O completion callback free the OVERLAPPED structure. Be careful not to free the OVERLAPPED structure while I/O requests are still pending; use GetOverlappedResult to determine the status of the I/O operation and wait for the operation to complete. The CancelIoEx function can optionally be used first to cancel outstanding I/O requests, potentially shortening the wait. For more information, see Canceling Pending I/O Operations.

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

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

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
StartThreadpoolIo
Thread Pools

 

 

Show:
© 2017 Microsoft