Platform SDK: RAS/Routing and RAS

Configuration

In order to enable console tracing, the value EnableConsoleTracing must exist under the the registry key

    HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\TRACING

and be nonzero. If this value does not exist, or is zero, console tracing is disabled. This value is read when Rtutils.dll is loaded; changes to this value after Rtutils.dll is already loaded will have no effect until the DLL is unloaded and loaded again.

In addition to the preceding "global" value, the registry may also contain values for individual clients. When a client "xyz" calls TraceRegister, tracing searches under the registry key

    HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\TRACING\XYZ

for the following values:

The defaults are used only if the key is found (or can be created) but some values are absent from the key. If the registry key is not found and cannot be created, the call to TraceRegister fails.

Alternatively, a client "xyz" could call TraceRegisterEx, which takes a flag allowing the caller to specify the settings to use. Thus, a client could use tracing without creating any key in the registry. For instance,

    TraceRegisterEx("xyz", TRACE_USE_CONSOLE);

would register the client "xyz" to use the console for tracing, and the tracing API would not attempt to read the registry key for the client. Similarly,

    TraceRegisterEx("abc", TRACE_USE_FILE);

would register the client "abc" to use a file for tracing, bypassing the registry key for the client. However, for console tracing, using TraceRegisterEx still requires that the global EnableConsoleTracing value exist under

    HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\TRACING

and be nonzero.