FIELD_OFFSET macro (winnt.h)

The FIELD_OFFSET macro returns the byte offset of a named field in a known structure type.

Syntax

void FIELD_OFFSET(
  [in]  type,
  [in]  field
);

Parameters

[in] type

Specifies the name of a known structure type containing Field.

[in] field

Specifies the name of a field in a structure of type Type.

Return value

None

Remarks

Used by device driver writers to symbolically determine the offset of a known field in a known structure type.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Desktop
Header winnt.h (include Ntdef.h, Wdm.h, Ntddk.h, Miniport.h, Minitape.h, Scsi.h, Storport.h)
IRQL Any level

See also

CONTAINING_RECORD