RTL_PTR_SUBTRACT - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H
#if defined(__cplusplus)

template <typename T>
FORCEINLINE
T*
RTL_PTR_SUBTRACT(T* Pointer, ULONG_PTR Value) noexcept {
    return reinterpret_cast<T*>(reinterpret_cast<PBYTE>(Pointer) - Value);
}

#endif
#endif

View code on GitHub
#ifndef _NTRTL_H
#if defined(__cplusplus)
// ...
#else
#ifndef RTL_PTR_SUBTRACT

#define RTL_PTR_SUBTRACT(Pointer, Value) ((PVOID)(((PUCHAR)(Pointer)) - ((ULONG_PTR)(Value))))

#endif
#endif
#endif

View code on GitHub

NtDoc

No description available.