09-19-2017 04:32 AM
Dear Community,
I am working on a program I got from a colleague.
I have a simple init vi referencing a constructor in a dll located in the same path as the vi (the path is under c:). I get Error "1172". I have another vi referencing the same dll but now located in another path (still under c:). That works fine. Now that the other dll is in memory init.vi runs fine. I can not explain this behavior!
LabVIEW 2015
Win 7
Microsoft .NET framework 4.7
09-19-2017 07:06 AM
Hello,
I also had a similar problem, do you mean you get the error "1172 - System.NullReferenceException"?
I have a VI referencing different constructors of a DLL. All of the constructors work fine except for the most important one, to get the measurements results . Do you mean that if you move the DLL in a different path on C (i have it on a server) it works for you?
09-20-2017 12:53 AM
The error I get is:
Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.ComponentModel.Win32Exception: The system cannot find the file specified.
Ammendment:
using LabVIEW 15, 64 bit.
09-20-2017 12:55 AM
Do you mean that if you move the DLL in a different path on C (i have it on a server) it works for you?
When I move the dll to the path (on C) where the calling vi is (init.vi) then I get Error 1172.
09-20-2017 01:02 AM
For me the error is the following:
Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.NullReferenceException: The object reference is not set to an instance of an object.
Possible reason (s):
LabVIEW: A .NET exception occurred in an external assembly.
...and only for one funtion I call on the DLL and I call, in the same VI, different functions without errors. Wherever I move the DLL, I cannot make this thing work.... I think we have quite similar problem but at least for you it is a small issue as you manage to make the VI working somehow....
09-20-2017 02:56 AM
Dear fabbro 12,
It is solved!
I moved the two folders that contain furthers dlls needed by the calling dll into the project directory (one path layer above the previous path).