IWTTLog::AddErrorToErrorList

The AddErrorToErrorList method adds the specified error type and error code to the given list of known errors.

HRESULT AddErrorToErrorList (
  DWORD  dwErrorToAdd,
  WTTLOGGER_ERROR_TYPE  dwErrorType,
  WTTLOGGER_ERROR_LIST  dwErrorList 
);

Parameters

dwErrorToAdd

[in] The error code to add.

dwErrorType

dwErrorList

Return Value

AddErrorToErrorList returns one of the following values:

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

Comments

DTM Logger uses the error lists to enable a test to pass even though the return value from a test function is an error. The CheckResult method compares the error type and error code that is passed to it with the know errors on the list. If the error is on the list, CheckResult returns S_OK, indicating the test passed. If the error is not on the list, the test fails.

Requirements

IDL: Log.IDL

Library: WTTLogCM.dll

See Also

IWTTLog Interface (COM), IWTTLog::RemoveErrorFromErrorList, IWTTLog::ClearErrorList

Send feedback on this topic
Built on December 10, 2009