Declare
The Declare statement is used at module (file) level to declare references to external procedures in a dynamic-link library (DLL).
Syntax
Declare Function<FunctionName> Lib "<LibName>" [Alias "<AliasName>"] [([<ArgList>])] [As <ReturnType>]
FunctionName:
The required name of the function being declared.
LibName:
The required DLL filename containing the function being called.
AliasName:
The optional function name within the DLL being called.
ArgList:
The optional argument/s of the function.
ReturnType:
The optional return data type.
Related Functions
Example
Declare Function GetWinTempPath Lib "kernel32" _
Alias "GetTempPathA" _
(ByVal nBufferLength As Long, _
ByVal lpBuffer As String) As Long