TpAllocCleanupGroup - NtDoc

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

// winbase:CreateThreadpoolCleanupGroup
/**
 * Creates a cleanup group that applications can use to track one or more thread pool callbacks.
 *
 * \param[out] CleanupGroup A pointer to a variable that receives the address of the newly allocated cleanup
 * group.
 * \return NTSTATUS Successful or errant status.
 * \sa
 * https://learn.microsoft.com/en-us/windows/win32/api/threadpoolapiset/nf-threadpoolapiset-createthreadpoolcleanupgroup
 * \remarks A cleanup group owns registrations of member callback objects; release group members first, then
 * release the group itself. Cancellation does not imply that an executing callback has returned.
 */
NTSYSAPI
NTSTATUS
NTAPI
TpAllocCleanupGroup(
    _Out_ PTP_CLEANUP_GROUP *CleanupGroup
    );

#endif

View code on GitHub

NtDoc

Creates a cleanup group that applications can use to track one or more thread pool callbacks.

Related Win32 API

CreateThreadpoolCleanupGroup is a thin wrapper around this function.

See also