Thread: Hotkey problem!

Results 1 to 4 of 4
  1. #1
    NitroSmily's Avatar
    Join Date
    May 2012
    Gender
    male
    Posts
    99
    Reputation
    10
    Thanks
    1,055
    My Mood
    Tired

    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
    Last edited by MarkHC; 09-28-2012 at 12:23 PM.

  2. #2
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,751
    Reputation
    66
    Thanks
    14,306
    My Mood
    Angelic
    /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


    CoD Minion from 09/19/2012 to 01/10/2013

  3. #3
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,674
    Reputation
    905
    Thanks
    18,537
    My Mood
    Angelic
    Solved in Skype/PM

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  4. #4
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,751
    Reputation
    66
    Thanks
    14,306
    My Mood
    Angelic
    /Solved & Closed


    CoD Minion from 09/19/2012 to 01/10/2013

Similar Threads

  1. [Help] VB.NET Hotkey problem
    By ninjastormns in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 4
    Last Post: 07-30-2012, 07:47 PM
  2. Hotkeys on VB6 Problem
    By ........ in forum Visual Basic Programming
    Replies: 9
    Last Post: 09-25-2007, 03:46 PM
  3. Hotkeys in C++
    By Dave84311 in forum C++/C Programming
    Replies: 7
    Last Post: 09-07-2007, 08:13 AM
  4. WPE problem...
    By styx23 in forum General Game Hacking
    Replies: 8
    Last Post: 01-18-2006, 08:51 PM
  5. Problem Wit Hacking Programs
    By f5awp in forum General Gaming
    Replies: 5
    Last Post: 01-10-2006, 06:44 AM