#ifndef _NTTP_H
// winbase:WaitForThreadpoolWorkCallbacks
/**
* Waits for outstanding work callbacks to complete and optionally cancels pending callbacks.
*
* \param[in,out] Work A pointer to a TP_WORK structure that defines the work object.
* \param[in] CancelPendingCallbacks If TRUE, pending callbacks that have not started are canceled.
* \sa https://learn.microsoft.com/en-us/windows/win32/api/threadpoolapiset/nf-threadpoolapiset-waitforthreadpoolworkcallbacks
*/
NTSYSAPI
VOID
NTAPI
TpWaitForWork(
_Inout_ PTP_WORK Work,
_In_ LOGICAL CancelPendingCallbacks
);
View code on GitHubWaits for outstanding work callbacks to complete and optionally cancels pending callbacks that have not yet started to execute.
WaitForThreadpoolWorkCallbacks maps directly to this function.