LOTUSSCRIPT LANGUAGE


Examples: Declare statement (external C calls)
Example 1

Dim strOut As String
' Declare the external function StrUpr, defined in StrLib.
Declare Function StrUpr Lib "StrLib" (ByVal inVal As String) _
  As String
' Call StrUpr
strOut$ = StrUpr("abc")

Example 2

' Declare an exported library function (SendDLL) with an alias
' to preserve case sensitivity.
Declare Function SendDLL Lib "C:\myxports.dll" _
  Alias "_SendExportedRoutine" (i1 As Long, i2 As Long)
' Call SendDLL
SendDLL(5, 10)

Example 3

' Pass  the string argument amIStr to the function StrFun as
' a Unicode string. The function's return value is also
' a Unicode string.
Declare Function StrFun Lib "lib.dll" _
  (amIStr As Unicode String) As Unicode String

Example 4

' Pass the string argument amLStr to the function StrFun as
' a LMBCS string. The function's return value is a LotusScript
' platform-native string.
Declare Function StrFun Lib "lib.dll" _
  (amLStr As LMBCS String) As String

See Also