EngWinDemo Starts a New Instance?!
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
Ive compiled the engwindemo.cpp example in matlab using:
mex -f "C:\Program Files\Matlab\2013b\bin\win64\mexopts\msvc110engmatopts.bat" engwindemo.c
and I appended -automation and -regserver to my matlab shortcut which I start as administrator. When I click the icon to start matlab, the command window opens. I then run my engwindemo.exe and ANOTHER command window opens, a figure, a dialog, and then they close, leaving me with my origianl command window. Isnt this demo supposed to illustrate the exact opposite behavior? Its supposed to attach to the already open matlab instance! Instead it opens a new one!
I am running Matlab 2013b and Windows 8. My compiler is Visual studio 2012. The compilation in matlab happened without error.
댓글 수: 0
답변 (1개)
Jacob Halbrooks
2014년 2월 28일
I suspect the issue is in trying to have the non-admin privileged engwindemo.exe connect to the admin privileged MATLAB process. Windows may not allow this, and so you get another MATLAB instance. You only need admin privileges to initially register MATLAB as an automation server. After that you should be able to run MATLAB as a normal user with just the -automation flag, and then when you run engwindemo.exe it will connect to that instance.
Alternatively, you can run engwindemo with admin privileges against your current way of running MATLAB, but you should probably run both as normal user instead.
참고 항목
카테고리
Help Center 및 File Exchange에서 Call MATLAB from C에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!