Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

Calling a VC++ 2010 dll in MATLAB 2018b

1 view (last 30 days)
Peter Foerster
Peter Foerster on 23 Nov 2018
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello everyone,
I am trying to call functions from a dll that was compiled in VC++ 2010 from MATALB 2018. I know, that 2010 is not supported in 2018, so my question aims in a slightly different direction.
I developed the function calls, to the best of my knowledge, using loadlibrary and then the calllib function. What is a bit strange is that I can execute some functions just fine. These are simpler functions that Connect, Disconnect and send SCPI commands. However when I get to the 'real' functions that acquire data, it doesn't work as well, meaning, they run very sporadically, about 1 out of 100 executions is a success. Because of that long interval I have not yet found any regularity to this behavior.
I have, however tested my scripts in R2014b and found that they work every time. This makes sense, as VC++ 2010 is supported in R2014b.
Accordingly, my questions are:
Why does it work at all? More specifically, why do the data acquisition functions works sporadically? I get, that there might be differences in memory allocation or any number of things that can and will go wrong with a call like that, but why does it even work in the cases it does?
What do we need to do to run this under MATLAB 2018b?
We tried downloading VS2017 and Windows SDK 10 and compiled with that, but there was no change in behavior. What needs to be the setup, to compile it correctly for R2018b.
Thanks for your help!

Answers (0)

This question is closed.

Tags

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!