hello
voila je cherche comment connaitre l'offset d'un élément d'une structure par exemple dans le PE format on sait que NumberOfNames est a l'offset 18 dans l'export table.
comment je pourrai le vérifier ?
hello
voila je cherche comment connaitre l'offset d'un élément d'une structure par exemple dans le PE format on sait que NumberOfNames est a l'offset 18 dans l'export table.
comment je pourrai le vérifier ?
En C standard, il y a la macro offsetof qui renvoi cette information:
offsetof(type, member-designator)
which expands to an integer constant expression that has type size_t, the value of
which is the offset in bytes, to the structure member (designated by member-designator),
from the beginning of its structure (designated by type). The type and member designator
shall be such that given
static type t;
then the expression &(t.member-designator) evaluates to an address constant. (If the
specified member is a bit-field, the behavior is undefined.)
Partager