BYTE_OFFSET - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _PHNT_NTDEF_H
#ifndef _NTDEF_
#ifndef BYTE_OFFSET

#define BYTE_OFFSET(Address) ((SIZE_T)((ULONG_PTR)(Address) & PAGE_MASK))

#endif
#endif
#endif

View code on GitHub
// wdm.h

void BYTE_OFFSET(
  [in] Va
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-byte_offset)

Description

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

Parameters

Va [in]

Pointer to the virtual address.

Remarks

BYTE_OFFSET returns the offset portion of the virtual address.