Public Declare Function MyFunction Lib "MyDLL" Alias "1MyFunction" (ByRef FirstParam As Long, Optional ByVal SecondParam As String, Optional ByVal ThirdParam As Boolean = False) As Byte
Public/Private - Determines whether the module the function is declared in is the only module that can call the function. Private - No other module can call this function. Public - All other module can call this function. Valid only in a module, not in a form.
Function/Sub - Determines whether or not the function returns anything.
Lib - The DLL containing the function.
Alias - The name of the function in the DLL. Only neccesary if the function's name inside the DLL contains characters that VB does not consider valid for a function name. If Alias is supplied, you can call the function by pretty much any name you want as long as it doesn't conflict.
ByRef/ByVal - Determines if the value of the variable is passed or the address of the variable. The default is ByRef, meaning the function can alter the value contained in the variable.
Optional - Used to make a parameter optional so that the user doesn't have to put it in. Can contain a default value as indicated by the third parameter in the make-believe declare above.
Hope this helps!
The API-Guide download page is located at http://users.turboline.be/btl10148/apiguide/agdown.htm
It looks like you're new here. If you want to get involved, click one of these buttons!