LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll function and change a parameter's value

I must access a DLL developped by VC++ via LV6i with the 'Call Library function'.I only want to use the function to change the parameters' value.The exporting function phototype :
PCI_API int plus(int a,int b)
{
a=123;b=321;
return 0;
}
when I run this VI ,it do work.But the parameter's value after calling is not be changed .Why?
Can someone shed some light on this .Thank in advance.
0 Kudos
Message 1 of 3
(2,722 Views)
Hi sangin,
First, be sure that your function is meant to change those values. Thus, if you have the prototype from DLL source code, parameters' values are not returned (in order to return them, you need ... plus(int* a, int* b). If the prototype is the one you configure when calling the DLL, select "Pointer to value" for PASS option (for a and b).
Second, pay attention to INT because is platform dependent (you can find details in [http://zone.ni.com/devzone/devzoneweb.nsf/Opendoc?openagent&98DA94DCEACECF3F862567CA0055DB5F] ).

Let me know if you need more help ...
... and Happy Holidays!
Message 2 of 3
(2,722 Views)
Thanks a lot.your answer is very helpful to me .Now I have finished my work as you say.happy Holidays !
0 Kudos
Message 3 of 3
(2,722 Views)