Export (0) Print
Expand All
Expand Minimize

RtlPointerToOffset macro

The RtlPointerToOffset routine returns the offset from a given base address of a given pointer.

Syntax


ULONG RtlPointerToOffset(
  PVOID Base,
  PVOID Pointer
);

Parameters

Base

Pointer to the base address.

Pointer

Pointer to an address, usually the address of a member of a structure pointed to by Base. Pointer must be greater than Base.

Return value

RtlPointerToOffset returns the offset in bytes of the given Pointer from the given Base.

Remarks

RtlPointerToOffset is useful for obtaining self-relative offsets within structures.

Callers of RtlPointerToOffset must be running at IRQL < DISPATCH_LEVEL if the memory range from Base to Pointer is pageable.

Requirements

Header

Ntifs.h (include Ntifs.h)

IRQL

< DISPATCH_LEVEL (see Remarks section)

See also

RtlOffsetToPointer

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft