Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <brunoluong@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Single instance application
Date: Sat, 17 Nov 2007 11:19:26 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 17
Message-ID: <fhminu$jog$1@fred.mathworks.com>
References: <fhflsl$dp2$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <brunoluong@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1195298366 20240 172.30.248.37 (17 Nov 2007 11:19:26 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 17 Nov 2007 11:19:26 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1184112
Xref: news.mathworks.com comp.soft-sys.matlab:438082



"Bruno Luong" <brunoluong@yahoo.com> 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.

Bruno