Thank you all for the useful info. In view of aforesaid named objects seem to be
the simplest and the most reliable way to pevent running multiple instances af
an application under Win32/
--
Best regards,
Fantomas
___
fpc-pascal maillist - fpc-pascal
En/na leledumbo ha escrit:
Is it the same technique used by
http://wiki.lazarus.freepascal.org/UniqueInstance UniqueInstance ?
No, UniqueInstance uses an IpcServer/IpcClient, so it is cross-platform.
Bye
--
Luca
___
fpc-pascal maillist - fpc-pasc
Is it the same technique used by
http://wiki.lazarus.freepascal.org/UniqueInstance UniqueInstance ?
--
View this message in context:
http://www.nabble.com/Windows-find-out-if-an-application-already-is-running-tp22526930p22577639.html
Sent from the Free Pascal - General mailing list archive at
Fantomas wrote:
Hello, Rainer!
Sunday, March 15, 2009, 10:22:04 PM, you wrote:
I tried system.hprevinst, but this shows always 0.
If there are more copys of the program then hinstance is always the same
value.
hPrevInst does not work under Win32. It is only for Win16, AFAIK. Use a named
m
Hello, Rainer!
Sunday, March 15, 2009, 10:22:04 PM, you wrote:
> I tried system.hprevinst, but this shows always 0.
> If there are more copys of the program then hinstance is always the same
> value.
hPrevInst does not work under Win32. It is only for Win16, AFAIK. Use a named
mutex, as it was
that works with getlasterror = error_already_exists when try to create a
second mutex.
thanks!
Am Sonntag, 15. März 2009 21:00 schrieb dmitry boyarintsev:
> it's better to use named mutexes (supported on all Windows versions)
> to find out if there's another instance of the app running.
>
> do th
it's better to use named mutexes (supported on all Windows versions)
to find out if there's another instance of the app running.
do the following on application start:
- create a named mutex (constant name)
- try to lock the mutex (0 time waiting), if failed then there's
another instance already r
I tried system.hprevinst, but this shows always 0.
If there are more copys of the program then hinstance is always the same
value.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal