Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Single instance application

Subject: Single instance application

From: Bruno Luong

Date: 14 Nov, 2007 20:30:13

Message: 1 of 2


I would like to compile and deploy a MATLAB stand-alone
application under Windows that:

- can be run only with a single instance,
- this unique instance will be brought to the foreground
whenever my application is called (or its associated fileis
clicked by the user),
- Successive command-line inputs must be captured by the
(single) instance (so that appropriate action will be

How can I do this?

Many thanks,

Bruno Luong


Subject: Single instance application

From: Bruno Luong

Date: 17 Nov, 2007 11:19:26

Message: 2 of 2

"Bruno Luong" <> wrote in message

I have finally managed to create a SIA (single instance
application) of my GUI program. It's not very simple. I have
to write a wrapper program in Visual C that calls my MATLAB
function in the form of DLL-compiled. To check the number of
instances running, I use Mutex (Mutual exclusion) object; to
communicate arguments between two instances I have to use
the message sending and peaking mechanism, after creating a
so called "message-only" window.

Not sure it is clear, but I manage somehow to make it works.

Hopefully Mathworks will provide extra tools to do this in
the next version of the compiler.


Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us