From: Manish Khemani on 26 Apr 2010 18:15 Hello, I am calling a dll using calllib. Here is the sample code: calllib('Library_name','tmain',inp_cmd); the C++ function header is defined as: __declspec(dllexport) double tmain(char* s) { return x; } In the above case I am returning one value. I now have to return multiple values so the C++ function is modified as: __declspec(dllexport) int tmain(char* s, double*x, double*y) { x=a+b; y=c+d; } How does MATLAB support call by reference? How will calllib work in this case? Or is there any other way? Thanks.
From: Steven Lord on 27 Apr 2010 10:13 "Manish Khemani" <khemani_manish(a)yahoo.com> wrote in message news:hr5399$oaq$1(a)fred.mathworks.com... > Hello, > > I am calling a dll using calllib. Here is the sample code: > calllib('Library_name','tmain',inp_cmd); > > the C++ function header is defined as: > __declspec(dllexport) double tmain(char* s) { > return x; > } > > In the above case I am returning one value. I now have to return multiple > values so the C++ function is modified as: > __declspec(dllexport) int tmain(char* s, double*x, double*y) > { > x=a+b; > y=c+d; > } > How does MATLAB support call by reference? How will calllib work in this > case? Or is there any other way? http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_external/f42650.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|
Pages: 1 Prev: Question about bwmorph(BW,'dilate',n) and imdilate(BW,SE) Next: solving system of equations |