ShowTable of Contents
Large heading
Using LotusScript C-Callouts on non-32-bit Platforms
There are a few issues you need to be aware of if you're writing or porting LotusScript C-Callouts to non-32-bit platforms.
The non-32-bit platforms fall into two categories: 64-bit (Windows 64, AIX-64, Linux-64) and 128-bit (iSeries)
Medium heading
When is a long not a long?
An important thing to consider is that LotusScript data types are the same size across all platforms. A LotusScript
byte is always one byte (a C
BYTE),
integer is always 2 bytes (a C
WORD) and a
long is always 4 bytes (a C
DWORD). In contrast, a C
long is not a fixed width across platforms, or even compilers. In the Notes 8 builds, a long is 4 bytes on Windows-64, but 8 bytes on AIX-64, SUSE Linux-64 and zLinux64.
In order to check how many bytes a long and a pointer is on a given platform, compile and run the following simple C program:
main()
{
printf("sizeof long is: %d, pointer is %d\n", sizeof (long), sizeof (long *));
}
You need to make sure that the size of the LotusScript data that you're passing to the C-Callout matches the arguments in C of the C-Callout itself