12-19-2021 08:42 AM
I called the dll through the Call Library Function Node, the system responds with the following error message. When this problem occurs, after I try to restart the computer N times, it can be used normally, but the problem will reappear as long as the computer restarts. What is the reason for this problem? (attached dll file)
Error Message:
The library specified for this node cannot be found or cannot be loaded. Right-click the Call Library Function node and select Configure, then choose the correct library name or path.
Relevant details:
-64 bit windows 7
-32 bit LabVIEW
12-19-2021 10:44 AM - edited 12-19-2021 10:52 AM
Hi fong,
mind to share your VI so we also know how you call that DLL, and which function you call? It also would help to get additional information on that DLL like a header file…
What's the bitness of that DLL?
Who created that DLL? The WinExplorer doesn't offer any reasonable details in the file specs…
Are you sure that DLL is created correctly? My LabVIEW 32bit installation claims "incorrect memory access" when trying to implement a CLFN for any function in this DLL…
12-19-2021 10:05 PM
Hi GerdW
Attached dll header and Labview example code.
What's the bitness of that DLL?
32bit
Who created that DLL? The WinExplorer doesn't offer any reasonable details in the file specs…
Vendor
Are you sure that DLL is created correctly? My LabVIEW 32bit installation claims "incorrect memory access" when trying to implement a CLFN for any function in this DLL…
The problem you encountered is my current problem.
The following is my current solution to this problem:
(1) Reboot the computer N times
(2) Change computers, there is a chance that some computers can be used.
12-20-2021 01:20 AM
Well you have to talk with the person who created that DLL. It is indeed 32-bit, dependency viewer shows that it only depends on kernel32, w2_32 and MSCVRT. The fact that it depends on MSVCRT means that it was most likely created in Visual Studio 6. That compiler is over 25 years old, so there is a VERY good chance that this was written for Windows 2000 or even earlier and does a few things in a way that worked back then but is illegal with later Windows versions.
Personally I think you’ll have to research for an alternative method to talk with your ddvicc. This DLL is not going to work with any recent Windows version.
12-20-2021 02:56 AM
Hi roIfk
Thank you for your analysis. If anyone has experience in this area, please provide me with a solution. I will also try to find out if there are other methods.
12-20-2021 03:21 AM - edited 12-20-2021 03:22 AM
@fong_ui wrote:
Hi roIfk
Thank you for your analysis. If anyone has experience in this area, please provide me with a solution. I will also try to find out if there are other methods.
What solution do you expect?
This DLL is bad and needs to be replaced by something else. If you can't get a new version from the original creator you have to research other options. It seems to be for some network hardware as it interfaces to the Winsock interface. If the protocol for that hardware is known you could likely use the native LabVIEW TCP nodes to implement it yourself directly in LabVIEW.
12-20-2021 05:00 AM
Hi roIfk
I have confirm that this dll is available because I have used another development platform "Microsoft Visual Studio 2012 " to confirm it in the same Microsoft OS (64 bit windows 7), this problem only occurs when using Labview to develop.
For this reason, the vendor also recommends whether we should switch to the C platform for development.
12-20-2021 05:02 AM - edited 12-20-2021 05:22 AM
If that works for you that sounds like a good solution. With the information you have given so far there is nothing more we could do for you here.
Even if this DLL "seems" to work fine in your C program, it IS attempting to do something bad during DLL initialization and that will come and hunt you sooner or later even in your C program. You can close your eyes and jump into the hole anyhow, but it will simply hurt later on.
12-20-2021 09:33 AM
Hi roIfk
I know that this will not eradicate the problem, so I will try other methods. After all, my main development platform is LabVIEW. C is only for auxiliary use.