<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159317</link>
    <title>MATLAB Central Newsreader - Single instance application</title>
    <description>Feed for thread: Single instance application</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 14 Nov 2007 20:30:13 -0500</pubDate>
      <title>Single instance application</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159317#401318</link>
      <author>Bruno Luong</author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
I would like to compile and deploy a MATLAB stand-alone&lt;br&gt;
application under Windows that:&lt;br&gt;
&lt;br&gt;
- can be run only with a single instance,&lt;br&gt;
- this unique instance will be brought to the foreground&lt;br&gt;
whenever my application is called (or its associated fileis&lt;br&gt;
clicked by the user),&lt;br&gt;
- Successive command-line inputs must be captured by the&lt;br&gt;
(single) instance (so that appropriate action will be&lt;br&gt;
performed).&lt;br&gt;
&lt;br&gt;
How can I do this?&lt;br&gt;
&lt;br&gt;
Many thanks,&lt;br&gt;
&lt;br&gt;
Bruno Luong&lt;br&gt;
&lt;br&gt;
&amp;nbsp;</description>
    </item>
    <item>
      <pubDate>Sat, 17 Nov 2007 11:19:26 -0500</pubDate>
      <title>Re: Single instance application</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159317#401838</link>
      <author>Bruno Luong</author>
      <description>&quot;Bruno Luong&quot; &amp;lt;brunoluong@yahoo.com&amp;gt; wrote in message &lt;br&gt;
&lt;br&gt;
I have finally managed to create a SIA (single instance&lt;br&gt;
application) of my GUI program. It's not very simple. I have&lt;br&gt;
to write a wrapper program in Visual C that calls my MATLAB&lt;br&gt;
function in the form of DLL-compiled. To check the number of&lt;br&gt;
instances running, I use Mutex (Mutual exclusion) object; to&lt;br&gt;
communicate arguments between two instances I have to use&lt;br&gt;
the message sending and peaking mechanism, after creating a&lt;br&gt;
so called &quot;message-only&quot; window.&lt;br&gt;
&lt;br&gt;
Not sure it is clear, but I manage somehow to make it works.&lt;br&gt;
&lt;br&gt;
Hopefully Mathworks will provide extra tools to do this in&lt;br&gt;
the next version of the compiler.&lt;br&gt;
&lt;br&gt;
Bruno</description>
    </item>
  </channel>
</rss>

