FIELDOFFSET

3.1

int FIELDOFFSET(type,field)

The FIELDOFFSET macro computes the address offset of the specified member in the structure specified by the type parameter.

Parameters

type

Specifies the name of the structure.

field

Specifies the name of the member defined within the given structure.

Return Value

The return value is the address offset of the given structure member.

Comments

The FIELDOFFSET macro is defined in WINDOWS.H as follows:

#define FIELDOFFSET(type, field)    ((int)(&((type NEAR*)1)->field)-1)