#ifdef _MSC_VER
#pragma once
#endif // _MSC_VER
#ifndef _THREADPOOLAPISET_H_
#define _THREADPOOLAPISET_H_
#include <apiset.h>
#include <apisetcconv.h>
#include <minwindef.h>
#include <minwinbase.h>
#ifdef __cplusplus
extern
"C"
{
#endif
#pragma region Application Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
typedef
(WINAPI *PTP_WIN32_IO_CALLBACK)(
_Inout_ PTP_CALLBACK_INSTANCE Instance,
_Inout_opt_ PVOID Context,
_Inout_opt_ PVOID Overlapped,
_In_ ULONG_PTR NumberOfBytesTransferred,
NumberOfBytesTransferred,
);
#if (_WIN32_WINNT >= 0x0600)
_Must_inspect_result_
(
_Reserved_ PVOID reserved
);
SetThreadpoolThreadMaximum
(
);
SetThreadpoolThreadMinimum
(
);
(
_In_ PTP_POOL_STACK_INFORMATION ptpsi
PTP_POOL_STACK_INFORMATION
);
(
_Out_ PTP_POOL_STACK_INFORMATION ptpsi
PTP_POOL_STACK_INFORMATION
);
(
);
_Must_inspect_result_
CreateThreadpoolCleanupGroup
(
);
CloseThreadpoolCleanupGroupMembers
(
_Inout_ PTP_CLEANUP_GROUP ptpcg,
_In_ BOOL fCancelPendingCallbacks,
_Inout_opt_ PVOID pvCleanupContext
);
CloseThreadpoolCleanupGroup
(
_Inout_ PTP_CLEANUP_GROUP ptpcg
);
SetEventWhenCallbackReturns
(
_Inout_ PTP_CALLBACK_INSTANCE pci,
);
ReleaseSemaphoreWhenCallbackReturns
(
_Inout_ PTP_CALLBACK_INSTANCE pci,
);
ReleaseMutexWhenCallbackReturns
(
_Inout_ PTP_CALLBACK_INSTANCE pci,
);
LeaveCriticalSectionWhenCallbackReturns
(
_Inout_ PTP_CALLBACK_INSTANCE pci,
_Inout_ PCRITICAL_SECTION pcs
);
FreeLibraryWhenCallbackReturns
(
_Inout_ PTP_CALLBACK_INSTANCE pci,
);
(
_Inout_ PTP_CALLBACK_INSTANCE pci
);
DisassociateCurrentThreadFromCallback
(
_Inout_ PTP_CALLBACK_INSTANCE pci
);
_Must_inspect_result_
TrySubmitThreadpoolCallback
(
_In_ PTP_SIMPLE_CALLBACK pfns,
_In_opt_ PTP_CALLBACK_ENVIRON pcbe
);
_Must_inspect_result_
(
_In_ PTP_WORK_CALLBACK pfnwk,
_In_opt_ PTP_CALLBACK_ENVIRON pcbe
);
(
);
WaitForThreadpoolWorkCallbacks
(
_In_ BOOL fCancelPendingCallbacks
);
(
);
_Must_inspect_result_
(
_In_ PTP_TIMER_CALLBACK pfnti,
_In_opt_ PTP_CALLBACK_ENVIRON pcbe
);
(
_In_opt_ PFILETIME pftDueTime,
_In_opt_ DWORD msWindowLength
);
(
);
WaitForThreadpoolTimerCallbacks
(
_In_ BOOL fCancelPendingCallbacks
);
(
);
_Must_inspect_result_
(
_In_ PTP_WAIT_CALLBACK pfnwa,
_In_opt_ PTP_CALLBACK_ENVIRON pcbe
);
(
_In_opt_ PFILETIME pftTimeout
);
WaitForThreadpoolWaitCallbacks
(
_In_ BOOL fCancelPendingCallbacks
);
(
);
_Must_inspect_result_
(
_In_ PTP_WIN32_IO_CALLBACK pfnio,
_In_opt_ PTP_CALLBACK_ENVIRON pcbe
);
(
);
(
);
WaitForThreadpoolIoCallbacks
(
_In_ BOOL fCancelPendingCallbacks
);
(
);
(
_In_opt_ PFILETIME pftDueTime,
_In_opt_ DWORD msWindowLength
);
(
_In_opt_ PFILETIME pftTimeout,
_Reserved_ PVOID Reserved
);
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#pragma region Desktop Family or OneCore Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM)
#if (_WIN32_WINNT >= 0x0600)
#endif // _WIN32_WINNT >= 0x0600
#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP | WINAPI_PARTITION_SYSTEM) */
#pragma endregion
#ifdef __cplusplus
}
#endif
#endif // _THREADPOOLAPISET_H_