网站首页  词典首页

请输入您要查询的函数:

 

术语 openwaitabletimer
释义 OpenWaitableTimer
语法:
C++
HANDLE WINAPI OpenWaitableTimer(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCTSTR lpTimerName
);
OpenWaitableTimer功能
打开一个现有的命名可等待定时器对象。
参数
dwDesiredAccess [in]
到计时器对象访问。函数失败如果指定对象的安全描述符不允许为调用进程的请求的访问。如需使用权名单,见同步对象的安全和访问权限。
bInheritHandle [in]
如果该值为TRUE,进程创建的这一进程将继承处理。否则,该进程不会继承此处理。
lpTimerName [in]
定时器的对象的名称。该名称被限制为MAX_PATH字符。名称比较是区分大小写的。
这个函数可以打开一个私人空间的对象。有关更多信息,请参见对象命名。
终端服务:名称可以有一个“全球\\”或“Local \\”前缀显式打开一个对象,在全球或会话名称空间。名称的其余部分可以包含以外的任何字符反斜杠字符(\\)。如需信息见命名内核对象。
Windows XP家庭版:快速用户切换是使用终端服务会话。第一个用户对使用记录会话0,下一个用户登录使用会话1,依此类推。内核对象名称必须遵循概述了终端服务,使应用程序能够支持多个用户的指导方针。
窗口2000:如果终端服务没有运行,“全球\\”和“地方\\”前缀将被忽略。名称的其余部分可以包含反斜杠以外的任何字符的字符。
返回值
如果函数成功,返回值是一个句柄计时器对象。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
该OpenWaitableTimer功能允许多个进程打开的句柄相同的计时器对象。函数调用成功,只有一些工作已经创造了计时器使用CreateWaitableTimer功能。调用进程可以使用返回的处理任何函数,需要处理的计时器对象,如等待功能,但须在指定dwDesiredAccess参数的准入限制。
返回的句柄可以被重复使用DuplicateHandle函数。使用CloseHandle函数关闭处理。该系统关闭时自动处理过程终止。计时器对象被销毁时,其最后处理已关闭。
要编译的应用程序使用此功能,定义_WIN32_WINNT为0x0400或更高版本。有关详细信息,请参阅使用Windows头。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesOpenWaitableTimerW(Unicode)和OpenWaitableTimerA(ANSI)的
参见
CancelWaitableTimer
CloseHandle
CreateProcess的
CreateWaitableTimer
DuplicateHandle
对象名称
SetWaitableTimer
同步功能
可等待定时器对象
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==OpenWaitableTimer Function
Opens an existing named waitable timer object.
Syntax
C++
HANDLE WINAPI OpenWaitableTimer(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in LPCTSTR lpTimerName
);
Parameters
dwDesiredAccess [in]
The access to the timer object. The function fails if the security descriptor of the specified object does not permit the requested access for the calling process. For a list of access rights, see Synchronization Object Security and Access Rights .
bInheritHandle [in]
If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the processes do not inherit this handle.
lpTimerName [in]
The name of the timer object. The name is limited to MAX_PATH characters. Name comparison is case sensitive.
This function can open objects in a private namespace. For more information, see Object Namespaces .
Terminal Services: The name can have a "Global\\" or "Local\\" prefix to explicitly open an object in the global or session name space. The remainder of the name can contain any character except the backslash character (\\). For more information, see Kernel Object Namespaces .
Windows XP Home Edition: Fast user switching is implemented using Terminal Services sessions. The first user to log on uses session 0, the next user to log on uses session 1, and so on. Kernel object names must follow the guidelines outlined for Terminal Services so that applications can support multiple users.
Windows 2000: If Terminal Services is not running, the "Global\\" and "Local\\" prefixes are ignored. The remainder of the name can contain any character except the backslash character.
Return Value
If the function succeeds, the return value is a handle to the timer object.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
The OpenWaitableTimer function enables multiple processes to open handles to the same timer object. The function succeeds only if some process has already created the timer using the CreateWaitableTimer function. The calling process can use the returned handle in any function that requires the handle to a timer object, such as the wait functions , subject to the limitations of the access specified in the dwDesiredAccess parameter.
The returned handle can be duplicated by using the DuplicateHandle function. Use the CloseHandle function to close the handle. The system closes the handle automatically when the process terminates. The timer object is destroyed when its last handle has been closed.
To compile an application that uses this function, define _WIN32_WINNT as 0x0400 or later. For more information, see Using the Windows Headers .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesOpenWaitableTimerW (Unicode) and OpenWaitableTimerA (ANSI)
See Also
CancelWaitableTimer
CloseHandle
CreateProcess
CreateWaitableTimer
DuplicateHandle
Object Names
SetWaitableTimer
Synchronization Functions
Waitable Timer Objects
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms684337(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 13:20:20