🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2923

How to avoid multiple instances of a program in NT and 95?

#2923
From: Alois Buecherl
Date: Mon, 03 Feb 1997 00:00
15 lines
1417 bytes
Hello,
I've been striving for so long now to find a SAVE way to start only one 
instance of my C++ program under Windows NT and 95. As you might recall, this 
used to be that easy in Windows 3.1 using the prevInstance variable. Now this 
option is gone.
I've tried using a semaphore that get's locked when the programm's up. But
it still can happen, that the program starts up more than once when multiple 
prgram spawns occur very rapidly. The program then did not get enough 
startup-time to create and lock the semaphore. 
Is there ANY solution to this problem?

Any hint into a possibly right direction would be greatly appreciated!

Alois
Technical Details
Message-ID: <5d4eeb$n6u$1@euler.space.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1124cf,3403ef0501dd273,start
X-Google-Attributes: gid1124cf,public
X-Google-Thread: 113dfb,3403ef0501dd273,start
X-Google-Attributes: gid113dfb,public
X-Google-Thread: f6ef4,3403ef0501dd273,start
X-Google-Attributes: gidf6ef4,public
X-Google-Thread: 105df1,3403ef0501dd273,start
X-Google-Attributes: gid105df1,public
From: Alois.Buecherl@terraSat.de (Alois Buecherl)
Subject: How to avoid multiple instances of a program in NT and 95?
Date: 1997/02/03
Message-ID: <5d4eeb$n6u$1@euler.space.net>
X-Deja-AN: 214095101
organization: terraSat GmbH
newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32,de.comp.os.ms-windows.programmer,fido.ger.windows.prog,