I have a pointer that I use in MHS (eg: [[[[[[12345678]+0xD24]+0]+0x3C]+0xC]+0x188]+0x12) and as you can see, for one of them it's +0. I understand how to create the structure and then use it, what I don't understand is how to declare a zero-length array or at least something that would make it work the same. I even tried declaring it as shown below but it doesn't work as expected.
- Code: Select all
extern struct teststruct {
BYTE bBuffer[0xD24]; //+D24
struct {
BYTE bBuffer; //+0
struct {
BYTE bBuffer[0x3C]; //+3C
struct {
BYTE bBuffer[0xC]; //+C
struct {
BYTE bBuffer[0x188]; //+188
struct {
BYTE bBuffer[0x12]; //+12
FLOAT fValue;
} * poObj;
} * poObj;
} * poObj;
} * poObj;
} * poObj;
} * poBase = { "", 0x12345678 };
Would it be possible to do the following? (or something else instead of poBase->poObj->poObj->poObj->poObj->poObj->fValue = 123.4567;)
- Code: Select all
teststruct test;
test->fValue = 123.4567;
Also, another problem I'm having is with this piece of code.
- Code: Select all
DWORD * dwPtr = (DWORD*)0x3419B631;
dwPtr = 0;
According to another help topic I read, this is supposed to read the value at 0x3419B631 and then write 0 to it. I think I might have to use an extern variable for this but I wanted to ask about it first. It all compiles successfully but it just doesn't work.