SolvedHotkey problem!

Posts 14 of 4 · Page 1 of 1
Hotkey problem!
Hi I have a problem with hotkeys to work, so if some of you know how to do this please reply
The problem is that whenever I debug the trainer it says:
PInvokeStackImbalance was detected
Message: A call to PInvoke function 'Mw3 StatRank hack!WindowsApplication1.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.
And also it marks this:
hotkey1 = GetAsyncKeyState(Keys.A)
with a green Background color
Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Dim hotkey1 As Boolean
        hotkey1 = GetAsyncKeyState(Keys.NumPad1)
        If hotkey1 = True Then
            MW3.Process_Handle("iw5sp")
            MW3.WriteInteger(&H1381124, 9999999)
            MW3.WriteInteger(&H13810A8, 9999999)
            MW3.WriteInteger(&H13810A0, 9999999)
            MW3.WriteInteger(&H1381118, 9999999)
        End If
    End Sub
/Moved

Also, let us see your PInvoke of the GetAsyncKetState. That's where the problem is.

This is how it should look like:
Code:
<DllImport("user32.dll")> _
    Public Shared Function GetAsyncKeyState(ByVal vKey As System.Windows.Forms.Keys) As Boolean
    End Function
http://www.pinvoke.net/default.aspx/...tasynckeystate
Solved in Skype/PM
/Solved & Closed
Posts 14 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?