removeTraceCallback 函数 (evntrace.h)

重要

请勿使用此函数。 它在后续版本中可能不可用。

RemoveTraceCallback 函数停止 EventCallback 函数接收事件跟踪类的事件。

语法

ULONG WMIAPI RemoveTraceCallback(
  [in] LPCGUID pGuid
);

参数

[in] pGuid

指向回调接收事件的事件跟踪类的类 GUID 的指针。 使用传递给 SetTraceCallback 的同一类 GUID 开始接收事件。

返回值

如果函数成功,则返回值为 ERROR_SUCCESS。

如果函数失败,则返回值为 系统错误代码之一。 下面是一些常见错误及其原因。

  • ERROR_INVALID_PARAMETER

    pGuid 参数为 NULL

  • ERROR_WMI_GUID_NOT_FOUND

    没有与事件跟踪类关联的 EventCallback 函数。

注解

使用者调用此函数。

要求

要求
最低受支持的客户端 Windows 2000 Professional [仅限桌面应用]
最低受支持的服务器 Windows 2000 Server [仅限桌面应用]
目标平台 Windows
标头 evntrace.h
Library Windows 8.1 和 Windows Server 2012 R2 上的 Sechost.lib;Windows 8、Windows Server 2012、Windows 7、Windows Server 2008 R2、Windows Server 2008、Windows Vista 和 Windows XP 上的 Advapi32.lib
DLL Windows 8.1 和 Windows Server 2012 R2 上的 Sechost.dll;Windows 8、Windows Server 2012、Windows 7、Windows Server 2008 R2、Windows Server 2008、Windows Vista 和 Windows XP 上的 Advapi32.dll

另请参阅

EventCallback

ProcessTrace

SetTraceCallback