SetThreadpoolCallbackCleanupGroup function (winbase.h)
Associates the specified cleanup group with the specified callback environment.
Syntax
void SetThreadpoolCallbackCleanupGroup(
[in, out] PTP_CALLBACK_ENVIRON pcbe,
[in] PTP_CLEANUP_GROUP ptpcg,
[in, optional] PTP_CLEANUP_GROUP_CANCEL_CALLBACK pfng
);
Parameters
[in, out] pcbe
A TP_CALLBACK_ENVIRON structure that defines the callback environment. The InitializeThreadpoolEnvironment function returns this structure.
[in] ptpcg
A TP_CLEANUP_GROUP structure that defines the cleanup group. The CreateThreadpoolCleanupGroup function returns this structure.
[in, optional] pfng
The cleanup callback to be called if the cleanup group is canceled before the associated object is released. The function is called when you call CloseThreadpoolCleanupGroupMembers.
Return value
None
Remarks
This function is implemented as an inline function.
To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or higher.
Examples
For an example, see Using the Thread Pool Functions.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | winbase.h (include Windows.h) |