LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Home
Show details for ContentContent
Purchase
Ready-to-use samples
Show details for Online resourcesOnline resources
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 Normunds Kalnberzins, 08/02/2005 10:57:40 AM)

Fact that Long "takes" 16 bytes in LS, because it gets aligned on 16 byte boundary in LS, does not yet mean that LS regards it to be 16 bytes long. LS Long is 4-bytes long on any platform. So when we define "ByVal As Long" in C call declaration we make Notes push 4-bytes to the stack for that parameter. In case C code on other end -- in this case on iSeries expect to have value of a pointer, i.e. 16 bytes, it pops 16 bytes out of stack, so we need to push 4x4 bytes.

And of course if we simply define "As Long", LS pushes to the stack a pointer to this variable -- 16 bytes worth.