MATLAB Answers

How to get the return value of a c++ function from a .dll in matlab?

3 views (last 30 days)
Marcus Heeg
Marcus Heeg on 8 Oct 2019
Edited: Marcus Heeg on 8 Oct 2019
I want to execute a function from a .dll file in matlab. I got this part of the code running:
addpath('C:\Program Files (x86)\Measurement Computing\DAQ')
if not(libisloaded('mccLib'))
calllib('mccLib','cbFlashLED',0); % LED flashing is working!
Now I want to execute another function with a return value.
The function doc of the .dll in c++ says:
int functionName(arg1,agr2, float *ReturnValue)
And for Visual Basic
Function functionName(arg1&, arg2&, ReturnValue!) As Long
I tried:
Error using calllib
No method with matching signature.
Is there a way to get the return value in matlab?
Thanks a lot


Sign in to comment.

Answers (0)

Sign in to answer this question.