The RtlPointerToOffset routine returns the offset from a given base address of a given pointer.
Pointer to the base address.
Pointer to an address, usually the address of a member of a structure pointed to by Base. Pointer must be greater than Base.
RtlPointerToOffset returns the offset in bytes of the given Pointer from the given Base.
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.
|< DISPATCH_LEVEL (see Remarks section)|