Solved Unable to retrieve base address during DLL injection... please advise

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Lunoz

Newbie
Full Member
Jun 18, 2015
18
102
0
I'd like to preface by saying I'm no stranger to C++, but I am extremely new to writing programs that deal with memory and pointers, even though I have a pretty good understanding of pointers and memory editing outside of programming.

I was following Fleep's tutorial on mid function hooking, and after 10 hours of trying different things I'm having no success at all.

Specifically, the base address keeps returning 00. Below is the function I am using and the calls to it. What am I doing wrong?


C++:
MODULEINFO GetModuleInfo(char * szModule)
{
	MODULEINFO modInfo = {0};
	HMODULE hModule = GetModuleHandle(szModule);

	if (hModule == 0)
		return modInfo;

	GetModuleInformation(GetCurrentProcess, hModule, &modInfo, sizeof(MODULEINFO));
	return modInfo;
}


// I include whats below just above the main loop that checks for keypresses, when all the addresses are being initialized.
	 MODULEINFO mInfo = GetModuleInfo("game.exe");
	 DWORD base = (DWORD)mInfo.lpBaseOfDll;

	 MsgBoxAddy(base); // Only displays 00 as the address.
 

Lunoz

Newbie
Full Member
Jun 18, 2015
18
102
0
Yes I do, I had to change it from unicode to get one of the functions to work as he did in the tutorial. Should I change it back?

Edit:

Now, I don't know if it's relevant, but I am running a 64bit system, and the game is in 32 bits. In task manager it would say "game.exe *32", where as in cheatengine it just says "game.exe"
 
Last edited:

Syntax Error

Coder
Silenced
Meme Tier VIP
Nov 6, 2014
239
2,928
6
Nah, you're all good in that regard.

Are you passing GetCurrentProcess with the parenthesis?
GetModuleInformation(GetCurrentProcess(), hModule, &modinfo, sizeof(MODULEINFO));
 

Lunoz

Newbie
Full Member
Jun 18, 2015
18
102
0
Ahh, no, I wasn't. Now that you mention it, I recall him changing that in one of the later parts of that tutorial.

Now, instead of returning 00, it it's returning 400000 as the base address. Does this seem like a normal number?

For argument sake, would this mean that something like this:
["Client.exe"+005EC5E4]
Would be equal to:
[0x400000 + 0x5EC5E4]
?
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods