For example, I know the address of the function (lets say its 0x0183ad0
), and I would like to get an object from that function which returns an unknown type:
unknownType(*fname)() = (unknownType(*)())0x0183ad0
Is there any global type I can replace unknownType
with or any method to get that object as a byte array (I know the sizeof(unknownType)
)
The function return an object NOT A POINTER
"byte array" would be uint8_t*
or unsigned char*
.
If you know the size of unknownType
I would create a
struct unknownType {
uint8_t stuff[123];
};
so you can adapt the struct definition as you gain better understanding of its fields.