01-09-2007 10:29 AM
01-10-2007 05:22 PM
01-11-2007 03:07 AM - edited 01-11-2007 03:07 AM
@Julien Tozzi wrote:
I have just received an SDK from a third party vendor.I need to pass a struct to a dll in order to use our measuring arm.Here's the definition of the structstruct vOpenInfo{int nFuncType; // = DLL_OPEN_CMM (or 1)HWND hwnd;WCHAR sSaveDir[128];void (*HelpCallBack)();};Here's the definition of the only function that I can access from the DLLint CmmSpecific(void *)From what I understand the CmmSpecific function use the pointer on the structure to know what I want to do.The only problem, is that I need to transform LabVIEW data onto that type of struct.Does anybody have an idea how can I do it?
The previous post is basically correct but one thing catches my eye here and that is the fourth element in the structure which is a function pointer. The LabVIEW system can't really deal with this without quite some involved programming I would not recommend anyone to try without some very good C programming knowledge.
So if the API description doesn't tell you that it is valid to just pass in here a NULL value to disable the callback, writing a wrapper DLL that translates this into a more LabVIEW friendly interface is by far easier to do.
Rolf Kalbermatter
Message Edited by rolfk on 01-11-2007 10:09 AM