On Windows you use a mutex (see the Windows Functionality Library) to
detect that a mutex already exists (basically a flag saying "I'm
already running") and then hand it off to the other instance (that I'm
not sure how you do ....)
Sorta. You make a named mutex which is a system-wide object that any
application can access. You then obtain the mutex (much the same way
you would Enter a critical section or Signal a semaphore). If you
aren't able to obtain a lock on the mutex, then you know some other
instance of your application is running on the same machine. There's
no hand-off involved -- it's just another type of locking mechanism.
And yes, the Windows Functionality Suite does have an OS mutex class in
there, as well as example code on how to do exactly what you're looking
for.
HTH!
~Aaron
--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|