How about the standard offsetof() macro (in stddef.h)?
Edit: for people who might not have the offsetof() macro available for some reason, you can get the effect using something like:
#define OFFSETOF(type, field) ((unsigned long) &(((type *) 0)->field))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…