FIELD_OFFSET macro

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

Syntax

void FIELD_OFFSET(
   type,
   field
);

Parameters

type

Specifies the name of a known structure type containing Field.

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

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

See Also

CONTAINING_RECORD