Share via


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
程式庫 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