网站首页  词典首页

请输入您要查询的函数:

 

术语 eventcallback
释义 EventCallback
语法:
C++
VOID WINAPI EventCallback(
__in PEVENT_TRACE pEvent
);
EventCallback回调函数
实现这个功能,消费者接受会话活动。
在PEVENT_CALLBACK类型定义一个指向这个回调函数。 EventCallback是一个应用程序的占位符定义函数的名称。
参数
控制矩阵 [in]
指针的EVENT_TRACE结构,它包含事件的信息。
返回值
该函数没有返回值。
备注
要指定调用函数ETW提供的事件,设置EVENT_TRACE_LOGFILE结构EventCallback成员,传递给OpenTrace功能。
此回调接收的所有事件,这次会议从您调用OpenTrace函数来打开跟踪生成。调用ProcessTrace函数开始接收事件。
第一次事件您总是收到事件数据包含TRACE_LOGFILE_HEADER信息。
您收到的所有包含特定于提供事件数据的其他活动。您使用EVENT_TRACE的Header.Guid和Header.Class.Type成员,以确定您收到的事件类型。如果您是使用事件从自己的供应商,知道数据的布局,这不是一个问题。否则,解释的情况下,供应商必须公布他们的活动模式在\\ \\根目录\\ WMI命名空间。有关使用事件的架构财政部解释事件信息,请参见使用事件。
要通过具体的事件类的筛选事件,调用SetTraceCallback功能。如果您同时使用EventCallback和EventClassCallback接收事件,该事件是始终发送到EventCallback,并只发送到EventClassCallback如果事件匹配类GUID的回调是该过滤事件。
如果您只是要筛选事件,您不必指定EventCallback功能。不过,如果您想获得日志文件头信息,还必须提供一个事件类回调捕捉EventTraceGuid类GUID。
实例
对于一个EventCallback执行函数的例子,看到一个事件实现回调函数。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderEvntrace.h
参见
BufferCallback
EVENT_TRACE_LOGFILE
EventClassCallback
ProcessTrace
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==EventCallback Callback Function
Consumers implement this function to receive events from a session.
The PEVENT_CALLBACK type defines a pointer to this callback function. EventCallback is a placeholder for the application-defined function name.
Syntax
C++
VOID WINAPI EventCallback(
__in PEVENT_TRACE pEvent
);
Parameters
pEvent [in]
Pointer to an EVENT_TRACE structure that contains the event information.
Return Value
The function does not return a value.
Remarks
To specify the function that ETW calls to deliver the events, set the EventCallback member of the EVENT_TRACE_LOGFILE structure that you pass to the OpenTrace function.
This callback receives all events that the session generates from the time you call the OpenTrace function to open the trace. Call the ProcessTrace function to begin receiving the events.
The event data for the first event you always receive contains the TRACE_LOGFILE_HEADER information.
All the other events you receive contain provider-specific event data. You use the Header.Guid and Header.Class.Type members of EVENT_TRACE to determine the type of event you received. If you are consuming events from your own provider and know the layout of the data, this is not an issue. Otherwise, to interpret the event, the provider must have published their event schema in the \\\\root\\wmi namespace. For information on using an event's MOF schema to interpret the event, see Consuming Events .
To filter events by a specific class of events, call the SetTraceCallback function. If you use both EventCallback and EventClassCallback to receive events, the event is always sent to EventCallback and is only sent to EventClassCallback if the event matches the class GUID for which the callback is filtering events.
If you only want to filter events, you do not have to specify the EventCallback function. However, if you want to receive the log file header information, you must also provide an event class callback to capture the EventTraceGuid class GUID.
Examples
For an example implementation of an EventCallback function, see Implementing an Event Callback Function .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderEvntrace.h
See Also
BufferCallback
EVENT_TRACE_LOGFILE
EventClassCallback
ProcessTrace
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363721(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:19