Anonymous
|
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.
|