UseDoubleAsPointer (NotesSession - LotusScript )
Allows you to use a Double to handle a 64-bit pointer argument for a C API call.
Define in
Syntax
callnotesSession.UseDoubleAsPointer=True
True, Double is treated as pointer. False, Double assumes normal Double behavior.
Usage
LotusScript does not have a pointer type so it can encounter issues when a
LotusScript agent is used to call C API 64-bit pointers. The
UseDoubleAsPointer
method, introduced in HCL Domino 12.0.1,
provides a workaround for this limitation by allowing Double to handle a C API
64-bit pointer argument. Note that Long has sometimes been used for pointers but is
now too small to carry a C pointer.
This workaround was previously available through the Domino notes.ini setting LS64BITCCALLOUTPointerSupport=1. However, the notes.ini approach had the downside of applying to all LotusScript agents on the server.
Example
UseDoubleAsPointer
method (parts
removed for brevity):session.UseDoubleAsPointer = True
Print "Calling OSMemAlloc with size, setting active", dwDWordOne
wWordOne = OSMemAlloc(wWordTwo, dwDWordOne, dwDWordTwo)
If(wWordOne = 0) Then
Print "OSMemAlloc worked, continuing with handle", dwDWordTwo
dRetDouble = OSLockObject(dwDWordTwo)
If(dRetDouble > 0) Then
Print "OSLockObject worked, calling XXX"
...
OSUnlockObject(dwDWordTwo)
Else
Print "OSLockObject failed"
End If
Print "Freeing memory"
wWordOne = OSMemFree(dwDWordTwo)
End If
session.UseDoubleAsPointer = False