Injection, Hooking and the Bottleneck menu

User Tag List

Results 1 to 5 of 5
  1. #1
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Injection, Hooking and the Bottleneck

    Hey,
    a thing i noticed recently in my bot is that the hook seems to be a bottleneck
    i'm hooking a method that is called very often(even more often when the game is minimized O.o), but still it could be faster to execute code and get return values

    so am i the only one experiencing this or are there others that notice this too?
    and my question would be what i could do against it?
    currently i'm just executing each method one after each other like
    IsSpellReady() => injected code runs => i get the return value,compare it => CastSpell() => injected code runs => return value(not needed in this case but you get the point)

    my first idea was to create a queue for all the method-requests,and to run a thread for executing all those methods at once like every 10ms.
    the problem in doing this would be that i'd have to run all my requests in new threads too,not? otherwise this won't give me more performance then my current method.


    as always thanks for your help
    streppel

    Injection, Hooking and the Bottleneck
  2. #2
    miceiken's Avatar Contributor Authenticator enabled
    Reputation
    209
    Join Date
    Dec 2007
    Posts
    401
    Thanks G/R
    7/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just run ALL my bot logic in EndScene, and it's certainly not a bottleneck for me!

  3. #3
    namreeb's Avatar Legendary

    Reputation
    668
    Join Date
    Sep 2008
    Posts
    1,029
    Thanks G/R
    8/222
    Trade Feedback
    0 (0%)
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    What method are you hooking? Is it more frequent than EndScene? I would assume your logic does not need to tick that frequently. Hell, I have before even set my logic to trigger on every n-th tick of EndScene.

  4. #4
    streppel's Avatar Active Member
    Reputation
    78
    Join Date
    Mar 2007
    Posts
    196
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm not in a wow-context and don't have endscene,so i hooked a different method that got called more often AND(the only reason why not to chose a render method) it gets called even if the game is minimized
    i think i found my BIIIG problem. i was too lazy to analyze the structures used by the game until now,this way it worked ofc, but i always had to tell the game to make a class out of the struct etc etc. now i began analyzing the structure and the object iteration are sooo much faster now(as it is just based on executing a single method and reading memory,before it was executing a method for every attribute)
    lots of potential to increase performance there i guess

    my hook is written in pure assembler,so it doesn't cost that much performance to have the hook running at all, and as i saw before,hooking,executing and unhooking is no good...

  5. #5
    Master674's Avatar Elite User
    Reputation
    487
    Join Date
    May 2008
    Posts
    578
    Thanks G/R
    2/23
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by namreeb View Post
    What method are you hooking? Is it more frequent than EndScene? I would assume your logic does not need to tick that frequently. Hell, I have before even set my logic to trigger on every n-th tick of EndScene.
    EventSetTimer( callbacktime, functionptr, unk ) will do the job for you. Your function will need to register itself again on every call.

    Your function must be a __cdecl function with no parameters.

Similar Threads

  1. Need help hooking and injecting...
    By larcerkev in forum Programming
    Replies: 5
    Last Post: 03-27-2014, 01:50 PM
  2. Replies: 11
    Last Post: 12-23-2010, 09:30 PM
  3. What is a good bot and the chances?
    By joeeb22 in forum World of Warcraft General
    Replies: 3
    Last Post: 12-07-2006, 12:05 PM
  4. Replies: 9
    Last Post: 10-02-2006, 09:21 PM
All times are GMT -5. The time now is 01:04 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search