Run a compiled app from another app

5 次查看(过去 30 天)
I have a strange situation where I would like two compiled app talk to eachother (on a non matlab computer). I have it working nice where the primary app has a button that when pressed opens the secondary app with:
app.AppHandle = FeedBackControl;
This opens the (not yet compiled) secondary app called 'FeedBackControl' located in the same directory as the primary app. The AppHandle lets the primary app access varables in the secondary app. This is all working great on the computer im useing to develope the code.
Now the problem. When I compile the secondary app it is nolonger a 'FeedBackControl.mlapp' file but a exe. What command from MatLab will open a .exe and return a handle to the app?
I can start the app with the command:
system('C:\...\FeedBackControl.exe&')
but this dosn't return the handle to the app leaving me no way to hand information from the primary app to the secondary.
THANKS
  2 个评论
Garrett Cassidy
Garrett Cassidy 2021-3-23
I just ended up compiling the primary app and including the secondary as a 'File required for yout application'. I also compiled just the secondary app as it has some functionality that works as a stand alone. This all works fine the only draw back is if I make a change to the secondary app, it will not be reflected in any primary apps that use it until I re compiled them.
THanks for the help
Mario Malic
Mario Malic 2021-3-23
编辑:Mario Malic 2021-3-23
I'll remove my answer, however I also thought about another way to transfer the data between your apps and that is through TCP/IP. I have never tried this though, but it should be possible. It's questionable whether the data gathering will be stopped while the data is being sent from the primary app.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 C Shared Library Integration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by