04-24-2007 03:51 PM
04-30-2007 11:10 AM
You can safely rename the TDn names in the generated header to names that make sense for your interface. LabVIEW will give the same set of names every time given the same set of connector panes. However, if you modify the connector of one VI or even change the order of the exported VIs, this can change the numbers generated.
Accessing LabVIEW data types from external code can be tricky. If you are creating a DLL for general usage, I think it is best to eliminate as much of these types from your interface as possible. My goal would be to present a DLL interface that only uses types that are "normal" for C. This means passing strings as C strings instead of handles and passing arrays as pointers to the data instead of handles. For many data types the DLL build process can do for you. For complex data types like clusters with nested strings/arrays or waveforms, this can require some work in the VI before exporting.
For your case I would suggest modifying your VI or building a wrapper around it for export that simplifies the types involved. Split the error cluster out into separate parts so that the string can be passed as a C string. For timestamps your external code will probably want an integer second offset from some start time. Do that conversion in LabVIEW so the integer is exported instead.
There are ways of accessing LabVIEW data from external code, but in most cases you are building a DLL to give to people who are less familiar with LabVIEW so build your interface to be the most usable to them.