The reason why your code doesn't work is you are trying to use a
"thread" mutex. Here is what I use based on the MBS function.
#if TargetWin32
' Create the mutex.
win32AppMutex = new WindowsMutexMBS
' Try to create the mutex to see if any other apps are running
win32AppMutex.Create("your mutext name")
' Does another application exist?
if win32AppMutex.Lasterror <> 0 then
' Kill the application.
quit
end if
#endif
_______________________________________________
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>