Adblock breaks this site

Green error ? double you tee eff ?

Discussion in 'Programming General' started by darthvador91, Nov 7, 2007.

  1. darthvador91

    darthvador91 Forum Addict
    Banned

    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    Green error ? double you tee eff ?

    Ok , when i try to run my autoclicker in the source debugger i get this error

    A call to PInvoke function 'WindowsApplication1!WindowsApplication1.Form1::mouse_event' 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.

    here is the line of code that is highlighted green

    Code:
    mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
    now, when i run it in the .exe in the bin i works fien , but i would really like to correct this


    any infio PLEASE???
     
  2. laxattack5

    laxattack5 Active Member
    Banned

    Joined:
    Apr 6, 2007
    Posts:
    239
    Referrals:
    0
    Sythe Gold:
    0
    Green error ? double you tee eff ?

    hey lol u stole double u tee eff from my post =P well anyway im pretty sure cuz of the 0, 0, 0, 0
     
  3. darthvador91

    darthvador91 Forum Addict
    Banned

    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    Green error ? double you tee eff ?

    i guess it doesnt rly matter , it works fine in .exe :)
     
  4. skate4lifee

    skate4lifee Active Member

    Joined:
    Jul 22, 2007
    Posts:
    108
    Referrals:
    1
    Sythe Gold:
    0
    Green error ? double you tee eff ?

    i told you after i posted the code that it works fine if you ran the Binary.
     
  5. darthvador91

    darthvador91 Forum Addict
    Banned

    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    Green error ? double you tee eff ?

    yeh i know , but im just curious why it doesnt work in debugging mode
     
  6. Flaming Idiots

    Flaming Idiots Active Member
    Visual Basic Programmers

    Joined:
    Dec 22, 2005
    Posts:
    235
    Referrals:
    1
    Sythe Gold:
    0
    Two Factor Authentication User
    Green error ? double you tee eff ?

    The reason is that you are probably using the Visual Basic 6 call for it. When converting native methods from VB6 to .NET, you need to change the number types from Long to Integer.

    VB6 way:
    Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)

    VB.NET way:
    Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
     
  7. darthvador91

    darthvador91 Forum Addict
    Banned

    Joined:
    Sep 15, 2007
    Posts:
    536
    Referrals:
    0
    Sythe Gold:
    0
    Green error ? double you tee eff ?

    WOW your smart

    It works!

    Thank you so much EVERYONE who has helped me with this :)
     
< basic sendkeys function | Can anyone overlook my C++ program and correct me please? (VERY NOOB!!) >


 
 
Adblock breaks this site