GetPrivateProfileString() - to read stuff from txt file
WritePrivateProfileString() - to write to txt file
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
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"
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?)
Credits to John Simmons, I just copy and pasted.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);
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.7.3
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]