LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Home
Show details for ContentContent
Purchase
Ready-to-use samples
Hide details for Online resourcesOnline resources
Technotes and goodies
Reference
Header files
Forum
Links
Happy readers

Anonymous

login


 

Hosted by Prominic.NET, Inc.
Main topic: Passing of Long arguments on OS400

Passing of Long arguments on OS400 (by Jochen Sack, 08/01/2005 12:13:03 PM)

I stumbled across a question about how exactly Long arguments are passed from LotusScript to C functions on OS400.

As explained in Table 8 (p. 88) of your book, LotusScript on OS400 aligns Long variables to 16 Byte boundaries. On the other hand, the examples of OS400_ConvertTIMEDATEToText and OS400_ConvertTextToTIMEDATE given on p. 290 of the book suggest that Longs are "compressed" to only 4 Bytes each when passed as arguments to C functions. Otherwise the trick of simulating a NULL pointer (size=16 Bytes) by passing 4 zeros declared as `Byval Long` wouldn't work -- unless I'm missing something important of course.

Hence my question: Is it true that a LotusScript Long on OS400 is aligned to a 16 Byte boundary in memory, but instead to a 4 Byte boundary when pushed to the stack in a call to a C function?

Thanks in advance.

- Jochen