#ifndef _PHNT_NTDEF_H
#ifndef _NTDEF_
#if defined(__INTELLISENSE__) || defined(DOXYGEN)
#ifndef BYTE_OFFSET
/**
* The BYTE_OFFSET macro returns the byte offset of an address within its page.
*
* \param Address The address/pointer value.
* \return The offset in bytes within the containing page.
* \remarks This masks the address with PAGE_MASK.
*/
#define BYTE_OFFSET(Address) ((SIZE_T)((ULONG_PTR)(Address) & PAGE_MASK))
View code on GitHub#ifndef _PHNT_NTDEF_H
#ifndef _NTDEF_
#if defined(__INTELLISENSE__) || defined(DOXYGEN)
// ...
#else
#ifndef BYTE_OFFSET
#define BYTE_OFFSET(Address) ((SIZE_T)((ULONG_PTR)(Address) & PAGE_MASK))
View code on GitHub// wdm.h
void BYTE_OFFSET(
[in] Va
);
View the official Windows Driver Kit DDI referenceNo description available.
The BYTE_OFFSET macro takes a virtual address and returns the byte offset of that address within the page.
Va [in]Pointer to the virtual address.
BYTE_OFFSET returns the offset portion of the virtual address.