How to call .dll functions?

조회 수: 91 (최근 30일)
Saleha Fatema
Saleha Fatema 2019년 1월 4일
편집: Philip Borghesani 2019년 1월 4일
HI,
I am running a code which calls a function of .dll extension file tye. I also have the same function in C. Can anyone please tell me how to do that?
I am attaching the code and necessary function files.

답변 (2개)

Image Analyst
Image Analyst 2019년 1월 4일
Use the MATLAB function loadlibrary().
  댓글 수: 3
Image Analyst
Image Analyst 2019년 1월 4일
You need the h file and the dll file. If you don't have the h file, ask the developer/manufacturer of the DLL.
Saleha Fatema
Saleha Fatema 2019년 1월 4일
The developer mentioned the file as "binary MEX files". To call a MEX file, header is not required, right? According to mathworks just the name of the file, without the file extension is enough.

댓글을 달려면 로그인하십시오.


Philip Borghesani
Philip Borghesani 2019년 1월 4일
편집: Philip Borghesani 2019년 1월 4일
Mex files are normaly called just like other Matlab functions there is no need for loadlibrary. On Windows all mex files are actually dlls but MATLAB has used the extensions mexw32 and mexw64 for many years. 32 bit versions of MATLAB may still recognize .dll files as mex files but no 64 bit copy (R2016a or later) of MATLAB can use one. It is possible that you can simply rebuild this file using the mex command, but this mex file appears to be written in 2001 and last modified in 2006 so I doubt it has been built and tested on 64 bit Windows or with a recent MATLAB, there may be other issues.

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by