网站首页  词典首页

请输入您要查询的函数:

 

术语 settracecallback
释义 SetTraceCallback
语法:
C++
ULONG SetTraceCallback(
__in LPCGUID pGuid,
__in PEVENT_CALLBACK EventCallback
);
SetTraceCallback Function
[不要使用此功能,它可以在后续版本中不可用。相反,对事件跟踪功能,在您的EventCallback级过滤器。]
该SetTraceCallback函数指定一个EventClassCallback函数来处理指定事件跟踪类的事件。
参数
pGuid [in]
指针类GUID的事件跟踪级您要接收事件。对于内核提供程序类GUID的清单,见NT内核记录仪常数。
EventCallback [in]
指向一个EventClassCallback函数用来处理事件属于事件跟踪类。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是系统错误代码之一。下表列出了一些常见的错误及其原因。
返回codeDescription
以下ERROR_INVALID_PARAMETEROne是正确的:
pGuid为NULL。
EventCallback为NULL。
备注
消费者调用这个函数。
您只能指定一个事件跟踪类一个回调函数。如果您指定的类,甚至追踪多个回调函数,最后一个回调函数收到该事件跟踪类的事件。
要停止接收的事件跟踪类事件的回调函数,调用RemoveTraceCallback功能。回调将自动停止接收回调当您关闭跟踪。
您可以使用此函数来获得书面使用功能之一的TraceEvent事件。您不能使用此功能的消费从供应商所使用的EventWrite职能就是要记录的事件有关。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderEvntrace.h
LibraryAdvapi32.lib
DLLAdvapi32.dll
参见
EventClassCallback
ProcessTrace
RemoveTraceCallback
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==SetTraceCallback Function
[Do not use this function; it may be unavailable in subsequent versions. Instead, filter for the event trace class in your EventCallback function.]
The SetTraceCallback function specifies an EventClassCallback function to process events for the specified event trace class.
Syntax
C++
ULONG SetTraceCallback(
__in LPCGUID pGuid,
__in PEVENT_CALLBACK EventCallback
);
Parameters
pGuid [in]
Pointer to the class GUID of an event trace class for which you want to receive events. For a list of kernel provider class GUIDs, see NT Kernel Logger Constants .
EventCallback [in]
Pointer to an EventClassCallback function used to process events belonging to the event trace class.
Return Value
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is one of the system error codes . The following table includes some common errors and their causes.
Return codeDescription
ERROR_INVALID_PARAMETEROne of the following is true:
pGuid is NULL.
EventCallback is NULL.


Remarks
Consumers call this function.
You can only specify one callback function for an event trace class. If you specify more than one callback function for the even trace class, the last callback function receives the events for that event trace class.
To stop the callback function from receiving events for the event trace class, call the RemoveTraceCallback function. The callback automatically stops receiving callbacks when you close the trace.
You can use this function to receive events written using one of the TraceEvent functions. You cannot use this function to consume events from a provider that used one of the EventWrite functions to log events.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderEvntrace.h
LibraryAdvapi32.lib
DLLAdvapi32.dll
See Also
EventClassCallback
ProcessTrace
RemoveTraceCallback
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364116(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:26:27