BYTE_OFFSET

ULONG
    BYTE_OFFSET(

        IN PVOID  Va
        );

BYTE_OFFSET takes a virtual address and returns the byte offset of that address within the page.

Parameters

Va
Points to the virtual address.

Return Value

BYTE_OFFSET returns the offset portion of the virtual address.

Comments

Callers of BYTE_OFFSET can be running at any IRQL.