11-14-2012 07:50 AM
Dear programmers,
I am trying to build a simple .dll, using IMAQdx, but having problems at defining function prototypes. How can I properl< export "Session In/Out" and how can I handle the type def (TD) structure?
I am attaching the project and would be thankful for any explanation about this. This is just out of my curiosity.
Best regards,
K
11-15-2012 06:06 AM - edited 11-15-2012 06:10 AM
Hi Klemen!
Library Calls from LabVIEW have to use standard C or stdcall conventions, even if they call a DLL compiled in LabVIEW, so if you have special datatypes and structures, you have to pass them as generic data fit this constraint. In your case, I would advise ot use the Flatten to String and Unflatten from String VIs, or the Type Cast VI and pass the data as a String Handle.
Here you can find more information about passing data to DLLs:
https://decibel.ni.com/content/docs/DOC-9079
Kind regards:
Andrew Valko
National Instruments
11-19-2012 04:59 AM
Thank you very much for the explanation! I will check out the attached link.
Best regards,
K