10-30-2012 03:23 PM
I am having issues linking a DLL to LabVIEW I am thinking my error is because data types withing the .h file. I tried using the Import Shared Library and I am finding that none of the functions in the unit_hcs08.h will load again I am guessing that the function types are not being supported by LabVIEW.
any help with this would be great.
10-31-2012 01:46 AM
Hi,
did you tried with ActiveX ?
best Regards,
10-31-2012 08:18 AM
Yes I tried both ActiveX and .Net. and a pop up came up and said the the Library I had selected was not .net or ActiveX
10-31-2012 03:52 PM
Hey Harold,
What sort of behavior are you seeing when you try to use the Import Shared Library Wizard? Is it throwing an error? Does the .dll freeze when trying to parse the header file? If so this document may be helpful.
http://digital.ni.com/public.nsf/allkb/9659956BEF356CBA8625793300548A71?OpenDocument
Regards,
Leah
10-31-2012 06:03 PM
it does not freeze or anything just none of the function in that header get put in a library. the Import Shared Library Wizard says that 0 of my functions have been added.
11-01-2012 09:08 AM
Harold,
It is very possible that LabVIEW doesn't know the data types in the header file. Generally, if your functions contain complex data types, we recommend calling the dll using a Call Library Function Node.
There is a very helpful example in the Labview Example finder that explains how to handle several different data types to be used with the Call Library Function Node. The example is named Call DLL.vi. Refer to this example when dealing with complex data types such as arrays or structs. To Find this example go to the LabVIEW Example Finder (Help»Find Examples) and select the Directory Structure radio button. In the directories list, select dll and then data passing then Call Native Code.llb. The Call DLL.vi example is under that directory.
Regards,
Leah
11-01-2012 09:28 AM
That is exactally what I thought the problem was I just created the functions with the Call Library Function Node. thanks for the help though