LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parse header of file a *.dll library

I am trying to load in labview a dll library but, as a novel in this task, several troubles appear. I am using the Import Shared Library Wizard, so the idea is to read de *.h file and the *.dll and to have all the functions loaded. The problem starts when I try to Parse header file since the wizard crashes. I have two .h files that I attached. One of then (lx01def) looks that contains format, function arguments, etc, that it is supposed that is included in lxdlldef file. I tried to parse both but crashing anyway. (I reviewed the comments, also attached, about the dlls and I think that should be possible to reading with labview. I am using LabVIEW 8.2.1 version in WinXP (32bytes).

If I use the call function node in LabVIEW and path to the *.dll I will be able to see all the Callbacks in the dll file, so I suppouse that should be possible to use the import wizard to construct all the functions vi's. Perhaps the problem is in the header file or perhaps the problem is me :).

 

I read the Call Dlls tutorial and more but I don't find any particular solution to what is happening...

 

Any suggest abour where is the propblem and how to fix??

 

 

Download All
0 Kudos
Message 1 of 4
(3,462 Views)

as there are lot of functions, it would be really nice to do this with the import wizard, and it shoudn't crash. But as you are using really complex datatypes, this will be really hard for labview (dont know why it crashes, but i dont think it can handle such complex functions).


For example, there are lots of "WORD"-types as far as i know, this is simply a 16 bit integer?? So Labview will recognize this type if you have a short int, but don't know if it will know WORD. Or take all the other types, like LX_LOCATE* and so on...this can't be handled by labview, because labview can only transfer "basic" types to dlls, for everything more complex, you will have to write your own wrapper class...




THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
0 Kudos
Message 2 of 4
(3,449 Views)

The Import Shared Library Wizard is not perfect. With complicated header files it's possible for it to fail. One thing you can try is to create a subset of the header files so you're only importing some of the functions, rather than all of them. You can also try posting the DLL to see if someone else can import the DLL with a newer version of LabVIEW and then just back-save to 8.2.

0 Kudos
Message 3 of 4
(3,442 Views)

Ok. That is a good Idea. Trying different thingns (e.g. adding predefined symbols that are define before the code). I got that the import wizard doesn´t crash when parse, but when I saw the functions the wizard can not import any since there are some troubles with functions declarations. I think that perhaps there are too much complex functions. Anyway I attach the *.dll for someone could try to import in a newer version of labview and then saved to 8.2 version.

 

Thanks.

Download All
0 Kudos
Message 4 of 4
(3,433 Views)