Accessing a dll from outside of Matlab, using visual studio and c++
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to write an application that will allow me to access a dll from outside of Matlab.
Previously in Matlab I have tried:
>>loadlibrary('Wintab32', 'WINTAB'), but have had no luck accessing the dll file (may have been due to issues with 16bit and 32 bits in files).
A helpful suggestion was to use the DLL outside of Matlab by writing an application in c++ that will call on the DLL.
I am trying to use Microsoft Visual Studio (as a beginner) and learn C++, but it's hard to know where to begin. Can anyone give any helpful suggestions to how I can go about creating the application, or suggest a basic outline of an algorithm that can be implemented to do the above?
0 Commenti
Risposta accettata
Kaustubha Govind
il 16 Feb 2012
What you're asking is not really a MATLAB/Simulink-related question (although I understand that you need to do this to be able to load your "wrapper" DLL in MATLAB), so this may not be the right forum to ask this question. At any rate, I did a web search and found this: http://www.codeguru.com/cpp/cpp/cpp_mfc/tutorials/article.php/c9855
In general, you will need to write C++ code that uses the functions LoadLibrary, GetProcAddress and FreeLibrary.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su C Shared Library Integration in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!