External Library Support

Beta 0.2.3
Superx++ beta 0.2.3 offers the benefit of being able to execute external libraries via shortx. Standard Superx++ offered this functionality in beta 0.2.2. This has first been implemented on the Microsoft Windows NT/2000/XP operating systems. The external libraries that are supported are .dll executables.

Benefits of .dll Support
The benefits of using .dlls to extend the capabilities of Superx++ are that you can:
1) Use Visual Basic, Visual C++ or other language .dlls written for Windows to extend Superx++ capabilities
2) Use Win32 API functions that are wrapped in Win32 .dll files
3) Reuse of your own code written in .dll files within Superx++ contexts
4) Expose .dll methods as Superx++ services published on the web

When Superx++ is ported to other platforms, different forms of external library support will be implemented using the same Superx++ statements as those listed below.

External Library Access-Related Superx++ Statements
The following are the Superx++ statements that provide external library support:
- lib_open
- lib_func
- lib_close

lib_open
This statement opens the external library for access to its methods. This must happen before invoking the other external library access Superx++ statements.
lib_open({external lib alias}, {.dll path});

{external lib alias} The alias for the external library that will be used to refer to the external library within the Superx++ program.
{.dll path} The path to the executable file for the external library on a mapped drive on the computer.

lib_func
This statement invokes a method on the external library.
lib_func({.dll function return type}) {external lib alias}.{.dll function name}({.dll function parm type} {val/ref}{parm value});

{.dll function name} The name of the method/function on the external library that is being called.
{.dll function return type} The datatype of the value returned by the method/function.
{external lib alias} The alias for the external library that is in the name attribute of the lib_open statement.
{.dll function parm type} The datatype of the parameter that is to be passed into the method/function.
{val/ref} The passing convention of the parameter
* means pass by reference
otherwise the convention is pass by value
{parm value} The value of the parameter that is to be passed into the method/function.

lib_close
This statement closes the external library. This must only happen after invoking the lib_open statement.
lib_close({external lib alias});

{external lib alias} The alias for the external library that is in the name attribute of the lib_open statement.