lots of programs look at process lists. If that's all your anti virus triggers on, in order to catch a virus, you should invest in a new one.
Thanks, Tyler Littlefield Web: tysdomain.com email: [email protected] My programs don't have bugs, they're called randomly added features. ----- Original Message ----- From: Tamas Marki To: [email protected] Sent: Wednesday, March 18, 2009 4:08 PM Subject: Re: [c-prog] How to load only one instance in Windows startup? On Wed, Mar 18, 2009 at 10:59 PM, Tyler Littlefield <[email protected]> wrote: >> How to be loaded only a single instance of my program in memory when >> Windows >> starts? > > You need to use a named mutex. It's been quite a while since I've done > this, but the idea is that you create a named mutex, and check if it > already exists. If so, there is already a running instance of your > program, and you exit the current instance. > Do a little googling on "named mutex" for win32, you'll probably find > something helpful. > why would you need a mutex? just check through the process list. It is a lot simpler, and probably won't trigger heuristics in antivirus programs (why would your program want to look at the process list)? I agree that in Unix-like operating systems it would be the way to go, but in Windows it's easier, cleaner, simpler. -- Tamas Marki [Non-text portions of this message have been removed]
