Can I call Windows API functions from a MEX file?

I would like to call Windows API functions from a MEX file.

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2009년 6월 27일

0 개 추천

Calling Windows API functions from MEX files has not been tested by MathWorks. Therefore we are not aware of all of the issues that this may cause.
Calling Windows API functions can easily affect the stability of a MATLAB session. Additionally, many Windows API functions require the handle to the window of the running executable process. This handle is not available within MEX files.
You may be able to get some of the functionality from Windows API functions by linking against the Windows API libraries and including the appropriate header files. However, again, this has not been tested and can easily render the MATLAB process unstable.
The Related Solution at the bottom of the page documents how to link against external dynamically linked libraries from a MEX file.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by