waveoutgeterrortext (winmm)
Last changed: todd.lindberg@gmain.com-70.190.237.178

.
Summary
The waveOutGetErrorText function retrieves a textual description of the error identified by the given error number.

C# Signature:

      private const int MAXERRORLENGTH = 256;

      /// <summary>
      /// This function gets a string describing the error returned from one of the wave functions.
      /// </summary>
      /// <param name="mmrError">The error code</param>
      /// <param name="pszText">String returning the text description</param>
      /// <param name="cchText">The size of the string</param>
      /// <returns>NOERROR success, otherwise fail.</returns>
      [DllImport ("winmm.dll", EntryPoint="waveOutGetErrorText", SetLastError=true, CharSet=CharSet.Auto)]
      private static extern uint waveOutGetErrorText(uint mmrError, StringBuilder pszText, uint cchText);

      /// <summary>
      /// This function gets a string describing the error returned from one of the wave functions.
      /// </summary>
      /// <param name="mmrError">The error code</param>
      /// <returns>The description</returns>
      public static string waveOutGetErrorText(int mmrError)
      {
        StringBuilder message = new StringBuilder(MAXERRORLENGTH);
        uint errorResult = waveOutGetErrorText(mmrError, message, (uint)message.Capacity);
        if (errorResult == 0)
        {    
          return message.ToString();
        }
        else
        {
          return "waveOutGetErrorText failed.";
        }
      }

VB Signature:

Declare Function waveOutGetErrorText Lib "winmm.dll" (TODO) As TODO

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation