Share via


WTTLogCheckResult function

The WTTLogCheckResult function checks a specified result and logs an error if the result shows a failure.

Syntax

HRESULT WTTLogCheckResult(
  LONG hDevice,
  DWORD dwResultToCheck,
  DWORD dwResultType,
  LPWSTR pwszFile,
  ULONG ulLine,
  LPWSTR pwszErrMsg
);

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).

  • dwResultToCheck
    [in] The result to check.

  • dwResultType
    [in] The type of the result. This parameter can be one of the following values: WTT_ERROR_TYPE_HRESULTWTT_ERROR_TYPE_NTSTATUSWTT_ERROR_TYPE_WIN32WTT_ERROR_TYPE_BOOL

  • pwszFile
    [in] The name of the source file where the assert happened.

  • ulLine
    [in] The line number within the source file where the assert happened.

  • pwszErrMsg
    [in] The text of the error message.

Return value

WTTLogCheckResult 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

WTTLog Functions (C)

WTTLogCheckResultEx

 

 

Build date: 9/14/2012