Results 1 to 1 of 1

Thread: waveInGetErrorText problem.

  1. #1

    Thread Starter
    PowerPoster VBDT's Avatar
    Join Date
    Sep 2005
    Location
    CA - USA
    Posts
    2,922

    waveInGetErrorText problem.

    Hi all, I am having problem with the “waveInGetErrorText” and I want to solve it once and for all. The problem is that it doesn’t get the error message when Me._rc = 32 wich is WAVERR_BADFORMAT message. The function returns 0 indicating success? Can anyone take a look on this and tell what I am doing wrong. Here is my code:

    This is the declaration
    vb Code:
    1. <DllImport("winmm.dll", EntryPoint:="waveInGetErrorTextA")> _
    2.     Public Shared Function waveInGetErrorText( _
    3.     ByVal mmrError As Integer, ByVal pszText As String, _
    4.     ByVal cchText As Integer) As Integer
    5.     End Function
    and this is how I use it

    vb Code:
    1. Me._rc = WINMM.waveInOpen(Me._hWaveIn, Me._deviceID, waveFormat, New ProcDelegate(AddressOf waveInProc), 0, WINMM.CALLBACK_FUNCTION)
    2.         If Me._rc <> WINMM.MMSYSERR_NOERROR Then
    3.             Dim message As String = Space(200)
    4.             Dim t As Integer = WINMM.waveInGetErrorText(Me._rc, message, message.Length)
    5.             Throw New Exception(message)
    6.             Return False
    7.         End If
    Thanks in advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width