LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DLL error 126 on a DLL using NI-Visa LabWindows 2020

Hello,
I’m working on a project where I need to use a DLL useful for reading and writing to serial port.
I tried in every way to call the DLL through a server I wrote, always using LabWindows, but with the LoadLibrary command I get the error 126, that is "module not found".

 

In the various attempts at correction I have already tried to :
1) DLLEXPORT
2) Create a new project
3) Debugging in 32 and 64 bits
4) Check that the server worked with a DLL with only one print function (and it works)
5) Create a separate folder so you don’t have names that could create a conflict in the file search
6) Updated NI-Visa to version 21.5

 

Even searching online I do not understand what is wrong with my code because according to what I found in this community, it should work.

I am patiently waiting for someone to give me a hand in finding the solution to this mystery and I appreciate your answer ahead of time.

0 Kudos
Message 1 of 4
(1,392 Views)

I don't understand your reference to VISA when you say you are trying to use a DLL.

If it's VISA functions you want to use, then you do not need to directly access the DLL: if VISA is installed in the system you'll find its functions in  the Library menu.

Alternatively you could simply try using built-in RS232 functions.

Or you may actually need to call that specific dll, in which case please add some detail more.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 4
(1,376 Views)

If you have Visual Studio, you can use dumpbin to check if your required function is exported by the DLL.

 

dumpbin /exports filname.dll

 

 

Message 3 of 4
(1,342 Views)

Who created that "useful" DLL?

With what compiler and version?

Was it compiled as release version?

With C Runtime library as external dependency or compiled into the DLL?

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(1,281 Views)