TpReleaseCleanupGroupMembers - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTTP_H

// winbase:CloseThreadpoolCleanupGroupMembers
/**
 * Releases the members of the specified cleanup group.
 *
 * \param[in,out] CleanupGroup A pointer to a TP_CLEANUP_GROUP structure that defines the cleanup group.
 * \param[in] CancelPendingCallbacks If TRUE, pending callbacks that have not started are canceled.
 * \param[in,out] CleanupParameter Optional application-defined context to pass to cleanup callbacks.
 * \sa https://learn.microsoft.com/en-us/windows/win32/api/threadpoolapiset/nf-threadpoolapiset-closethreadpoolcleanupgroupmembers
 * \remarks Releases the group member objects and waits according to the cleanup protocol; CancelPendingCallbacks can cancel callbacks 
 * not yet started but cannot forcibly terminate one already executing. After this call do not separately release a member object whose group ownership has been consumed.
 */
NTSYSAPI
VOID
NTAPI
TpReleaseCleanupGroupMembers(
    _Inout_ PTP_CLEANUP_GROUP CleanupGroup,
    _In_ LOGICAL CancelPendingCallbacks,
    _Inout_opt_ PVOID CleanupParameter
    );

#endif

View code on GitHub

NtDoc

Releases the members of the specified cleanup group, waits for all callback functions to complete, and optionally cancels any outstanding callback functions.

Related Win32 API

CloseThreadpoolCleanupGroupMembers maps directly to this function.

See also