I am attempting to read and write to a specific memory location. My first attempt was as follows:
int main(int argc, char *argv[]) {
int *num1;
void *p;
p = reinterpret_cast< void* > (0x04e27e74);
num1 = (int*)p;
printf("0x4e27e74=0x%x\n", *num1);
return 0;
}
but every time I run the code to see what is in the memory location I get an access violation exception. I though of using MK_FP, but I do not know what the segment address of this memory address is or how to figure it out.
Basically the above code segment is what I want to do, except I also want to write to the specific location, but it does not work. All sugestions are welcomed.
Madtown54
int main(int argc, char *argv[]) {
int *num1;
void *p;
p = reinterpret_cast< void* > (0x04e27e74);
num1 = (int*)p;
printf("0x4e27e74=0x%x\n", *num1);
return 0;
}
but every time I run the code to see what is in the memory location I get an access violation exception. I though of using MK_FP, but I do not know what the segment address of this memory address is or how to figure it out.
Basically the above code segment is what I want to do, except I also want to write to the specific location, but it does not work. All sugestions are welcomed.
Madtown54