When I compile a Notes C API program using Windows 32 bits, I only need to define “W32” in the preprocessor definitions. Should I keep defining W32 in Windows x64? If I only define W64 then I get errors saying that I must specify the operating system…
Also, reading the “Lotus C API 8.0 user guide” and opening the “Porting 32bit Domino applications to 64bit Domino” there are things that seem to be wrong:
IBM says:
“Domino handles are 32bit on domino 32 and 64 platforms. However, windows handles are 64bit on 64bit windows. So please use DHANDLE instead of system HANDLE which is 32bit on all 32 and 64 bit platforms.”
however if I compile my code in x64 then:
sizeof(DHANDLE)=8
and in Win32:
sizeof(DHANDLE)=4
So “32bit on all 32 and 64 bit platforms” is invalid.
Also IBM says:
Don’t use native data type long as this is 32bit on 32bit and 64bit on 64bit systems.
Testing here, sizeof(long) is 4 bytes in both x86 and x64
Also seeing the .mak files of the API x64 I see that in the .mak files IBM says
-DHANDLE_IS_4BITS
So my question is “Should I use this preprocessor definition too?” And it this case 4bits has no sense… maybe it is -DHANDLE_IS_64BITS or -DHANDLE_IS_4BYTES or -DHANDLE_IS_8BYTES
Which one should I use if any?
Thanks