Share via


CWTTLogger::TraceMsg method

The TraceMsg method logs a trace of the specified device at the user-defined trace level and a given priority.

Syntax

HRESULT TraceMsg(
  LONG hDevice,
  LPWSTR pwszUserDefinedLevel,
  DWORD dwPriority,
   ... 
);

Parameters

  • hDevice
    [in] A handle to the device tracing topology. You can combine multiple handles by using the bitwise OR operator (for example, hDevice1 OR hDevice2).

  • pwszUserDefinedLevel
    [in] A user-defined trace level.

  • dwPriority
    [in] The priority of the trace. This parameter should be one of the following values: WTT_TRACE_PRIORITY_HIGH_CLASSWTT_TRACE_PRIORITY_MEDIUM_CLASSWTT_TRACE_PRIORITY_LOW_CLASSWTT_TRACE_PRIORITY_RESERVED_CLASSWTT_TRACE_PRIORITY_USER_CLASS

  • ...
    [in] One or more optional arguments that depend on the user-defined trace level.

Return value

TraceMsg returns one of the following values:

Return code Description
S_OK

The operation was successful.

S_FALSE

The operation was successful but the last device has been detached, which has triggered a rollup.

HRESULT

The operation failed. You should use the FAILED macro to check HRESULT values.

 

Requirements

Header

Wttlogger.h

Library

WTTLog.dll

See also

CWTTLogger Class (C++)

CWTTLogger::Trace

CWTTLogger::TraceMsg

 

 

Build date: 9/14/2012