Expand Minimize

FIELD_OFFSET macro

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

Syntax


LONG FIELD_OFFSET(
  [in]  TYPE Type,
  [in]  PCHAR Field
);

Parameters

Type [in]

Specifies the name of a known structure type containing Field.

Field [in]

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

Return value

Returns the byte offset of the caller supplied Field in the Type structure.

Remarks

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

Requirements

Version

Available starting with Windows 2000.

Header

Ntdef.h (include Wdm.h or Ntddk.h)

IRQL

Any level

See also

CONTAINING_RECORD

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.