[zz]FIELD_OFFSET

[zz]FIELD_OFFSET

FIELD_OFFSET

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

LONG 
  FIELD_OFFSET(
    IN TYPE  Type,
    IN PCHAR  Type,
    IN PCHAR  Type,
    IN PCHAR  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

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

Comments

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

Requirements

IRQL: Any level

Headers: Declared in ntdef.h. Include wdm.h or ntddk.h.

 

See Also

CONTAINING_RECORD

你可能感兴趣的:([zz]FIELD_OFFSET)