网站首页  词典首页

请输入您要查询的函数:

 

术语 processtrace
释义 ProcessTrace
语法:
C++
ULONG ProcessTrace(
__in PTRACEHANDLE HandleArray,
__in ULONG HandleCount,
__in LPFILETIME StartTime,
__in LPFILETIME EndTime
);
ProcessTrace功能
该ProcessTrace功能提供从一个或多个事件的事件跟踪会话消费者。
参数
HandleArray [in]
指针数组的跟踪处理获得前调用OpenTrace功能。处理的数字,您可以指定被限制为64。
该阵列可以包含句柄多个日志文件,但只有一个实时跟踪会话。
HandleCount [in]
在HandleArray数目的元素。
开始时间 [in]
一个可选的指针FILETIME结构,指定开始时间期限为您要接收的事件。该函数不传递开始时间之前记录的事件。
结束时间 [in]
一个可选的指针FILETIME结构,指定结束时间期限为您要接收的事件。该函数不提供记录的事件后,结束时间。
Server 2003和Windows XP中:此值是实时事件传递忽视的Windows。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是系统错误代码之一。下表列出了一些常见的错误及其原因。
返回codeDescription
ERROR_BAD_LENGTHHandleCount无效或句柄数比64更大。
ERROR_INVALID_HANDLEAn的HandleArray元素不是一个有效的事件跟踪会话句柄。
ERROR_INVALID_TIMEEndTime小于开始时间。
ERROR_INVALID_PARAMETERHandleArray为NULL。
ERROR_NOACCESSAn异常出现在接收事件回调职能之一。
ERROR_CANCELLEDIndicates消费者取消了返回其BufferCallback功能假处理。
ERROR_WMI_INSTANCE_NOT_FOUNDThe届会议的您要消耗实时事件不运行或不具有实时跟踪模式启用。
ERROR_WMI_ALREADY_ENABLEDThe HandleArray参数包含了处理一个以上的实时会议。
备注
消费者调用这个函数。
您必须调用OpenTrace函数之前调用ProcessTrace。
该ProcessTrace功能提供了活动,以消费者的BufferCallback,EventCallback和EventClassCallback回调函数。
该ProcessTrace函数排序按时间顺序,并提供活动开始时间和结束时间之间产生的所有事件。请注意,事件可能出现的规程,如果会话指定系统时钟(低分辨率)和事件的数量时高。在这种情况下,它可能包含多个事件在同一时间戳记。如果多个事件包含相同的时间戳记,ETW不能保证这些事件的顺序。
该ProcessTrace功能块的线程,直到它提供了所有的事件,BufferCallback函数返回FALSE,或者调用闭迹。如果消费者是在实时消费活动时,ProcessTrace函数返回后,控制器停止跟踪会话。 (请注意,可能有几函数返回之前,第二个延迟。)
在此之前的Windows Vista:您可以调用返回后,才ProcessTrace闭迹。
实例
举一个例子,它使用ProcessTrace,请打开一个跟踪会话和处理事件。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderEvntrace.h
LibraryAdvapi32.lib
DLLAdvapi32.dll
参见
BufferCallback
EventCallback
EventClassCallback
OpenTrace
SetTraceCallback
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==ProcessTrace Function
The ProcessTrace function delivers events from one or more event tracing sessions to the consumer.
Syntax
C++
ULONG ProcessTrace(
__in PTRACEHANDLE HandleArray,
__in ULONG HandleCount,
__in LPFILETIME StartTime,
__in LPFILETIME EndTime
);
Parameters
HandleArray [in]
Pointer to an array of trace handles obtained from earlier calls to the OpenTrace function. The number of handles that you can specify is limited to 64.
The array can contain the handles to multiple log files, but only one real-time trace session.
HandleCount [in]
Number of elements in HandleArray.
StartTime [in]
Pointer to an optional FILETIME structure that specifies the beginning time period for which you want to receive events. The function does not deliver events recorded prior to StartTime.
EndTime [in]
Pointer to an optional FILETIME structure that specifies the ending time period for which you want to receive events. The function does not deliver events recorded after EndTime.
Windows Server 2003 and Windows XP: This value is ignored for real-time event delivery.
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_BAD_LENGTHHandleCount is not valid or the number of handles is greater than 64.
ERROR_INVALID_HANDLEAn element of HandleArray is not a valid event tracing session handle.
ERROR_INVALID_TIMEEndTime is less than StartTime.
ERROR_INVALID_PARAMETERHandleArray is NULL.
ERROR_NOACCESSAn exception occurred in one of the callback functions that receives the events.
ERROR_CANCELLEDIndicates the consumer canceled processing by returning FALSE in their BufferCallback function.
ERROR_WMI_INSTANCE_NOT_FOUNDThe session from which you are trying to consume events in real time is not running or does not have the real-time trace mode enabled.
ERROR_WMI_ALREADY_ENABLEDThe HandleArray parameter contains the handle to more than one real-time session.

Remarks
Consumers call this function.
You must call the OpenTrace function prior to calling ProcessTrace.
The ProcessTrace function delivers the events to the consumer's BufferCallback, EventCallback , and EventClassCallback callback functions.
The ProcessTrace function sorts the events chronologically and delivers all events generated between StartTime and EndTime. Note that events can appear out of order if the session specifies system time as the clock (low resolution) and the volume of events is high. In this case, it is possible for multiple events to contain the same time stamp. If multiple events contain the same time stamp, ETW cannot guarantee the order of those events.
The ProcessTrace function blocks the thread until it delivers all events, the BufferCallback function returns FALSE, or you call CloseTrace . If the consumer is consuming events in real time, the ProcessTrace function returns after the controller stops the trace session. (Note that there may be a several-second delay before the function returns.)
Prior to Windows Vista: You can call CloseTrace only after ProcessTrace returns.
Examples
For an example that uses ProcessTrace, see Opening a Trace Session and Processing Events .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderEvntrace.h
LibraryAdvapi32.lib
DLLAdvapi32.dll
See Also
BufferCallback
EventCallback
EventClassCallback
OpenTrace
SetTraceCallback
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364093(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:21:36