Basic declaration transformation
Each C function used from LotusScript must have at least one declaration prior to the use. Either different ways to use the same function or need to use it in multiple OS-es often require functions to have several declarations.
A regular declaration format is as follows:
Declare Function OS_FunctionName Lib "libname" Alias "FunctionName" (parameters) As ReturnType
Return type is usually Integer and returns error status (0 means success). Be careful – sometimes it may return something else.
In case function does not return value or we are not interested in it, we declare it as Sub instead of function.
OS – a standard way to differenciate function declarations by OS; usual values – W32, OS2, AIX, SOL, MAC – it is of course up to you to define meaningful names
FunctionName – function name as defined in (library) and API reference – a good idea is to keep the original name as a part of the name declared in LotusScript
Alias – use Alias to ensure LotusScript use correct casing; points to the real name of function in Notes library. The Alias clause can contain also ordinal number of exported name. In this case the syntax will be like Alias “#25” to refer to 25th function in dll.
Lib – predefined library file name. Name of the library depends on platform. Extension ".dll" may be omitted.
The following table contains library names in all Domino platforms.