UnregisterTraceGuids function (evntrace.h)

The UnregisterTraceGuids function unregisters a Classic (Windows 2000-style) ETW event trace provider that was registered using RegisterTraceGuids.

Syntax

ULONG WMIAPI UnregisterTraceGuids(
  [in] TRACEGUID_HANDLE RegistrationHandle
);

Parameters

[in] RegistrationHandle

Handle to the event trace provider, obtained from an earlier call to the RegisterTraceGuids function.

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 are some common errors and their causes.

  • ERROR_INVALID_PARAMETER

    The RegistrationHandle parameter does not specify the handle to a registered provider or is NULL.

Remarks

Providers call this function.

The event trace provider must have been registered previously by calling the RegisterTraceGuids function.

Important

All registration handles created by a DLL or driver must be unregistered before the DLL or driver unloads. If the provider is not unregistered, a crash will occur when ETW tries to invoke the provider's callback.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header evntrace.h
Library Advapi32.lib
DLL Advapi32.dll

See also

RegisterTraceGuids