I would like to quote myself here:
Quote:
Originally Posted by Jeoni
This won't work if you're working in a x64 application.
Why is every *** **** newbie (excuse that word, but it was my experience so far) so obsessed with using DWORD as pointer type? Even the winapi does have something like UINT_PTR. In my opinion it's just bad coding style and shows that the programmer didn't make his own basic thoughts and / or has no idea what he is doing and / or is just C&Ping.
|
And has anyone seen that the target type is a 2 byte integer? Reading 4 byte may destroy the result by reading 2 byte from another unrelated value. Taking that and the fact that using DWORD as a pointer type is just bad style into account, I would do something like this:
Code:
short value = *(short*)(*(UINT_PTR*)0x7198BC + 0x70E);
Or with native types only:
Code:
short value = *(short*)(*(char**)0x7198BC + 0x70E);
Of course, you can use C++-Casts, if you want to and if you're using "C++".
With best regards
Jeon