102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
dttr_util_mem.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Functions

static bool DTTR_Util_MemReadable (const void *ptr, size_t size)

Function Documentation

◆ DTTR_Util_MemReadable()

bool DTTR_Util_MemReadable ( const void * ptr,
size_t size )
inlinestatic

Helpers for checking whether live game memory can be read safely enough for pointer walks.

This header is exposed through dttr_sdk.h only when DTTR_SDK_ENABLE_UNSTABLE is set. The unstable surface is still being mapped, so source and ABI details may change without notice. Report whether the byte range [ptr, ptr + size) is committed and readable.

The range must fit inside one VirtualQuery region. A readable span that crosses a region boundary still reports false.

Definition at line 30 of file dttr_util_mem.h.

References DWORD, and size.

Referenced by DTTR_Util_CollisionAdjacentPolygon(), DTTR_Util_CollisionEdgeIsWall(), DTTR_Util_CollisionPolygonInNode(), and DTTR_Util_WorldView_Refresh().