|
You last visited: Today at 07:55
Advertisement
[HELP] Pointer to Memory [C++]
Discussion on [HELP] Pointer to Memory [C++] within the C/C++ forum part of the Coders Den category.
01/24/2013, 05:26
|
#1
|
elite*gold: 20
Join Date: Oct 2011
Posts: 86
Received Thanks: 12
|
[HELP] Pointer to Memory [C++]
Hello,
i try to get a Value of a Memory -> Pointer
thats what I do in Cheat Engine:
How do I get this Work in my C++ Function:
Code:
void _sendchat(char* text)
{
int ProcessID = 0, Len = strlen(text) + 1;
for (ProcessID = 0; !ProcessID; ProcessID = GetProcessID("gta_sa.exe"))
;
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessID);
if (hProcess)
{
PVOID cmd = VirtualAllocEx(hProcess, 0, Len, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
WriteProcessMemory(hProcess, cmd, text, Len, 0);
DWORD func = (DWORD)GetModuleHandleExtern("samp.dll", ProcessID) + 0x4A10;
HANDLE hThread = CreateRemoteThread(hProcess, 0, 0, (LPTHREAD_START_ROUTINE)func, cmd, 0, 0);
DWORD dwExitCode = 0;
if (hThread)
{
WaitForSingleObject(hThread, INFINITE);
GetExitCodeThread(hThread, &dwExitCode);
}
VirtualFreeEx(hProcess, cmd, Len, MEM_RELEASE);
CloseHandle(hThread);
}
CloseHandle(hProcess);
}
It dont work in this Function, please help...
Thanks
Dennis
|
|
|
01/25/2013, 12:57
|
#2
|
elite*gold: 966
Join Date: Apr 2010
Posts: 1,105
Received Thanks: 681
|
Quote:
Code:
(...)
DWORD func = (DWORD)GetModuleHandleExtern("samp.dll", ProcessID) + 0x4A10;
(...)
|
I don't get it how you came to the 0x4A10!? There is no other attempt to read something from the process.
I'm not sure about it, but I guess it's working this way (if func is not required for this, just rename the variable):
Code:
(...)
DWORD func = ReadDWORD(ProcessID, (DWORD)GetModuleHandleExtern("samp.dll", ProcessID) + 0x20DFA0) + 0x28;
(...)
I guess it's clear, what ReadDWORD does
With best regards
Jeoni
|
|
|
 |
Similar Threads
|
memory pointer
09/10/2012 - General Gaming Discussion - 5 Replies
hi, i was wondering if any1 got the latest memory pointer for hero online schlatterbot becuz i had a few friends who were familiar with cheat engine and they still can't figure out the code for it. any help would be great thank you
|
Memory pointer help
02/05/2012 - Final Fantasy XIV - 12 Replies
Oh hi. What i have:
http://dl.dropbox.com/u/4734715/Public%20Pictures /Screenshots/FF/tool/help.png
$offset = 0
$offset = Dec("3E8")
$offset = Dec("2A4")
$offset = Dec("0")
$offset = Dec("8")
|
C# Memory Pointer
08/28/2011 - .NET Languages - 0 Replies
Hallo,
Wollte einmal fragen ob man Memory Pointer in C# genauso wie
In AutoIt verwendet also damit meine ich,
Mit BaseAdresse Memory lesen und dann die Offsets hinzufügen.
Wäre dankbar für eine antwort oder wenn es gehen würde ein Beispiel.
Regards
.Haru*
|
C++ Pointer Memory
12/24/2010 - C/C++ - 5 Replies
Hallo zusammen,
ich bin aktuell dabei meine ganzen autoit botfunctions in c++ umzusetzen.
aktuell habe ich ein problem mit der memory. das auslesen und schreiben geht generell schon.
Beispielaufruf
m_objFenster.MemoryRead(adr_death, sizeof(int));
Funktion
|
[VB.NET] Need help - memory reading from pointer
09/03/2010 - .NET Languages - 2 Replies
Hi,
i'm kinda beginner in memory editing, the only experience i got is vb6 and vb.net - and basic CE skills. However i could get the pointer and the offset for a memory address, it works, tested.
Next step is the reading of this value with a vb.net application. I have been googleing for 2 days, got some codes, wrote some by myself, but none of them seems to work.
Could anyone help me a bit?
Thank you,
Regards
|
All times are GMT +1. The time now is 07:56.
|
|