Calling functions from user-defined DLLs

Calling functions from user-defined DLLs

When calling a function from a custom DLL, the function is not recognized.

The DLL needs to be loaded using the lr_load_dll function. The DLL also needs to be compiled with the functions called from LoadRunner as external. If you look at the DLL with Depends, it will show the function with a blue "e" next to it indicating that it as externally referable.

The syntax for loading the DLL is
lr_load_dll("Full path to the dll");

Example:
lr_load_dll("C:\\MyProject\\MyDll.dll");

Note: The Dll should be exporting the functions in C style and declaration of the function should be included to be able to compile the script

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s