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
and this is how I use itvb Code:
<DllImport("winmm.dll", EntryPoint:="waveInGetErrorTextA")> _ Public Shared Function waveInGetErrorText( _ ByVal mmrError As Integer, ByVal pszText As String, _ ByVal cchText As Integer) As Integer End Function
Thanks in advance.vb Code:
Me._rc = WINMM.waveInOpen(Me._hWaveIn, Me._deviceID, waveFormat, New ProcDelegate(AddressOf waveInProc), 0, WINMM.CALLBACK_FUNCTION) If Me._rc <> WINMM.MMSYSERR_NOERROR Then Dim message As String = Space(200) Dim t As Integer = WINMM.waveInGetErrorText(Me._rc, message, message.Length) Throw New Exception(message) Return False End If


Reply With Quote