网站首页  词典首页

请输入您要查询的函数:

 

术语 closetrace
释义 CloseTrace
语法:
C++
ULONG CloseTrace(
__in TRACEHANDLE TraceHandle
);
闭迹功能
在闭迹函数关闭一个跟踪。
参数
TraceHandle [in]
句柄跟踪关闭。该OpenTrace函数返回此句柄。
返回值
如果函数成功,返回值是ERROR_SUCCESS。
如果函数失败,返回值是系统错误代码之一。下表列出了一些常见的错误及其原因。
返回codeDescription
以下ERROR_INVALID_HANDLEOne是正确的:
TraceHandle为NULL。
TraceHandle是INVALID_HANDLE_VALUE。
ERROR_BUSYPrior到Windows Vista,您不能关闭跟踪功能,直到ProcessTrace完成。
ERROR_CTX_CLOSE_PENDINGThe调用成功。该ProcessTrace功能将停止后,它已处理所有实时在其缓冲区时间事件(它不会接受任何新的事件)。
备注
消费者调用这个函数。
如果您正在处理从一个日志文件的事件,您调用后才ProcessTrace函数返回此功能。但是,如果您正在处理的实时事件,您可以调用返回此之前ProcessTrace功能。如果调用返回此之前ProcessTrace功能,闭迹函数返回ERROR_CTX_CLOSE_PENDING。在ERROR_CTX_CLOSE_PENDING代码表示闭迹函数调用成功,该ProcessTrace函数将停止处理事件的过程后,在其缓冲区所有事件(ProcessTrace将不会收到任何新的事件后,调用闭迹函数)。您可以调用函数的闭迹从BufferCallback,EventCallback,或EventClassCallback回调。
在此之前的Windows Vista:您可以调用返回后,才ProcessTrace闭迹。
实例
举一个例子,它使用闭迹,请打开一个跟踪会话和处理事件。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderEvntrace.h
LibraryAdvapi32.lib
DLLAdvapi32.dll
参见
OpenTrace
ProcessTrace
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==CloseTrace Function
The CloseTrace function closes a trace.
Syntax
C++
ULONG CloseTrace(
__in TRACEHANDLE TraceHandle
);
Parameters
TraceHandle [in]
Handle to the trace to close. The OpenTrace function returns this handle.
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_HANDLEOne of the following is true:
TraceHandle is NULL.
TraceHandle is INVALID_HANDLE_VALUE.
ERROR_BUSYPrior to Windows Vista, you cannot close the trace until the ProcessTrace function completes.
ERROR_CTX_CLOSE_PENDINGThe call was successful. The ProcessTrace function will stop after it has processed all real-time events in its buffers (it will not receive any new events).

Remarks
Consumers call this function.
If you are processing events from a log file, you call this function only after the ProcessTrace function returns. However, if you are processing real-time events, you can call this function before ProcessTrace returns. If you call this function before ProcessTrace returns, the CloseTrace function returns ERROR_CTX_CLOSE_PENDING. The ERROR_CTX_CLOSE_PENDING code indicates that the CloseTrace function call was successful; the ProcessTrace function will stop processing events after it processes all events in its buffers (ProcessTrace will not receive any new events after you call the CloseTrace function). You can call the CloseTrace function from your BufferCallback , EventCallback , or EventClassCallback callback.
Prior to Windows Vista: You can call CloseTrace only after ProcessTrace returns.
Examples
For an example that uses CloseTrace, 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
OpenTrace
ProcessTrace
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa363686(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:30:22