Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a callback environment.
void InitializeThreadpoolEnvironment(
[out] PTP_CALLBACK_ENVIRON pcbe
);
[out] pcbe
A TP_CALLBACK_ENVIRON structure that defines a callback environment.
None
By default, a callback executes in the default thread pool for the process. No cleanup group is associated with the callback environment, the caller is responsible for keeping the callback's DLL loaded while there are outstanding callbacks, and the callback is expected to run in a reasonable amount of time for the application.
Create a callback environment if you plan to call one of the following functions to modify the environment:
- SetThreadpoolCallbackCleanupGroup
- SetThreadpoolCallbackLibrary
- SetThreadpoolCallbackPool
- SetThreadpoolCallbackPriority
- SetThreadpoolCallbackRunsLong
- CreateThreadpoolIo
- CreateThreadpoolTimer
- CreateThreadpoolWait
- CreateThreadpoolWork
- TrySubmitThreadpoolCallback
To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or higher.
For an example, see Using the Thread Pool Functions.
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) |