[Help] PlayerAdress menu

Shout-Out

User Tag List

Page 3 of 6 FirstFirst 123456 LastLast
Results 31 to 45 of 83
  1. #31
    dante020's Avatar Member
    Reputation
    1
    Join Date
    May 2007
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by unbekannt1 View Post
    amadmonk thank you for your detailed answer, but what is with Glider. Glider didnt inject code it was just a memory reader, too. There i never had this problem that i had to start the program many times until it gets the right hwnd.
    Just because a ReadProcessMemory fails doesn't mean that your program should crash. If you properly handle the failed read, you should attempt to re-read the same memory at some later time until it is successful. There are many different ways of handling failed reads but that is up to you.

    As stated above, never assume that it WILL work and check values after every step. In the case that something does fail, have code to deal with it.

    [Help] PlayerAdress
  2. #32
    unbekannt1's Avatar Member
    Reputation
    -6
    Join Date
    Apr 2009
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My Problem is not that ReadProcessMemory isnt working...its that i sometimes get the wrong hwnd. But i have no clue how to check if the hwnd is valid or not, because it is not NULL or empty or like that, it just contains a wrong value...

  3. #33
    kakamunsug's Avatar Member
    Reputation
    -2
    Join Date
    Dec 2008
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by unbekannt1 View Post
    My Problem is not that ReadProcessMemory isnt working...its that i sometimes get the wrong hwnd. But i have no clue how to check if the hwnd is valid or not, because it is not NULL or empty or like that, it just contains a wrong value...
    How are you catching the handle?
    Does it work sometimes?
    Is something in your source overwriting the handle?
    Do you run the segment of code that tries to find the handle more than once, thus overwriting with possible faulty result?

    ...etc.
    Please give yourself a good thinker, programming is never "mysteriously" wrong, it's always logical.
    I've had problems that makes no sense, and then you go away - come back and there you have the solution.

  4. #34
    unbekannt1's Avatar Member
    Reputation
    -6
    Join Date
    Apr 2009
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code to get handle :
    Code:
    hwnd = FindWindow(NULL, TEXT("World of Warcraft"));
    I just get the handle at the beginning of the programm one time. Sometimes it has the right value, sometimes not.

  5. #35
    amadmonk's Avatar Active Member
    Reputation
    124
    Join Date
    Apr 2008
    Posts
    772
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by unbekannt1 View Post
    amadmonk thank you for your detailed answer, but what is with Glider. Glider didnt inject code it was just a memory reader, too. There i never had this problem that i had to start the program many times until it gets the right hwnd.
    dante020 nailed it in one: Glider was (IIRC) very well written code, and I assume that it had "sane" failsafes for when data got tromped on mid-read. You can recover from it, if you're careful.

    Also, you might want to skip the window handle read (unless you need it for some other purpose). For my memory reads I just directly get the process from a process list enumeration (since I'm too lazy to write C++ for out-of-process code, I just use C# or IronPython to do the enumeration for me with Process.GetProcesses()). You don't need the extra layer of abstraction that using hwnd's adds, unless you're using it for something else (windows message hooking or something like that).

  6. #36
    kakamunsug's Avatar Member
    Reputation
    -2
    Join Date
    Dec 2008
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by unbekannt1 View Post
    Code to get handle :
    Code:
    hwnd = FindWindow(NULL, TEXT("World of Warcraft"));
    I just get the handle at the beginning of the programm one time. Sometimes it has the right value, sometimes not.
    I forgot which language you were using, but can't you just return your windowhandle from your process? It seems like you're not catching the right window sometimes, perhaps by having another window (maybe the wow folder?) up with the same title, idk.

    I'll give you my code for this because people has helped me out here (exception of Cypher being a total ****off "de-repping" me for whatever ****ed up reason he had there.)
    Code:
    Process[] processes;
    processes = Process.GetProcessesByName(pName);
    
    WindowHandle = processes[0].MainWindowHandle;
    You could make this into an array which holds numerous amounts of wow.exe's and put up several bots in a serie.
    pName being the process' NAME.

    Example of writing a function for this (make use for the process ID/handle as well in this since you can do it all with System.Process;
    Code:
    public int returnHandle(string pName) {
    Process[] processes;
    processes = Process.GetProcessesByName(pName);
    
    return processes[0].MainWindowHandle;
    }
    enjoy.

  7. #37
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by kakamunsug View Post
    <snip>

    I'll give you my code for this because people has helped me out here (exception of Cypher being a total ****off "de-repping" me for whatever ****ed up reason he had there.)

    <snip>
    Rofl, I know. Cypher's such an ass! He NEVER helps out!

    Also, since he's programming in unmanaged C++, this will hardly help him.

    CodeProject: API Hooking with MS Detours. Free source code and programming help has a nice example of a process enumeration.

  8. #38
    unbekannt1's Avatar Member
    Reputation
    -6
    Join Date
    Apr 2009
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok your codes are working well for getting the process id, but i need the window handle for sending keys to wow.

  9. #39
    apollo0510's Avatar Active Member
    Reputation
    18
    Join Date
    Aug 2008
    Posts
    53
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by unbekannt1 View Post
    Ok your codes are working well for getting the process id, but i need the window handle for sending keys to wow.
    unbekannt1,

    I have some trouble to understand whats going on in your mind, but on the other side its somehow funny.

    You posted the code:

    hwnd = FindWindow(NULL, TEXT("World of Warcraft"));

    And then you are asking for the handle to the wow window ?


    Hrhr.

  10. #40
    unbekannt1's Avatar Member
    Reputation
    -6
    Join Date
    Apr 2009
    Posts
    54
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    hwnd = FindWindow(NULL, TEXT("World of Warcraft"));
    is just working sometimes. And because i got the process handle out of the hwnd i hat sometimes the problem with reading memory. And now i am searching for an alternative of FindWindow. I know how to get process handle without window handle, but i need the hwnd to send keys to wow.

  11. #41
    kakamunsug's Avatar Member
    Reputation
    -2
    Join Date
    Dec 2008
    Posts
    20
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by unbekannt1 View Post
    Code:
    hwnd = FindWindow(NULL, TEXT("World of Warcraft"));
    is just working sometimes. And because i got the process handle out of the hwnd i hat sometimes the problem with reading memory. And now i am searching for an alternative of FindWindow. I know how to get process handle without window handle, but i need the hwnd to send keys to wow.
    Code:
    WindowHandle = processes[0].MainWindowHandle;
    This gives you the windowhandle. You have no use for FindWindow() API when C# already has a managed code function for that. Just draw it out of the process ID (which was in the example I gave to you).

    To put it in your "hwnd" variable (I'm not sure you know the language enough to understand that, or you're not understanding what the code does) you do this:
    Code:
    int hWnd = 0;
    hWnd = processes[0].MainWindowHandle;
    MessageBox.Show(hWnd.ToString(), "WindowHandle");
    :wave::wave::wave::wave:

  12. #42
    opulent's Avatar Member
    Reputation
    5
    Join Date
    Apr 2009
    Posts
    29
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to reiterate...

    Originally Posted by SKU View Post
    Also, since he's programming in unmanaged C++, this will hardly help him.
    Managed C# might not yield the solution here.

  13. #43
    SKU's Avatar Contributor
    Reputation
    306
    Join Date
    May 2007
    Posts
    565
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by opulent View Post
    Just to reiterate...

    Managed C# might not yield the solution here.
    Hehe, yeah. Well, I give up, well played kakamunsug. No way I'm going down on that level.

  14. #44
    Zombie911's Avatar Member
    Reputation
    11
    Join Date
    Mar 2008
    Posts
    31
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by unbekannt1 View Post
    Code:
    hwnd = FindWindow(NULL, TEXT("World of Warcraft"));
    is just working sometimes. And because i got the process handle out of the hwnd i hat sometimes the problem with reading memory. And now i am searching for an alternative of FindWindow. I know how to get process handle without window handle, but i need the hwnd to send keys to wow.
    Alternative of FindWindow
    Code:
    DWORD wowpid = ...
    HWND hWnd = GetTopWindow(NULL);
    HANDLE WindowHandle = NULL;
    while(hWnd)
    {
        DWORD pid;
        DWORD dwTheardId = GetWindowThreadProcessId(hWnd, &pid);
        if(pid == wowpid) ///<-- WoW PID here
        {
            WindowHandle = hWnd;
            break;
        }
        Sleep(1);
        hWnd = ::GetNextWindow(hWnd, GW_HWNDNEXT);
    }

  15. #45
    Shynd's Avatar Contributor
    Reputation
    97
    Join Date
    May 2008
    Posts
    393
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Calling GetNextWindow (which is the same as calling GetWindow with the next-window flag set) in a loop is a particularly bad process because it can cause your code to get stuck in an infinite loop which can be a pain in the ass to debug. Really, if you're enumerating windows, you should be using EnumWindows with a proper callback. Something, however, tells me that may be a wee-bit above the difficulty level of this thread, though I may be wrong.

Page 3 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Help WoW Fish-Bot
    By Eliteplague in forum World of Warcraft General
    Replies: 2
    Last Post: 12-10-2024, 05:46 PM
  2. HELP: Gold Scam Exploit
    By GoldDragon in forum World of Warcraft General
    Replies: 11
    Last Post: 01-23-2007, 07:26 PM
  3. Banner Ad Redesign help
    By Matt in forum Community Chat
    Replies: 57
    Last Post: 07-08-2006, 08:40 PM
  4. Hit points and talent points? Please help
    By hankusdankus in forum World of Warcraft General
    Replies: 6
    Last Post: 05-04-2006, 02:00 PM
  5. bot help
    By xwhitedeathx in forum World of Warcraft General
    Replies: 3
    Last Post: 05-01-2006, 03:50 AM
All times are GMT -5. The time now is 12:14 PM. 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