Делаю чтобы по нажатию кнопки воспроизводился midi файл Code: Public Class Form1 Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long Private Declare Function midiOutGetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, ByVal lpdwVolume As Long) As Long Private Declare Function midiOutSetVolume Lib "winmm.dll" (ByVal uDeviceID As Long, ByVal dwVolume As Long) As Long Dim s As Long, RS As String, cb As Long, R Private Sub Command1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Command1.Click RS = Space$(128) 'Здесь указываем путь к файлу, который следует воспроизвести R = ("c:\mm.mid") 'Даем команду открыть файл s = mciSendString("open sequencer!" & R & " alias midi", RS, 128, cb) 'Здесь даем команду проигрывать midi файл s = mciSendString("play midi", RS, 128, cb) End Sub End Class Выдает ошибку Code: A call to PInvoke function 'midiplay!midiplay.Form1::mciSendString' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.