Skip to main content

Function: readPointer()

readPointer(handle, ptrOffset, elementOffset): unknown

Defined in: packages/native/dist/index.d.ts:98

Reads a value from memory pointed to by a pointer field.

Used for accessing array elements or dereferencing pointer fields. Reads the pointer at ptrOffset, then reads from that location plus elementOffset.

Parameters

ParameterTypeDescription
handleunknownNative handle pointing to the parent struct
ptrOffsetnumberByte offset of the pointer field in the parent
elementOffsetnumberByte offset from the dereferenced pointer

Returns

unknown

Native handle pointing to the element (borrowed, non-owning)