Waits for outstanding work callbacks to complete and optionally cancels pending callbacks that have not yet started to execute.
void WaitForThreadpoolWorkCallbacks(
PTP_WORK pwk,
BOOL fCancelPendingCallbacks
)
pwk
Type: PTP_WORK
[in, out] A TP_WORK structure that defines the work object. The CreateThreadpoolWork function returns this structure.
fCancelPendingCallbacks
Type: BOOL
[in] Indicates whether to cancel queued callbacks that have not yet started to execute.
Header: Declared in threadpoolapiset.h.
Library: Use kernelx.lib.