Re: Preventing multiple instance standalone desktop gui applications

From: Kent Yang (kent.yang_at_gmail.com)
Date: 09/28/04


Date: 27 Sep 2004 16:38:38 -0700

Thanks everyone for all the great responses.

My concern with socket approach is that one port will be dedicated to
the application. I know its only one port / resource. The other
concern is that I had socket applications that crash, and because it
wasn't close properly, the socket can not be reused for a little while
(probably because the OS resource not cleanup). So the port gets lock
out until a system restart or until the OS catches up.

The sample example posted by Jean-Francois Briere works great. I owe
you a beer.

It may sound like a strange request for this type of application
feature but there are instances where this is beneficial to very basic
users. Also, precedence have set by applications such as IDE(s),
JBuilder for example. I am guessing they use some native code to
bring up the current running instance.

Thanks again everyone for all the great responses.

Kent



Relevant Pages

  • Re: Preventing multiple instance standalone desktop gui applications
    ... My concern with socket approach is that one port will be dedicated to ... I know its only one port / resource. ... bring up the current running instance. ...
    (comp.lang.java.programmer)
  • Re: How to determine if IPv6 is installed (using VC++ 6.0)
    ... >> don't bother to check that way, and simply open and use IPv6 sockets! ... resource is unavailable, you should ask to be given that resource when you ... will fail if that port is already bound". ... to see if port X is free, and if it is, to bind a socket to that port. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Preventing multiple instance standalone desktop gui applications
    ... I know its only one port / resource. ... > concern is that I had socket applications that crash, ... reusing a server port is never a problem. ...
    (comp.lang.java.gui)
  • Re: Preventing multiple instance standalone desktop gui applications
    ... I know its only one port / resource. ... > concern is that I had socket applications that crash, ... reusing a server port is never a problem. ...
    (comp.lang.java.programmer)
  • Re: Problem with socket
    ... Be aware that those port numbers are part of the IANA-assigned range. ... socket operations on sockets for which there are no handles... ... The result of using comma lists is ... you have used the completely meaningless word "crash" to describe your ...
    (microsoft.public.vc.mfc)