can you use mutex?
http://www.google.com/search?q=mutex+instance+delphihttp://www.ibrtses.com/delphi/singleinstance.htmli played with a delphi dde demo some time ago
it created a window with a counter
the second program used dde to connect to the first program
and transferred the count using dde
so the second window was counting in sync with the first
it seemed like a lot of code to do something so simple
linux apps often uses lock files
the first instance of hfs would check to see a file called C:\HFS.LOC exists
if it doesn't, it starts and creates the file
a second instance of hfs would see the lock file, and shut down
when the first instance shuts down, it deletes the lock file
the trouble is, if hfs crashes, the lock file may not be deleted
this happens to linux apps sometimes ... you have to delete the lock file to start the app again