public static midiInGetErrorText ( MMRESULT mmrError, StringBuilder lpText ) : MMRESULT | ||
mmrError | MMRESULT | |
lpText | StringBuilder | |
return | MMRESULT |
/// <summary> /// Makes sure rc is MidiWin32Wrapper.MMSYSERR_NOERROR. If not, throws an exception with an /// appropriate error message. /// </summary> /// <param name="rc"></param> private static void CheckReturnCode(Win32API.MMRESULT rc) { if (rc != Win32API.MMRESULT.MMSYSERR_NOERROR) { StringBuilder errorMsg = new StringBuilder(128); rc = Win32API.midiInGetErrorText(rc, errorMsg); if (rc != Win32API.MMRESULT.MMSYSERR_NOERROR) { throw new DeviceException("no error details"); } throw new DeviceException(errorMsg.ToString()); } }