LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Import CVI instrument driver issue

When I import CVI fp into labview it converts my const char * to int without any warning...
 
For example CVI function:
void my_func(const char *value);
 
Labview conversion:
void my_func(int *value);
 
Any help?
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 1 of 3
(2,714 Views)
Hello Sheetal,
 
I wasn't able to reproduce the problem if I use char * instead of const char * in the function panel.  Were you able to do so?   Either way, when you initially convert your FP to LabVIEW code, you are asked to specify a DLL that contains the code associated with the function panel.  I would double check that the function prototype inside the DLL specified in the 'select a shared library or DLL'. is not set to int *.  When I used char * or const char * in my DLL, LabVIEW convert the parameter to be a CStr data type, which is the same as char *.
 
Thanks
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 3
(2,700 Views)
A new version Import CVI instrument driver tool is here:
https://sine.ni.com/apps/we/nigb.main?code=GB_INFOLVINSTDRIVER
It might solve you problem.

But the tool only get parameter information from FP file, so change the data type on FP file instead of on C file.
The tool is designed for VXIpnp and IVI drivers.  So, use VISA data type in your code instead of the C data type.  For example, use ViChar instead of char.
0 Kudos
Message 3 of 3
(2,616 Views)