05-22-2013 02:48 AM - edited 05-22-2013 03:07 AM
Hello @all!
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!
Thanks, Jochen!
Solved! Go to Solution.
05-22-2013 04:36 AM
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???
05-22-2013 05:53 AM
05-22-2013 07:27 AM
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
Gruß
Christian
05-22-2013 07:33 AM
Hello Christian,
the LabVIEW Environment is absolutely the same on both computers.
What driver could be the reason?
Jochen
05-22-2013 07:40 AM
Since you get SystemAccessError, could it be some UAC that's different in Win7 compared to XP? Try running code as administrator.
/Y
05-22-2013 07:43 AM - edited 05-22-2013 08:02 AM
We are using TwinCAT and therfore we have deactivated UAC on all computers so this can't be the reason.
05-22-2013 08:11 AM
read and try this
even if it's just a warning under WinXP, maybe it leads to an exception under Win7
Christian
05-22-2013 08:45 AM - edited 05-22-2013 08:47 AM
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.
05-22-2013 09:01 AM