Re: Second instance
- Posted by ghaberek (admin) Dec 04, 2015
- 1795 views
If you're using Win32Lib then you can use setAppName() which will return non-zero if the application name is already in use (i.e. running).
if setAppName("Super Database") != 0 then warnErr("Application is already running") end if
Another option would be to search the list of active processes running on the system for a PID matching your own executable path.
Unfortunately, Euphoria currently lacks a cross-platform library for working with enumerating and controlling processes.
-Greg