Looking for a way to start twice an application

I have a standalone application running on a Windows/XP platform.I'd like to prohibit a user to start this application if it is already running.Any suggestion will be be welcome (If possible, to be not OS dependent ).Gege
[250 byte] By [martinelligegea] at [2007-10-2 16:50:02]
# 1
Sorry the title of this queston is wrong. It should be Looking for a way to avoid starting twice an application
martinelligegea at 2007-7-13 18:01:33 > top of Java-index,Java Essentials,Java Programming...
# 2
Try to open a socket.Iff it's already in use, another instance of your program must be running.
CeciNEstPasUnProgrammeura at 2007-7-13 18:01:33 > top of Java-index,Java Essentials,Java Programming...
# 3
Some applications try to avoid this by opening a server socket of a specific port, some hold a file lock ... Either solution has its drawbacks.
quittea at 2007-7-13 18:01:33 > top of Java-index,Java Essentials,Java Programming...
# 4
I have defined a server socket and it works fine. Thanks
martinelligegea at 2007-7-13 18:01:33 > top of Java-index,Java Essentials,Java Programming...