C# Class NewTOAPIA.DirectShow.DsError

Show file Open project: Wiladams/NewTOAPIA

Public Methods

Method Description
GetErrorText ( int hr ) : string

Returns a string describing a DS error. Works for both error codes (values < 0) and Status codes (values >= 0)

ThrowExceptionForHR ( int hr ) : void

If hr has a "failed" status code (E_*), throw an exception. Note that status messages (S_*) are not considered failure codes. If DirectShow error text is available, it is used to build the exception, otherwise a generic com error is thrown.

Private Methods

Method Description
AMGetErrorText ( int hr, StringBuilder buf, int max ) : int
DsError ( ) : System

Method Details

GetErrorText() public static method

Returns a string describing a DS error. Works for both error codes (values < 0) and Status codes (values >= 0)
public static GetErrorText ( int hr ) : string
hr int HRESULT for which to get description
return string

ThrowExceptionForHR() public static method

If hr has a "failed" status code (E_*), throw an exception. Note that status messages (S_*) are not considered failure codes. If DirectShow error text is available, it is used to build the exception, otherwise a generic com error is thrown.
public static ThrowExceptionForHR ( int hr ) : void
hr int The HRESULT to check
return void