网站首页  词典首页

请输入您要查询的函数:

 

术语 openeventlog
释义 OpenEventLog
语法:
C++
HANDLE OpenEventLog(
__in LPCTSTR lpUNCServerName,
__in LPCTSTR lpSourceName
);
OpenEventLog功能
打开的句柄指定的事件日志。
参数
lpUNCServerName [in]
通用命名约定(UNC)的远程服务器上的事件日志要打开的名称。如果该参数为NULL,则使用本地计算机。
lpSourceName [in]
日志的名称。
如果您指定一个自定义日志,也不能找到,事件日志服务打开应用程序日志,但不会有关联的消息或类别字符串的文件。
返回值
如果函数成功,返回值是处理一个事件日志。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
若要关闭处理事件日志,使用CloseEventLog功能。
实例
有关示例,请参阅查询的事件信息。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode和ANSI namesOpenEventLogW(Unicode)和OpenEventLogA(ANSI)的
参见
事件日志的关键
事件记录功能
ClearEventLog
CloseEventLog
ReadEventLog
ReportEvent
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月6日
==英文原文==OpenEventLog Function
Opens a handle to the specified event log.
Syntax
C++
HANDLE OpenEventLog(
__in LPCTSTR lpUNCServerName,
__in LPCTSTR lpSourceName
);
Parameters
lpUNCServerName [in]
The Universal Naming Convention (UNC) name of the remote server on which the event log is to be opened. If this parameter is NULL, the local computer is used.
lpSourceName [in]
The name of the log.
If you specify a custom log and it cannot be found, the event logging service opens the Application log; however, there will be no associated message or category string file.
Return Value
If the function succeeds, the return value is the handle to an event log.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
To close the handle to the event log, use the CloseEventLog function.
Examples
For an example, see Querying for Event Information .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode and ANSI namesOpenEventLogW (Unicode) and OpenEventLogA (ANSI)
See Also
Eventlog Key
Event Logging Functions
ClearEventLog
CloseEventLog
ReadEventLog
ReportEvent
Send comments about this topic to Microsoft
Build date: 8/6/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363672(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:15:28