Recording Keys
Kinda like a key logger but not the purpose something more legal. I am making a mw2 rage quit program. In the program You have to bind a button to rage quit. So obviously I first tried a key-logger source.
Don't hate me. But then I get a MDA error
How do I correct this program.
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Declare Function GetKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
For i = 1 To 255
result = 0
result = GetAsyncKeyState(i)
If result = -32767 Then
TextBox1.Text = Chr(i)
End If
Next i
End Sub
Code:
PInvokeStackImbalance was detected Message: A call to PInvoke function 'recording keys!recording_keys.Form1::GetAsyncKeyState' 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.
