例 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")
例 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)
例 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
例 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