char* readMem(DWORD address, unsigned int count)
{
char* addr = (char*)address; //convert the address to a char*
char* newAddr = new char[count]; //instansiate a new char* to hold the data from that address
for(unsigned int x = 0;x<count;++x)
newAddr[x] = addr[x]; //fill the array
return newAddr;
}
char* readMem(DWORD address, unsigned int count)
{
char* addr = (char*)address; //convert the address to a char*
char* newAddr = new char[count]; //instansiate a new char* to hold the data from that address
for(unsigned int x = 0;x<count;++x)
newAddr[x] = addr[x]; //fill the array
return newAddr;
}
typedef unsigned long long DWORD;
//-------------------------------------------------
DWORD address = 0x1A;
char* dataAtMem = readMem(address, 2);
free(&(dataAtMem*)); //That might be wrong, but you just call the free method.
//free(*(dataAtMem*)); Might be the right way, don't have compiler open to test atm.
typedef unsigned long long DWORD;
//-------------------------------------------------
DWORD address = 0x1A;
char* dataAtMem = readMem(address, 2);
free(&(dataAtMem*)); //That might be wrong, but you just call the free method.
//free(*(dataAtMem*)); Might be the right way, don't have compiler open to test atm.
Copyright © 2024, NextGenUpdate.
All Rights Reserved.