🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #14436

Re: MUTEX Objects

#14436
From: Leo Havm�ller
Date: Thu, 14 Aug 2003 05:55
18 lines
1746 bytes
"PaulMac" <machiave@i-stat.com> wrote in message
news:3f3a81c8@newsgroups.borland.com...
> In using MUTEX objects, I came across something unexpected.  Given a
Windows
> GUI app and a Service app, if the same named MUTEX is accessed, both
> applications can acquire it when the other has already done so.  However,
if
> both applications are service apps or both are GUI apps, then the proper
> synchronization occurs.
>
> It has been my understanding that MUTEXes, being kernel objects, are
> "global" to a system.  So, why am I seeing this behavior?

The GUI app lives in a windows station whereas the service does not.
You need to add "Global\" to the mutex name. See "terminal services" under:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createmutex.asp

Leo Havm�ller.
Technical Details
Message-ID: <3f3b244f@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f3a81c8@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,1fbb91fdbd389c0b
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-13 23:09:37 PST
From: "Leo Havm�ller" <leh@-nospam-rtx.dk>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f3a81c8@newsgroups.borland.com>
Subject: Re: MUTEX Objects
Date: Thu, 14 Aug 2003 07:55:28 +0200
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 80.63.27.146
Message-ID: <3f3b244f@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1060840527 80.63.27.146 (13 Aug 2003 22:55:27 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail