cygnusxi / hfm-net

Automatically exported from code.google.com/p/hfm-net
2 stars 0 forks source link

When starting HFM and an instance is already running, restore the already running instance to the screen. #180

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What enhancement are you proposing?

- When double-clicking on the HFM.exe and an instance is already running,
restore the already running instance to the screen in lieu of showing a
text box.  

Watch out for the Mono support on this.  It seems as if Mono doesn't like
"stopping" HFM... and even after the process has died it still reports that
HFM is already running.

What version of the product are you using?

- v0.4.9.154

Original issue reported on code.google.com by harlam357 on 15 Mar 2010 at 10:02

GoogleCodeExporter commented 8 years ago
Looks like a good solution to this issue:
http://www.codeproject.com/KB/threads/SingleInstancingWithIpc.aspx

Original comment by harlam357 on 28 Mar 2010 at 8:59

GoogleCodeExporter commented 8 years ago

Original comment by harlam357 on 25 Apr 2010 at 9:06

GoogleCodeExporter commented 8 years ago
Marked Fixed for Revision 169.

Tested code on Mono 2.4.x development VM, remoting works fine!!! :)  Also fixed 
that
stupid "Mono" problem in the previous "single instance" implementation.  I 
suspect it
had to do with using GC.KeepAlive() on the Mutex instance.  Now using a static 
Mutex
instance and explicitly calling Mutex.ReleaseMutex();

Original comment by harlam357 on 27 Apr 2010 at 2:47