|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
TestingC How do I cheat? Reputation: 0
Joined: 04 Dec 2015 Posts: 1
|
Posted: Tue Jan 05, 2016 11:30 pm Post subject: Read value from memory with a dll pointer |
|
|
Hi there,
First of all I want to say sorry because I don't know at all what I need to do what I'm looking for and maybe I'll post something nosense.
Well, what I'm looking for is just to read a value stored into the memory by a game, I don't want add nothing or modify it, just read it..
The point is that this game use a DLL thats seems to have a pointer (I think) to this value but I don't know how I can use it, I spent many days searching over the internet and I think that I should hook the DLL to have access to such code but I'm not sure about this, by the way I found the code for the same game and also to do exactly what I need but is on C++ and I need it on C# and I'm unable to "convert" it.
Here are some parts of the code I found, lets see if someone can guide me over the question:
Note: "?GetNickName@User@@QAEPAGXZ" is the pointer located inside the game DLL.
Code: |
User_fn8 ptrUser::ptrFun8 = NULL;
static HINSTANCE ptrUser_h_Instance;
//END DATA
void User::Hook() //BEGIN HOOK
{
ptrUser_h_Instance = GetModuleHandle(TEXT("engine.dll"));
MAKE_POINTER(ptrUser_h_Instance, ptrUser::ptrFun8, User_fn8, "?GetNickName@User@@QAEPAGXZ");
HOOK_FUNC(ptrUser_h_Instance, "?GetNickName@User@@QAEPAGXZ", &User::OnCalled_GetNickName, ptrUser::ptrFun8);
}//END HOOK
void User::UnHook() //BEGIN UNHOOK
{
UNHOOK_FUNC(ptrUser_h_Instance, "?GetNickName@User@@QAEPAGXZ", &User::OnCalled_GetNickName, ptrUser::ptrFun8);
} //END UNHOOK
unsigned short * User::OnCalled_GetNickName(void) //BEGIN EVENT: unsigned short * User::GetNickName(void)
{
CHECK_THIS
//Put your code here
unsigned short * retval = NULL;
if ( TITLE->GetTitle ( this, retval ) )
{
return retval;
}
return GetNickName();
} //END EVENT: unsigned short * User::GetNickName(void) |
I'll thank any kind of help!
|
|
Back to top |
|
|
WhoKnowsYes How do I cheat? Reputation: 0
Joined: 30 Jan 2017 Posts: 1
|
Posted: Mon Jan 30, 2017 1:50 am Post subject: |
|
|
I'm trying something very similar, any idea?
|
|
Back to top |
|
|
ulysse31 Master Cheater Reputation: 2
Joined: 19 Mar 2015 Posts: 324 Location: Paris
|
Posted: Mon Jan 30, 2017 2:23 pm Post subject: |
|
|
WhoKnowsYes wrote: | I'm trying something very similar, any idea? |
Start your own thread, be specific on your needs (not "something much like this"). This thread is bad in every way and is much less likely to receive an answer than a clean thread containing a single well asked question
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|