%DLL_OPEN

Open a Dynamic Link Library

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX

 

dll_handle = %DLL_OPEN(filename[, cinterface])

Return value

dll_handle

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

Arguments

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)

Discussion

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 and LD_LIBRARY_PATH_64 on Oracle Solaris 64-bit). 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.

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.

Examples

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