ALIGN_DOWN_POINTER_BY - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _PHNT_NTDEF_H
#ifndef _NTDEF_
#if defined(__INTELLISENSE__) || defined(DOXYGEN)
#ifndef ALIGN_DOWN_POINTER_BY

/**
 * The ALIGN_DOWN_POINTER_BY macro aligns a pointer down to a specified alignment boundary.
 *
 * \param Address   The pointer to align.
 * \param Alignment The alignment boundary in bytes (typically a power of two).
 * \return A pointer at or below @p Address aligned down to @p Alignment.
 * \remarks The pointer is treated as an integer (`ULONG_PTR`) for masking.
 */
#define ALIGN_DOWN_POINTER_BY(Address, Alignment) ((PVOID)((ULONG_PTR)(Address) & ~((ULONG_PTR)(Alignment) - 1)))

#endif
#endif
#endif
#endif

View code on GitHub
#ifndef _PHNT_NTDEF_H
#ifndef _NTDEF_
#if defined(__INTELLISENSE__) || defined(DOXYGEN)
// ...
#else
#ifndef ALIGN_DOWN_POINTER_BY

#define ALIGN_DOWN_POINTER_BY(Address, Alignment) ((PVOID)((ULONG_PTR)(Address) & ~((ULONG_PTR)(Alignment) - 1)))

#endif
#endif
#endif
#endif

View code on GitHub

NtDoc

No description available.