11-06-2003 04:45 PM
11-07-2003 02:36 AM
11-07-2003 09:00 AM
11-07-2003 03:46 PM
04-13-2009 06:35 AM
Hi All,
I have a C based Dll which has 8 functions. One of these function is;
DLLDIR BOOL FSUIPC_ReadAndProcess(DWORD dwOffset, DWORD dwSize, void *pDest, DWORD *pdwResult);
there is void *pDest variable and I have to pass some value in it and after all calculation I will reach calculated result from pDest again. I instantiated void pointer because I can send kind of type (i.e double, int, unsigned int, char, boolean and etc.) So I used automatic import wizard of NI and I have imported my dll functions as kinds of VIs. But there is some problem as you can see from the attached image. Automatic importing wizard instantiated the pDest varible as U32, but this is void * so it can be DBL, U16, .. . . . What should I do in Call Library Function Node to accept all kind of variable type to pass as a void pointer to dll.
Best Regards.
Umit Uzun
06-03-2009 02:47 AM
Hi, Umit. Were you successful?
I'm having a similar problem now. A (black box) dll with lots of functions, many of which have void * x arguments.
I just read this tutorial on C++ and it helped me a lot:
http://www.cplusplus.com/doc/tutorial/pointers/
So as you see, the import wizard is right. void * something is an integer. It is a pointer (=address = integer) to something that has no determined size yet. But it is a pointer and as such a number.
I'll let you know if I succeed.
06-03-2009 03:44 AM
Hi Javier;
Unfortunately I hadn't found any solution about void* and then achieve this operation using same VI in receiving different
type of variable 😞 I know this is not sufficient but it have resolved my problem temproraly. If you would achieve please let
me know.
Regards.