Share via


IsThreadpoolTimerSet 函式 (threadpoolapiset.h)

判斷指定的定時器物件目前是否已設定。

語法

BOOL IsThreadpoolTimerSet(
  [in, out] PTP_TIMER pti
);

參數

[in, out] pti

定義定時器物件的 TP_TIMER 結構的指標。 CreateThreadpoolTimer 函式會傳回這個指標。

傳回值

如果設定定時器,則傳回值為TRUE;否則,傳回值為 FALSE。

備註

如果最近呼叫 SetThreadpoolTimer 或 SetThreadpoolTimerEx 函式傳遞 pftDueTime 的非 Null 值,則會將定時器視為要設定。

若要編譯使用此函式的應用程式,請將_WIN32_WINNT定義為0x0600或更高版本。

規格需求

需求
最低支援的用戶端 Windows Vista [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2008 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 threadpoolapiset.h (Windows 7、Windows Server 2008 Windows Server 2008 R2)
程式庫 Kernel32.lib
DLL Kernel32.dll

另請參閱

CloseThreadpoolTimer

CreateThreadpoolTimer

SetThreadpoolTimer

線程集區

WaitForThreadpoolTimerCallbacks