A function declaration for a DLL typically has the following form:
Function function-name( [arg-list] ) As return-type
For functions that do not have a return value, the declaration has the following form:
Sub function-name( [arg-list] )
- The data type of the return value.
- The name of the function.
- A list of the arguments that are passed to the function.
The list is specified as follows:
[pass-mode] identifier As data-type
- Specifies whether the argument is passed into the function (ByVal) or if it can be modified by the function (ByRef). You can also use the
ByRef keyword to pass the value of the argument into the function, where the function changes the value of the argument and passes
the new value out.
- The data type of the argument.
- The name of the argument.