网站首页  词典首页

请输入您要查询的函数:

 

术语 resetevent
释义 ResetEvent
语法:
C++
BOOL WINAPI ResetEvent(
__in HANDLE hEvent
);
ResetEvent函数
设置指定事件对象的无信号状态。
参数
hEvent [in]
阿处理该事件的对象。在CreateEvent或OpenEvent函数返回此句柄。
句柄必须有EVENT_MODIFY_STATE访问权限。有关更多信息,请参阅同步对象的安全和访问权限。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
一个事件对象的状态仍然无信号,直到它明确规定由SetEvent或PulseEvent功能信号。这一无信号状态会阻止任何指定在调用事件对象的等待线程执行的职能之一。
该ResetEvent函数主要用于手动重置事件对象,必须显式设置为无信号状态。自动重置事件对象自动改变示意无信号后,一个等待线程被释放。
重置的事件已经复位没有任何作用。
实例
举一个例子,它使用ResetEvent,请使用事件对象。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CreateEvent
事件对象
OpenEvent
PulseEvent
SetEvent
同步功能
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==ResetEvent Function
Sets the specified event object to the nonsignaled state.
Syntax
C++
BOOL WINAPI ResetEvent(
__in HANDLE hEvent
);
Parameters
hEvent [in]
A handle to the event object. The CreateEvent or OpenEvent function returns this handle.
The handle must have the EVENT_MODIFY_STATE access right. For more information, see Synchronization Object Security and Access Rights .
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The state of an event object remains nonsignaled until it is explicitly set to signaled by the SetEvent or PulseEvent function. This nonsignaled state blocks the execution of any threads that have specified the event object in a call to one of the wait functions .
The ResetEvent function is used primarily for manual-reset event objects, which must be set explicitly to the nonsignaled state. Auto-reset event objects automatically change from signaled to nonsignaled after a single waiting thread is released.
Resetting an event that is already reset has no effect.
Examples
For an example that uses ResetEvent, see Using Event Objects .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CreateEvent
Event Objects
OpenEvent
PulseEvent
SetEvent
Synchronization Functions
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms685081(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:18:40