LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Vector MDF4 Lib - .NET error 1172

Solved!
Go to solution

Hello together,

I am developing small application, where I would like to use .NET library for read and write MDF file with Vector MDF library (.NET). I am able to start it, but after first method Init (see picture) I obtained error 1172. And following method will not create object FileManager which I need for following functions.

Has somebody idea what should make these problems? Any solutions, hints? Now I wrote to Vector GmbH for a support. Library is functionable, because I have working example in C#. There has to be something in settings of LabVIEW or register .NET library inside LabVIEW.

 

0 Kudos
Message 1 of 6
(3,339 Views)

Its a good idea to contact the supplier of the assembly(s) directly, they may be in a better position to help.

 

Its hard to tell without more information but it appears you are getting an unhandled Win32 exception when calling the Init() method. This might be due to failing to find an unmanaged dependency. So it is no surprise that any further method calls after an 'initialisation' fail. Perhaps you can share your working C# code as a VS solution? That way we can see not only the code but also the project references. If possible (from a legality perspective) can you supply the assemblies you are using.

 

Some general questions / tips:

  • You are using a LabVIEW project, right? If not, start there.
  • Any assemblies you are using for the C# solution need to be present either in the same folder as the LabVIEW project or in the GAC (the former is preferable in my opinion). This includes any assemblies that are referenced by the one that you are creating an object from (VMd4Lib). Depending on how you were distributed this library this might be easy to discover (eg. if it were zipped then put the entire contents of the zip into the LabVIEW project folder).
0 Kudos
Message 2 of 6
(3,315 Views)
Solution
Accepted by topic author JiriUraj

Hello,

the problem was fixed. I put all support files of dll library into the same folder as my project. And it works, easy solution:-)

0 Kudos
Message 3 of 6
(3,293 Views)

In this way can you edit MDF4 file attributes?

Could you please provide your project?

Thanks!

0 Kudos
Message 4 of 6
(1,654 Views)

Honestly you cannot edit MDF file effectively (attributes). The best way is to read all file and make copy with changed attributes. About the project, sorry I cannot share due to our company restrictions. By the way Vector library is licensed too, it is not for free use, but if you want to do something with MDF via .NET, there is free library supported by ASAM (https://www.turbolab.de/mdf_libf.htm) I can only support in tips and tricks.

0 Kudos
Message 5 of 6
(1,638 Views)

OK, that's very helpful. Thank you very much.

0 Kudos
Message 6 of 6
(1,632 Views)