网站首页  词典首页

请输入您要查询的函数:

 

术语 notifychangeeventlog
释义 NotifyChangeEventLog
语法:
C++
BOOL NotifyChangeEventLog(
__in HANDLE hEventLog,
__in HANDLE hEvent
);
NotifyChangeEventLog功能
使应用程序时收到一个事件写入到指定的事件日志通知。当事件被写入到日志,指定的事件对象设置为信号状态。
参数
hEventLog [in]
阿处理一个事件日志。该OpenEventLog函数返回此句柄。
hEvent [in]
一个句柄,手动重置或自动重置事件对象。使用CreateEvent函数创建事件对象。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该NotifyChangeEventLog功能不起作用与远程处理。如果hEventLog参数是处理事件日志在远程计算机上,NotifyChangeEventLog返回零,并GetLastError返回出现ERROR_INVALID_HANDLE。
如果线程没有在等待事件时,系统调用PulseEvent,该线程将不会收到通知。因此,您应该创建一个单独的线程等待通知。
该系统将继续变更时通知您,直到您关闭处理事件日志。若要关闭事件日志,使用CloseEventLog或DeregisterEventSource功能。
实例
有关示例,请参见接收事件通知。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
参见
事件记录功能
CloseEventLog
CreateEvent
DeregisterEventSource
OpenEventLog
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月6日
==英文原文==NotifyChangeEventLog Function
Enables an application to receive notification when an event is written to the specified event log. When the event is written to the log, the specified event object is set to the signaled state.
Syntax
C++
BOOL NotifyChangeEventLog(
__in HANDLE hEventLog,
__in HANDLE hEvent
);
Parameters
hEventLog [in]
A handle to an event log. The OpenEventLog function returns this handle.
hEvent [in]
A handle to a manual-reset or auto-reset event object. Use the CreateEvent function to create the event object.
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 NotifyChangeEventLog function does not work with remote handles. If the hEventLog parameter is the handle to an event log on a remote computer, NotifyChangeEventLog returns zero, and GetLastError returns ERROR_INVALID_HANDLE.
If the thread is not waiting on the event when the system calls PulseEvent , the thread will not receive the notification. Therefore, you should create a separate thread to wait for notifications.
The system will continue to notify you of changes until you close the handle to the event log. To close the event log, use the CloseEventLog or DeregisterEventSource function.
Examples
For an example, see Receiving Event Notification .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
See Also
Event Logging Functions
CloseEventLog
CreateEvent
DeregisterEventSource
OpenEventLog
Send comments about this topic to Microsoft
Build date: 8/6/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363670(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:25:40