Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
1702 views

Error: "File error : LoadLibrary failed : The specified module could not be found."

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:

  1. 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.
  2. 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.
  3. 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.
0 Likes
1 Reply
Highlighted
Absent Member.
Absent Member.

Re: Error: "File error : LoadLibrary failed : The specified module could not be found."

Hi,

may be this will help

How to Load a DLL Locally

Best regards,

Mikhail

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.