Call Action

Calls a routine that is defined in an external Dynamic Link Library (DLL).

Use

The routine must first have been declared with the Declare action.

Parameters

Procedure  -  (Required)

The name of the procedure to be executed or its alias that was defined in the Declare action.

Arguments  -  (Optional)

Any parameters to be passed to the routine.

Returns  -  (Optional)

The variable in which to store the return value from the external routine.

TIP!

When passing an argument to an external routine that is declared as ByRef, you must pass a variable as the argument and not a constant. A variable is required because ByRef arguments allow the called routine to return a modified value for the argument.

Example

The following example calls the WritePrivateProfileString routine from the Kernel32.dll file.

Declare (Kernel32.dll, WritePrivateProfileStringA, WritePrivateProfileString, Boolean, ByVal Section as String, ByVal Key As String, ByVal Value As String, ByVal File As String)

Call (WritePrivateProfileString, "Section", "Key", "Data", "myapp.ini", rc)

See Also

Declare Action


© 2004-2021 looksoftware. All rights reserved.