Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

"HOW to use Labview call Dll compiled by VC++"

"hello,I use VC++ compile a DLL,and i want to call DLL Function in LABVIEW program.But there is a dll function
when i call it in labview.There is error.The prototype of Dll Function that make error is "USHORT DLLFUN __stdcall IBWRT(unsigned short dev_address,const char *pstrWrite)",The second paramenter is a char pointer,
and the paramenter pass a command which content is
"MEASURE:CURRENT:DC? 1A,0.001MA".
When i use VC++ to call this function,i program followed:
CString m_wrt;
int ReturnW;
m_wrt="MEASURE:CURRENT:DC? 1A,0.001MA";
char buffer[40];
strcpy(buffer,m_wrt);
ReturnW=IBWRT(4,buffer);
and this call is correct.
But when i use labview to call this function.ther
e is
error.So, who can help me,to tell me how to call this
function.Thanks."
0 Kudos
Message 1 of 4
(4,739 Views)
Duplicate Post. See http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HFORCEKWTID=22237:5&HOID=50650000000800000037370000&HExpertOnly=&UCATEGORY_0=_48_%24_7_&UCATEGORY_S=0
0 Kudos
Message 2 of 4
(4,738 Views)

Hi,

can i able to use the application developed in vc++ to labview?

i have developed the application to read CAN messages from NICAN card using vc++.Now i want to use the information obtained from the ECU through the CAN like temperature using vc++ in Labview.

can i able to do this??

please help me regarding this..

Thanks

Meenatchi

0 Kudos
Message 3 of 4
(4,512 Views)
Are you asking about porting code or calling C++ code in LabVIEW?  As far as porting code, there's no easy way to move code back and forth between LabVIEW and C++.  However, if you are trying to call C++ code in LabVIEW, you can compile it as a DLL and call it in LabVIEW using the Call Library Function node.
Chad B. » National Instruments » ni.com
0 Kudos
Message 4 of 4
(4,495 Views)