Utility Functions and C Language Reference > Utility Functions: C Language (lr_) > Alphabetical Listing > lr_load_dll


Loads an external DLL.

C Language

int lr_load_dll( const char *library_name);

Example: lr_load_dll Run-Time Functions


Name Comments
library_name The name of a DLL (Windows) or shared object (Linux).

The lr_load_dll function loads a DLL (Windows) or shared object (Linux) allowing you to call an external function when replaying using the C interpreter. Once you load the DLL, you can call any function defined in the DLL, without having to declare it.

You can specify a full path for the DLL.

On Windows platforms, except for the SAP GUI protocol, if you do not specify a path, lr_load_dll searches for the DLL using the standard sequence used by the C++ function, LoadLibrary.

When using the SAP GUI protocol, you must specify the full path. There is no support for searching for the DLL.

On Linux platforms, you can set the LD_LIBRARY_PATH environment variable (or the platform equivalent). The lr_load_dll function uses the same search rules as dlopen. For more information, see the man pages for dlopen or its equivalent.

Return Values

This function returns 0 on success, 10 if an out of memory condition resulted, or 11 if the file was not found.


You cannot use standard parameterization for any arguments in this function.