Clear Filters
Clear Filters

Parse arguments to DLL file and get the output in .m scripting.

5 views (last 30 days)
I have a dll file which has 2 arguments for inputs and 2 for outputs. My goal is to load this dll in a .m script and use this dll instead of writing the code again.
My question is how to load the dll in .m script.
list down all the steps.

Answers (1)

Biral Pradhan
Biral Pradhan on 30 Aug 2022
I understand you have an external function defined in a .dll file which you want to import in a MATLAB script. I am assuming it is a C library function. MATLAB provides a function named "loadlibrary" which serves this purpose. Kindly follow the following links for better understanding.
  1. https://in.mathworks.com/help/matlab/ref/loadlibrary.html
  2. https://in.mathworks.com/matlabcentral/answers/134510-how-do-i-load-dll-files-with-loadlibrary-function#:~:text=I%20need%20to%20load%20the%20dll%20files%20with,%25%20hfile%20%3D%20fullfile%20%28%27C%3AUsersmojob1DesktopdspADC_Project%27%2C%27wvdll.dll%27%29%3B%20%25%20loadlibrary%20%28%27wvdll%27%2Chfile%29

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!