ERRO AO ABRIR CD-ROM PINVOKESTACKIMBALANCE WAS DET
Problema:
pinvokestackimbalance was detected
Public Class Form1
Private Declare Function mciSendString Lib [Ô]winmm.dll[Ô] Alias [Ô]mciSendStringA[Ô] (ByVal Command As String, ByVal ReturnString As String, ByVal ReturnLength As Long, ByVal hWnd As Long) As Long
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
mciSendString([Ô]set cdaudio door open[Ô], 0, 0, 0)
End Sub
Private Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
mciSendString([Ô]set cdaudio door closed[Ô], 0, 0, 0)
End Sub
End Class
Ao clicar no botão abre a gaveta do cd porem logo após dá o erro, pesquisei mas não consegui resolver. Help
pinvokestackimbalance was detected
Public Class Form1
Private Declare Function mciSendString Lib [Ô]winmm.dll[Ô] Alias [Ô]mciSendStringA[Ô] (ByVal Command As String, ByVal ReturnString As String, ByVal ReturnLength As Long, ByVal hWnd As Long) As Long
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
mciSendString([Ô]set cdaudio door open[Ô], 0, 0, 0)
End Sub
Private Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
mciSendString([Ô]set cdaudio door closed[Ô], 0, 0, 0)
End Sub
End Class
Ao clicar no botão abre a gaveta do cd porem logo após dá o erro, pesquisei mas não consegui resolver. Help
Olá , aqui vai um exemplo para vc testar
Nota : se concluiu feche o tópico
Imports System.Runtime.InteropServices
Imports System.Text
Public Class Form1
<DllImport([Ô]winmm.dll[Ô])> _
Public Shared Function mciSendString(ByVal command As String, ByVal buffer As StringBuilder, _
ByVal bufferSize As Int32, ByVal hwndCallback As IntPtr) As Int32
End Function
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
mciSendString([Ô]set CDAudio door open[Ô], Nothing, 127, IntPtr.Zero)
End Sub
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
mciSendString([Ô]set CDAudio door closed[Ô], Nothing, 127, IntPtr.Zero)
End Sub
End Class
Nota : se concluiu feche o tópico
Muito obrigado! Perfect =)
Tópico encerrado , respostas não são mais permitidas