Call a function in Game.dll

This is a discussion on Call a function in Game.dll within the Warcraft 3 Hacks, bots and tools board part of the Warcraft 3 forum category; Hi , I want to call a function in game.dll with c++ Here is the function I tried lots of ...

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Sosha's Avatar
    Sosha is offline :)



    Array
    Join Date
    Oct 2011
    Location
    Iran
    Posts
    517
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    12
    Reputation
    1008

    Call a function in Game.dll

    Hi , I want to call a function in game.dll with c++
    Here is the function



    I tried lots of ways but I got a fatal error
    Any help would be great
    Note : This is Open/Close Scoreboard Function


  2. #2
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    Link is broken.
    http://faridaghili.ir

  3. #3
    Tracky's Avatar
    Tracky is offline Administrator

    Array
    Join Date
    Dec 2007
    Location
    Germany
    Posts
    9,854
    Mentioned
    158 Post(s)
    Tagged
    2 Thread(s)
    Rep Power
    42
    Reputation
    5606
    Quote Originally Posted by GoDLiKe.ON3 View Post
    Link is broken.
    Which link ? There is no link.

  4. #4
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    I mean the image in his post.

    here it is:
    http://rayanstudio.ir/function.JPG
    http://faridaghili.ir

  5. #5
    MountainDew's Avatar
    MountainDew is offline Mentor
    Array
    Join Date
    Feb 2012
    Posts
    138
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    154
    Can't you do that by calling the JASS natives for minimizing/maximizing the multiboard?

  6. #6
    rambo24 is offline Newbie
    Array
    Join Date
    Jan 2010
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    2
    In the future show us how you "tried lots of ways" so we can see whatsup on your end!

    The first thing you should do is observe how the parameters are being passed to this function (pay attention to the stack and registers), and determine what calling convention is being used.

    Argument Passing and Naming Conventions

    Then, here is one way to accomplish this:
    Code:
    typedef void (__conventionhere * myfunction)(int parametersGoHere);
    myfunction pFunction = (myfunction)0x6F0057F0;
    Of course, the address above should be adjusted to your Game.dll base.
    You may have to take into account TLS and be weary of any class pointers being passed (_thiscall / _fastcall).



    Alternatively, you can use the inline __asm {} and take care of your own dirty work (if necessary).

    For now I'll leave this as an exercise for you to fill in the blanks.
    Last edited by rambo24; 04-07-2012 at 07:51 AM.

  7. The Following 2 Users Say Thank You to rambo24 For This Useful Post:


  8. #7
    Lakshay's Avatar
    Lakshay is offline Wannabe Member
    Array
    Join Date
    Apr 2012
    Location
    India
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    6
    Reputation
    2
    Quote Originally Posted by rambo24 View Post
    In the future show us how you "tried lots of ways" so we can see whatsup on your end!

    The first thing you should do is observe how the parameters are being passed to this function (pay attention to the stack and registers), and determine what calling convention is being used.

    Argument Passing and Naming Conventions

    Then, here is one way to accomplish this:
    Code:
    typedef void (__conventionhere * myfunction)(int parametersGoHere);
    myfunction pFunction = (myfunction)0x6F0057F0;
    Of course, the address above should be adjusted to your Game.dll base.
    You may have to take into account TLS and be weary of any class pointers being passed (_thiscall / _fastcall).



    Alternatively, you can use the inline __asm {} and take care of your own dirty work (if necessary).

    For now I'll leave this as an exercise for you to fill in the blanks.
    This is the perfect answer.

  9. #8
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    So what to do now?
    You gave us this:
    typedef void (__conventionhere * myfunction)(int parametersGoHere);
    myfunction pFunction = (myfunction)0x6F0057F0;

    I tried like this:
    typedef void (__cdecl * myfunction)(int parametersGoHere);
    myfunction pFunction = (myfunction)GameDll + 0x0057F0;
    But without any success, any further tips?
    http://faridaghili.ir

  10. #9
    open|Fire is offline Addict
    Array
    Join Date
    Feb 2010
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    28
    Quote Originally Posted by GoDLiKe.ON3 View Post
    So what to do now?
    You gave us this:



    I tried like this:


    But without any success, any further tips?
    __thiscall

  11. #10
    Farid.Agl's Avatar
    Farid.Agl is offline Advanced Hacker

    Array
    Join Date
    Sep 2011
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Rep Power
    8
    Reputation
    322
    Thanks.
    Tested with __thiscall, no sucess.
    http://faridaghili.ir

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 12-07-2011, 10:40 AM
  2. Replies: 0
    Last Post: 12-03-2011, 03:24 AM
  3. [Help]Make a program to enable "Save game" function
    By cucucu123 in forum Warcraft 3 forum
    Replies: 3
    Last Post: 03-15-2010, 05:10 PM
  4. Steal WoW game cards via a phone call
    By Kidades in forum WoW Bots, hacks and exploits
    Replies: 1
    Last Post: 07-31-2009, 03:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •