[fpc-pascal] Windows find out if an application already is running
f26p at eircom.net
Wed Mar 18 11:32:29 CET 2009
> 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
> hPrevInst does not work under Win32. It is only for Win16, AFAIK. Use a named
> mutex, as it was given, or a named event. Also, you can find a window created by
> the previous instance by its class name.
There is a technique presented at
It's not in Pascal, but the same technique should work in any language.
More information about the fpc-pascal