I'm new to LabVIEW but couldn't find an answer to the problem I have since a few weeks.
I got a C-DLL written or created in LabVIEW 7 from a supplier. He also sent us a C-Sample project how to access the DLL. The C-Sample project works fine except the warning about a LoaderLock during accessing DNCompInfo.dll. This can be ignored and the sample code ends successful.
Now I tried to access the same DLL from C#:
Using Windows XP everything runs exactly the same as the C-Sample.
But if I use the same C# Code under Windows 7 the project always crashes! I tried realy everything I could find in the web. I dynamically loaded the DLL and also accessed it static. I wrote a wrapper-DLL around the C-Sample. I changed MDA of .NetFramework to 0 as described in a LabVIEW post. Everythings ends up with the same result: System.AccessViolation.
But I'm able to access the always present function in the LabVIEW DLL "LVDLLStatus".
Maybe I'm having a well known problem with LabVIEW Runtime 7.0 and Windows 7??? I don't know what else could be done to solve this problem and I would be very glad if someone could help me!
Solved! Go to Solution.
One question to all:
The supplier uses LabVIEW 7 and also recomands installing LabVIEW Runtime 7.0. Does this work on Windows 7 or is the problem located here???
Hi Jochen the runtime installation is mandatory and there's maybe also a driver dependency. To be sure Win7 is the problem you should try to setup the same LabVIEW environment as on the WinXP PC.
Hope it helps
the LabVIEW Environment is absolutely the same on both computers.
What driver could be the reason?
Since you get SystemAccessError, could it be some UAC that's different in Win7 compared to XP? Try running code as administrator.
We are using TwinCAT and therfore we have deactivated UAC on all computers so this can't be the reason.
I also tried this but this just suppresses the error message and ends in an System.AccessViolation under Windows 7.
I even tried to run the whole installtion process of the suppier (which also installs LabVIEW Runtime 7.0) as Administrator but this changes nothing.