🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#2933
From: Chris Becke
Date: Wed, 05 Feb 1997 00:00
20 lines
1438 bytes

Sean Kennedy <skennedy@ecs.fullerton.edu> wrote in article
<32f6d5ca.86355796@news.ecs.fullerton.edu>...
> On Mon, 03 Feb 97 10:24:56 GMT, Alois.Buecherl@terraSat.de (Alois
> Buecherl) wrote:
> 
> A terrible hack could be upon startup immediately create a file in the
> %TEMP% directory.  If the create function returns a 'File exists'
> return, otherwise, continue.  

Or worse, make a small initialized data section, mark it as "Shared", and
put a refrence counter in it =0;

First app increment to 1; and instance check counter and abort if >= 1

Chris.
-- 
chris@dbn.lia.net
<http://www.dbn.lia.net/users/chris>
Technical Details
Message-ID: <01bc13b5$53f36680$1f231bc4@ariel.dbn.lia.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <5d4eeb$n6u$1@euler.space.net> <32f6d5ca.86355796@news.ecs.fullerton.edu>

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: 105df1,3403ef0501dd273
X-Google-Attributes: gid105df1,public
X-Google-Thread: 113dfb,3403ef0501dd273
X-Google-Attributes: gid113dfb,public
From: "Chris Becke" <chris@dbn.lia.net>
Subject: Re: How to avoid multiple instances of a program in NT and 95?
Date: 1997/02/05
Message-ID: <01bc13b5$53f36680$1f231bc4@ariel.dbn.lia.net>
X-Deja-AN: 214710016
references: <5d4eeb$n6u$1@euler.space.net> <32f6d5ca.86355796@news.ecs.fullerton.edu>
newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.win32,de.comp.os.ms-windows.programmer,fido.ger.windows.prog