RAMTester "FrontPanel DLL could not be loaded" Error

I’m having trouble with the C++ code for RAMtester.
The .exe provided in the samples works fine. I can also build the provided C++ code, but when I attempt to run this code it just give me the
“FrontPanel DLL could not be loaded” error every time.

I’ve tried overwriting the original(working) .exe with the new build to ensure that all the correct files are in the directory, but the error persists.

I’m using MSVC++ express 2010 with Windows Vista 7 Enterprise 64bit. What am I doing wrong?


My suggestion would be to trace through the program and determine why it is reporting that the FrontPanel DLL could not be loaded. What error response from which function call is source of that problem?

Also, always try to include all the details you can…

Which FrontPanel version do you have installed?
Which FPGA module are you using?

Thanks for the response. Here’s what I’ve been able to narrow it down to…

In “okFrontPanelDLL.cpp” the line:
“return((DLL *) LoadLibrary(libname));”
always returns NULL.
(“libname” is correctly defined as “okFrontPanel.dll”.)

This causes “dll_load(okLIB_NAME)” to return “NULL”, which in turn causes “okFrontPanelDLL_LoadLib(NULL)” to return FALSE which causes the program to exit during the code below which occurs at the start of “main”.

if (FALSE == okFrontPanelDLL_LoadLib(NULL)) {
printf(“FrontPanel DLL could not be loaded.\n”);

I’m using the XEM3005 with FrontPanel version 3.1.5


And you can confirm that the DLL is in the application’s working directory?

Yes, the dll is there.

The original RamTester.exe works fine, but if I replace it with the RAMTester.exe created by building the project then it no longer works, even though its operating in the same directory as the original.
The only difference is one .exe came with the installation and the other was created by building the project.

I remembered I’d installed frontpanel for 64bit machines, but my c++ project was built for win32 (which cannot load 64bit dll’s).

Building a 64bit application is beyond me, so I got around it by installing the 32bit version of frontpanel and using that “okFrontPanel.dll” file. Now everything works.