Troubleshoot LoadRunner VuGen Errors Loading Custom DLL’s
Posted on Mar, 2010 by Admin
Issue: While using the lr_load_dll function, the user receives the following error:
“Action1.c(x): Error -19890 : C-interpreter run time error:
Action1.c(x): Error — File error : LoadLibrary(c:\temp\MyDll.dll) failed : The specified module could not be found.”
The error above can occur if the compiler fails to locate or load the DLL. You can check the return code of lr_load_dll to verify if this is the case.
//---begin code---// int x; x = lr_load_dll("MyDLL.dll"); lr_message("return code = %d", x); //----end code---//
If the function above returns 11, that means LoadRunner failed to find the file.
Check the following:
Double check the directory, and make sure that the DLL is in the correct path as specified in lr_load_dll function.
Make sure that all the required files are present and available to the DLL.
You can use the Windows Dependency Walker (http://www.dependencywalker.com/) to check if any dependent DLL’s are not available.
Is the DLL a 16-bit DLL? If so, it is not supported.
If you are getting this error from the Controller only, make sure that you copy the DLL to the same directory of all the Load Generator machines.
If you are loading the DLL from the script’s directory, make sure that the DLL is listed in the Controller’s Design View -> Details -> More -> Files.
If you are still having problems, try to put your DLL into a path that is specified in the PATH environment variable of the machine. Modify the reference to the DLL if needed.