网站首页  词典首页

请输入您要查询的函数:

 

术语 registereventsource
释义 RegisterEventSource
语法:
C++
HANDLE RegisterEventSource(
__in LPCTSTR lpUNCServerName,
__in LPCTSTR lpSourceName
);
RegisterEventSource功能
检索注册句柄指定的事件日志。
参数
lpUNCServerName [in]
通用命名约定(UNC)的远程服务器上的这一行动是要执行的名称。如果该参数为NULL,则使用本地计算机。
lpSourceName [in]
在事件源的处理名称是要检索。源名称必须是一个事件日志记录下的注册表子项。
然而,安全日志仅用于系统使用。
返回值
如果函数成功,返回值是一个句柄到事件日志。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
该函数返回ERROR_ACCESS_DENIED如果lpSourceName指定安全事件日志。
备注
如果源名称不能找到,事件日志服务使用的应用程序日志。虽然活动将报告,事件将不包括描述,因为是有查找有关该事件的标识符和描述没有消息类的信息文件。
若要关闭处理事件日志,使用DeregisterEventSource功能。
实例
有关示例,请参阅Reporting一个事件。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode和ANSI namesRegisterEventSourceW(Unicode)和RegisterEventSourceA(ANSI)的
参见
事件记录功能
事件源
DeregisterEventSource
ReportEvent
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月6日
==英文原文==RegisterEventSource Function
Retrieves a registered handle to the specified event log.
Syntax
C++
HANDLE RegisterEventSource(
__in LPCTSTR lpUNCServerName,
__in LPCTSTR lpSourceName
);
Parameters
lpUNCServerName [in]
The Universal Naming Convention (UNC) name of the remote server on which this operation is to be performed. If this parameter is NULL, the local computer is used.
lpSourceName [in]
The name of the event source whose handle is to be retrieved. The source name must be a subkey of a log under the Eventlog registry key.
However, the Security log is for system use only.
Return Value
If the function succeeds, the return value is a handle to the event log.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
The function returns ERROR_ACCESS_DENIED if lpSourceName specifies the Security event log.
Remarks
If the source name cannot be found, the event logging service uses the Application log. Although events will be reported , the events will not include descriptions because there are no message and category message files for looking up descriptions related to the event identifiers.
To close the handle to the event log, use the DeregisterEventSource function.
Examples
For an example, see Reporting an Event .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll
Unicode and ANSI namesRegisterEventSourceW (Unicode) and RegisterEventSourceA (ANSI)
See Also
Event Logging Functions
Event Sources
DeregisterEventSource
ReportEvent
Send comments about this topic to Microsoft
Build date: 8/6/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363678(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:02