Article View: borland.public.cppbuilder.nativeapi
Article #15291Re: Mutex and WaitForSingleObject Problem...
From: Remy Lebeau (TeamB)
Date: Tue, 15 Jul 2003 17:43
Date: Tue, 15 Jul 2003 17:43
17 lines
1663 bytes
1663 bytes
"Colin Maharaj" <cbm@cablenett.net> wrote in message news:3F13D446.FE380393@cablenett.net... > Finally, the app that creates the file will have to be the initial > owner, and the consumer, the > one to request access but not ownership. Then just use CreateMutex() in the producer and OpenMutex() in the consumer, don't use CreateMutex() in the consumer at all. That way, it can test whether the producer is even available before attempting to request access to the file. BTW, you do know that you can lock a file directly, don't you? Gambit
Technical Details
Message-ID:
<3f143c01$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3F135784.B6BE9C00@cablenett.net> <3f136552$1@newsgroups.borland.com> <3F13D446.FE380393@cablenett.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,4b66d79a94ed9589 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-15 10:42:26 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3F135784.B6BE9C00@cablenett.net> <3f136552$1@newsgroups.borland.com> <3F13D446.FE380393@cablenett.net> Subject: Re: Mutex and WaitForSingleObject Problem... Date: Tue, 15 Jul 2003 10:43:20 -0700 Lines: 19 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.1106 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3f143c01$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1058290689 207.175.226.26 (15 Jul 2003 10:38:09 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.tpinternet.pl!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail