DLL Injection Problems menu

User Tag List

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

    DLL Injection Problems

    I've had a DLL that I inject into WoW that worked for about a week. It just recently started acting up. It almost seems like my DLL_PROCESS_ATTACH and detach got mixed up. No clue what I'm doing wrong. I switched the files over to another project and it worked fine for a while. Then it bitched again. Has anyone else observed this and/or fixed it?

    DLL Injection Problems
  2. #2
    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)
    Totally don't post code.

  3. #3
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not a code problem. It has to be the compiler or something. It works fine after I move it to a new project. I'll post code anyway.

    Code:
    BOOL APIENTRY DllMain( HMODULE hModule,
                           DWORD  ul_reason_for_call,
                           LPVOID lpReserved
                         )
    {
        if(ul_reason_for_call == DLL_PROCESS_ATTACH)
        {
            DisableThreadLibraryCalls(hModule);
            CreateThread(0, 0, main, 0, 0, 0);
        }
        return TRUE;
    }
    main just detours sendpacket and initializes some class pointers(player and movementfields...).

    EDIT: Also, WoW is throwing a access violation error whenever I close. I'll post back more on the error in a sec.
    Last edited by lanman92; 06-12-2009 at 03:15 PM.

  4. #4
    lanman92's Avatar Active Member
    Reputation
    50
    Join Date
    Mar 2007
    Posts
    1,033
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After commenting out my code... I have it throwing an access violation, 0x00000 trying to access 0x0000000. No clue why this is happenening. Here's what I have for code.

    Code:
    void __cdecl sendpacket(CDataStore* packet)
    {
         oSendPacket(packet);
    }

  5. #5
    Powerking89670's Avatar Member
    Reputation
    3
    Join Date
    Jun 2009
    Posts
    7
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by lanman92 View Post
    After commenting out my code... I have it throwing an access violation, 0x00000 trying to access 0x0000000. No clue why this is happenening. Here's what I have for code.

    Code:
    void __cdecl sendpacket(CDataStore* packet)
    {
         oSendPacket(packet);
    }
    If that is throwing an access violation at 0x00000000, it's indicative of your packet variable being null at runtime, add a check to see if it's null before you try to use it in the oSendPacket function or try to find out why it's null.

    If it is a null pointer issue this would fix it :

    Code:
    void __cdecl sendpacket(CDataStore* packet)
    {
         if(packet != 0)
         {
         oSendPacket(packet);
         }
    }

    The reason it throws an access violation is because that address is most definitely not in the address space of the actual application (even with the pseudo addresses windows creates for each application so we don't need to deal with huge adresses constantly) and when you try to modify it, it will flip out.

    If you say it happens when you close WoW, it's probably got something to do with the fact that the WoW buffer of packets is empty, and you're trying to grab one more than what exists.

    Just my thoughts on it
    Last edited by Powerking89670; 06-19-2009 at 12:00 AM.

Similar Threads

  1. [WoW] [C++] Hack Loader (DLL Injection Example)
    By Cypher in forum WoW Memory Editing
    Replies: 28
    Last Post: 07-06-2010, 11:41 PM
  2. Destructor's Tutorial: Managed .NET DLL Injection
    By ugkbunb in forum Programming
    Replies: 1
    Last Post: 07-30-2009, 05:15 PM
  3. [Tutorial] DLL Injection
    By jagged software in forum Programming
    Replies: 22
    Last Post: 04-21-2009, 03:27 AM
  4. DLL injection with windows SP3
    By Therrm in forum World of Warcraft Bots and Programs
    Replies: 3
    Last Post: 12-06-2008, 03:03 PM
  5. What are the risks with DLL injection?
    By object in forum WoW Memory Editing
    Replies: 14
    Last Post: 08-22-2008, 09:23 PM
All times are GMT -5. The time now is 05:19 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search