TraceLoggingRegister function

Registers a TraceLogging provider so that it can be used for to log events.

Syntax

TLG_STATUS TraceLoggingRegister(
  TraceLoggingHProvider hProvider
);

Parameters

hProvider

The handle of the provider to register.

Return Value

If you call this function from user mode code, the function returns a HRESULT. Use the SUCCEEDED() macro to determine if the function succeeds.

If you call this function from kernel mode code, the function returns a NTSTATUS. Use the NT_SUCCESS() macro to determine if the function succeeds.

Remarks

Call this function to register your provider. You need to register before you can use it. If you attempt to register a provider that is already registered, the results are unpredictable. You can unregister a handler and then register it again if necessary. If registration does fail, all write and unregister commands will have no effect.

Use the SUCCEEDED macro to see if registration was successful.

Requirements

   
Header traceloggingprovider.h