Info

此问题已关闭。 请重新打开它进行编辑或回答。

Calling a VC++ 2010 dll in MATLAB 2018b

1 次查看(过去 30 天)
Peter Foerster
Peter Foerster 2018-11-23
关闭: MATLAB Answer Bot 2021-8-20
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!

回答(0 个)

此问题已关闭。

标签

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by