%DLL_OPEN

Open a Dynamic Link Library

WSupported on Windows
USupported on Unix

 

NSupported in Synergy .NET
dll_handle = %DLL_OPEN(filename[, cinterface])

dll_handle

The handle of the DLL if %DLL_OPEN is successful. If unsuccessful, the error $ERR_DLLOPNERR is generated. (D_ADDR)

filename

The full name and path of the DLL to be opened. (a)

cinterface

(optional) A flag that tells %DLL_OPEN to initialize the Synergy DBL C interface in the DLL being opened. Any value is valid. (a or n) (traditional Synergy only)

The %DLL_OPEN function opens a DLL. Multiple DLLs can be opened simultaneously; the number you can open is limited only by your system’s available memory.

If the call to %DLL_OPEN fails, you can use %SYSERR to get the system error code.

Important

DLLs created with Visual Basic are not accessible by Synergy. Synergy can only access DLLs written in a language that can create standard (non-ActiveX) DLLs.

On Windows, if no path is specified within filename, the system searches for the DLL in the following directories in the following order:

On Unix, if no path is specified within filename, the system searches the path specified by the LD_LIBRARY_PATH environment variable (or LIBPATH on AIX). The appropriate environment variable was automatically set if you used the setsde script to set up your Synergy environment. You can use the dltest utility to find your shared library path.

%DLL_OPEN will open .so files instead of .dll files on Unix, including .NET terminal apps running on Linux (even though .NET apps on Windows will open DLLs).

Specifying the cinterface argument tells %DLL_OPEN to call a setup routine with the correct arguments to initialize the Synergy DBL C interface in the DLL. This is to assist with user-created DLLs written in C that use the C interface. See Building a dynamic library with C routines for more details.

Each DLL opened by a Synergy application should be closed with %DLL_CLOSE prior to exiting the Synergy application.

For an example of %DLL_OPEN, see %DLL_CALL Examples.