网站首页  词典首页

请输入您要查询的函数:

 

术语 setthreadpooltimer
释义 SetThreadpoolTimer
语法:
C++
VOID WINAPI SetThreadpoolTimer(
__inout PTP_TIMER pti,
__in_opt PFILETIME pftDueTime,
__in DWORD msPeriod,
__in_opt DWORD msWindowLength
);
SetThreadpoolTimer功能
设置计时器对象。一名工人线程调用指定的超时后,计时器对象的回调到期。
参数
交汇处[ in , out ]
阿TP_TIMER结构,它定义的计时器对象设置。该CreateThreadpoolTimer函数返回这个结构。
pftDueTime [中,可选]
绝对或相对的时间应在计时器到期。如果阳性它表示绝对时间自1600年1月1日,在100纳秒单位来衡量。如果为负数,这表明了等待时间的数量相对于当前的时间。
如果该参数为NULL,则计时器对象将不再排队新的回调(回调已经排队,但依然会发生)。
msPeriod [in]
计时器的时间,以毫秒为单位。
msWindowLength [中,可选]
量的时间延迟计时器对象的到期,以毫秒为单位。该延迟只发生如果没有其他计时器对象即将到期。
返回值
这个函数没有返回值。
备注
在某些情况下,回调函数可能运行的应用程序后,关闭线程池计时器。为了防止这种行为,应用程序应调用设置为NULL的pftDueTime参数和msPeriod和msWindowLength设置为0参数SetThreadpoolTimer。有关详情,请CloseThreadpoolTimer。
要编译的应用程序使用此函数,定义为0x0600或更高_WIN32_WINNT。
实例
有关示例,请参阅使用线程池功能。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CloseThreadpoolTimer
CreateThreadpoolTimer
IsThreadpoolTimerSet
线程池
WaitForThreadpoolTimerCallbacks
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==SetThreadpoolTimer Function
Sets the timer object. A worker thread calls the timer object's callback after the specified timeout expires.
Syntax
C++
VOID WINAPI SetThreadpoolTimer(
__inout PTP_TIMER pti,
__in_opt PFILETIME pftDueTime,
__in DWORD msPeriod,
__in_opt DWORD msWindowLength
);
Parameters
pti [in, out]
A TP_TIMER structure that defines the timer object to set. The CreateThreadpoolTimer function returns this structure.
pftDueTime [in, optional]
The absolute or relative time at which the timer should expire. If positive, it indicates the absolute time since 1/1/1600, measured in 100 nanosecond units. If negative, it indicates the amount of time to wait relative to the current time.
If this parameter is NULL, the timer object will cease to queue new callbacks (but callbacks already queued will still occur).
msPeriod [in]
The timer period, in milliseconds.
msWindowLength [in, optional]
The amount of time to delay the timer object's expiration, in milliseconds. The delay occurs only if there are no other timer objects that are expiring.
Return Value
This function does not return a value.
Remarks
In some cases, callback functions might run after an application closes the threadpool timer. To prevent this behavior, an application should call SetThreadpoolTimer with the pftDueTime parameter set to NULL and the msPeriod and msWindowLength parameters set to 0. For more information, see CloseThreadpoolTimer .
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
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CloseThreadpoolTimer
CreateThreadpoolTimer
IsThreadpoolTimerSet
Thread Pools
WaitForThreadpoolTimerCallbacks
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms686271(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:24:49