AdjustPointer (NotesSession - LotusScript®)

Starting with 14.5.0, there is a 64-bit API that increments or decrements pointer by specified offset.

Note: This API is available in 12.0.2 FP5 and 14.0 FP3.

To safely perform pointer arithmetic in 64-bit LotusScript, use this method of the NotesSession class. It accepts a Double pointer and an offset (as Long) and adjusts the pointer accordingly, ensuring correct traversal behavior.

For 32-bit LotusScript, you can use the existing arithmetic method.

Defined in

NotesSession

Syntax

NotesSession.AdjustPointer(pointer As Double, offset As Long)

Return value

It returns a DOUBLE.

Example

session.UseDoubleAsPointer = True
Dim ptr As Double
ptr = OSLockObject(handle_to_buffer)

'Correct way to advance the pointer by a byte offset
session.AdjustPointer (ptr, CLng(offset))

session.UseDoubleAsPointer = False
Important: Always use CLng() to explicitly convert the offset to a Long. Passing a non-integer or incorrect data type may result in unexpected behavior or runtime errors.