This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Mar 16, 2014, 8:56 AM
21 Posts

API Calls from LotusScript on 64bit server: 4-byte pointer issue

  • Category: Application Development
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: LotusScript,API
  • Replies: 3

In the Domino Designer help database is the following note regarding calls to C-API functions:

"When an argument is passed by reference, the C function receives a 4-byte pointer to the value area."

If I understand this correctly then API calls from LotusScript on a 64-bit Domino server will fail (crash) when an 8-byte pointer is expected?

For example the first argument in ODSReadMemory is a pointer passed by reference.  Works perfectly on Domino 32-bit (when first argument is defined in LotusScript as a Long) but crashes on Domino 64-bit (when first argument is defined in LotusScript as a Double).  It seems even though the Double data type is 8-bytes LotusScript will still only pass a 4-byte pointer to the API call.

I'd like to hear other developer's thoughts, comments and possible workarounds.  Thanks.

Alex

Mar 17, 2014, 2:30 AM
74 Posts
Forwarded to development
64 bit/kb
Mar 19, 2014, 9:30 AM
21 Posts
NSFItemDefExtGetEntry returning null ItemName Pointer

Hi Jennifer,

Thanks for forwarding my previous issue regarding ODSReadMemory crashing on 64-bit.  I've now been able to get ODSReadMemory working successfully but now have an issue with NSFItemDefExtGetEntry.  On 64-bit all values are being correctly returned in the API call from LotusScript however the ItemName pointer is coming back as zero - I've defined ItemName pointer in the LotusScript code as both a Long and a Double but get a null value for both.   Same call using the same code on 32-bit works correctly.

Regards,

Alex

Jun 24, 2014, 6:46 PM
12 Posts
More details on making C calls from LS on 64 Bit OS
This link goes into details about how to properly make call outs to C function from LS on 64 a 64 bit OS-
Using LotusScript C-Callouts on non-32-bit Platforms
http://www-10.lotus.com/ldd/ddwiki.nsf/dx/C-Callouts_on_non-32-bit_Platforms

Prior to 8.5.3 Fix Pack 3 64-bit Domino, LotusScript did not properly align data in type structures for C API call outs. A fix for that issue (SPR# EFFEN8MJJCY) was introduced in 8.5.3 Fix Pack 3 64-bit, thus now 8 byte data types must be defined as Double in type structures (the same is true for C API arguments and return value).   This resulted in some issues that are covered in this TN.

Title:        C API call out results in server crash or returns corrupt data on 64-bit Domino 8.5.3 Fix Pack 3
Doc #:        1624936
URL:        
http://www.ibm.com/support/docview.wss?uid=swg21624936

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal