Results 1 to 5 of 5
  1. #1
    Atomikb34st's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Location
    Syracuse, New York, United States
    Posts
    5
    Reputation
    10
    Thanks
    0

    (Help)With coding a Dll file to retreive external data

    I have a question for the coders. im writing my own custom dll for mw2 and mw3 and im wondering how to load a external txt or cfg file for editing.
    example if i code out a section and like this
    mycommandshere("blahabalal,"here i wantto load and insert external commands"

    how could i do that?I understand this is not the structure of a dll but u get the point im trying to make it so once this is loaded people can edit the txt file to insert more things into the dll file.whatver is listed in the txt file goes into the "here i wanto load and insert external commands"

    Can anyone help me out with this im stumped?

    Thanks

  2. #2
    intervention61's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    285
    Reputation
    10
    Thanks
    829
    My Mood
    Cool
    GetPrivateProfileString() - to read stuff from txt file
    WritePrivateProfileString() - to write to txt file
    "Joker: why the hakcer are steaklign us name it´s the greatest asshole and motherfucker and i fuck him or her mother"

  3. #3
    Atomikb34st's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Location
    Syracuse, New York, United States
    Posts
    5
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by intervention61 View Post
    GetPrivateProfileString() - to read stuff from txt file
    WritePrivateProfileString() - to write to txt file
    i know how to do that im saying once i load the txt how can i pull the data from it and insert it into the command i posted above.
    (i know that is not a actual command but no need in releasing my source yet)
    just using it as a example. if im understanding everything that i have found out
    is GetPrivateProfileString(would i put the location of the txt file here?)

  4. #4
    Atomikb34st's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Location
    Syracuse, New York, United States
    Posts
    5
    Reputation
    10
    Thanks
    0
    any ideas?

  5. #5
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,326
    My Mood
    Breezy
    Code:
    // near the top of your CPP file
    EXTERN_C IMAGE_DOS_HEADER __ImageBase;
    
    // and then, anywhere you need it:
    LPTSTR  strDLLPath1 = new TCHAR[_MAX_PATH];
    ::GetModuleFileName((HINSTANCE)&__ImageBase, strDLLPath1, _MAX_PATH);
    Credits to John Simmons, I just copy and pasted.

    That will provide you with the DLL's path. Using that you can find the directory by using the whole path until you reach the last \ backslash character (you can achieve this by using the PathRemoveFileSpec function).
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

Similar Threads

  1. [Help Request] Easy Help with coding hacks? like the easiest hacks?
    By 0pticisback in forum Combat Arms EU Help
    Replies: 5
    Last Post: 12-22-2011, 06:19 AM
  2. [Help] Help With Code On .DLL
    By cseay1 in forum C++/C Programming
    Replies: 8
    Last Post: 09-24-2011, 12:05 AM
  3. Help with code dll
    By Ecl|pse in forum Combat Arms Coding Help & Discussion
    Replies: 6
    Last Post: 01-11-2011, 04:32 PM
  4. Help with codes
    By kalwarbo2008 in forum C++/C Programming
    Replies: 8
    Last Post: 07-26-2008, 09:58 AM
  5. Help With Coding Please
    By pbguy145 in forum WarRock - International Hacks
    Replies: 1
    Last Post: 10-10-2007, 07:52 PM