Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Once the prototype record has been defined, and the BASIC+ callable functions have been created using Declare_FCNS, you can call the functions from BASIC+ as if they were BASIC+ stored procedures.

Use the Declare Function statement if a return value is required from the DLL function; use the Declare Subroutine statement if the function does not return a value, or if the return value will be ignored.

Example

In the following example, the Windows functions MessageBeep and MessageBoxA (the ANSI version of MessageBox()) are used to inform the user of a problem. The return value from MessageBeep is discarded; the return value from MessageBoxA is used to determine whether or not to abort.

...