🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#2934
From: Doug Stevens
Date: Wed, 05 Feb 1997 00:00
13 lines
1541 bytes
> raymondc@microsoft.com.--- (Raymond Chen) wrote:
> >Create a named event and check if you get ERROR_ALREADY_EXISTS
> >from GetLastError.

Heiner Eichmann wrote:
> What happens if the program crashes before it can release the event?
> It is improbably also possible that a different program uses the same
> name for an event.

If the program crashes, any handles that it holds become abandoned.
If you wait on them, the OS returns a WAIT_ABANDONED value, and
if you try to create them, it will let you.
Technical Details
Message-ID: <32F92848.3714@tek.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <5d4eeb$n6u$1@euler.space.net> <aFwHpCAU3e9yEwa8@ormesci.demon.co.uk> <32f7e6e5.422962@157.55.96.156> <5da29d$bs$2@newsserver.rrzn.uni-hannover.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1124cf,3403ef0501dd273
X-Google-Attributes: gid1124cf,public
X-Google-Thread: f6ef4,3403ef0501dd273
X-Google-Attributes: gidf6ef4,public
X-Google-Thread: 113dfb,3403ef0501dd273
X-Google-Attributes: gid113dfb,public
X-Google-Thread: 105df1,3403ef0501dd273
X-Google-Attributes: gid105df1,public
From: Doug Stevens <Douglas.C.Stevens@tek.com>
Subject: Re: How to avoid multiple instances of a program in NT and 95?
Date: 1997/02/05
Message-ID: <32F92848.3714@tek.com>
X-Deja-AN: 214729535
references: <5d4eeb$n6u$1@euler.space.net> <aFwHpCAU3e9yEwa8@ormesci.demon.co.uk> <32f7e6e5.422962@157.55.96.156> <5da29d$bs$2@newsserver.rrzn.uni-hannover.de>
content-type: text/plain; charset=us-ascii
organization: Tektronix, Inc.
mime-version: 1.0
reply-to: Douglas.C.Stevens@tek.com
newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32,de.comp.os.ms-windows.programmer,fido.ger.windows.prog
x-mailer: Mozilla 3.0 (WinNT; I)