using System;
namespace Vanara.PInvoke
{
/// Common properties and methods for errors.
public interface IErrorProvider
{
/// Gets a value indicating whether this error represents a failure.
/// if failed; otherwise, .
bool Failed { get; }
/// Gets a value indicating whether this error represents a success.
/// if succeeded; otherwise, .
bool Succeeded { get; }
/// Gets an from this error.
/// An optional message to add to the exception.
/// A correlated for this error.
Exception GetException(string message = null);
/// Throws an equivalent Exception for this error if it is a failure.
/// An optional message to add to the exception.
void ThrowIfFailed(string message = null);
/// Converts this error to an .
/// An equivalent .
HRESULT ToHRESULT();
}
}