LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 7 + C# + Windows 7 DNCompInfo.dll Error?

Solved!
Go to solution

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!

0 Kudos
Message 1 of 13
(1,906 Views)

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???

0 Kudos
Message 2 of 13
(1,888 Views)

Windows 7 is officially supported from LV2009+, it might very well be the problem, yes.

 

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 13
(1,882 Views)

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

0 Kudos
Message 4 of 13
(1,869 Views)

Hello Christian,

 

the LabVIEW Environment is absolutely the same on both computers.

What driver could be the reason?

 

Jochen

0 Kudos
Message 5 of 13
(1,867 Views)

Since you get SystemAccessError, could it be some UAC that's different in Win7 compared to XP? Try running code as administrator.

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 13
(1,865 Views)

We are using TwinCAT and therfore we have deactivated UAC on all computers so this can't be the reason.

0 Kudos
Message 7 of 13
(1,862 Views)

read and try this

 

LoaderLock

 

even if it's just a warning under WinXP, maybe it leads to an exception under Win7

 

Christian

0 Kudos
Message 8 of 13
(1,854 Views)

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.

0 Kudos
Message 9 of 13
(1,848 Views)
Solution
Accepted by topic author Jochen1980

Try it with a disabled DEP

 

bcdedit /set {current} nx AlwaysOff  

 

 

Message 10 of 13
(1,840 Views)