While using the lr_load_dll function, the following error happens:
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.
You will get the error above 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.
Example:
int x;
x = lr_load_dll("cfgamp16");
lr_message("return code = %d", x);
If the function above returns 11, that means LoadRunner failed to find the file. Check the following:
1. Double check the directory, and make sure that the DLL is in the correct path as specified in lr_load_dll function.
2. Make sure that all the required files are present and available to the DLL.
You can use the Windows Dependency Walker to check if any dependent DLL's are not available.
3. Is your DLL an 8-bit or 16-bit DLL? If so, it is not supported.
4. If you are getting this error from the Controller only:
- If you are loading the DLL from a specific directory, 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.