Article View: borland.public.cppbuilder.nativeapi
Article #9278Re: mutex won't release
From: Bruce Salzman
Date: Wed, 21 Jul 2004 18:56
Date: Wed, 21 Jul 2004 18:56
16 lines
1307 bytes
1307 bytes
> When I create a mutex through Win32API and release > the mutex later it seems as if the mutex remains around: > The following code : > > HANDLE hMutex = CreateMutex(NULL,true,"1"); > ReleaseMutex(hMutex); // hMutex does not seem to become invalid after > this > hMutex = CreateMutex(NULL,true,"1"); // this gives an error > (GetLastError() Use CloseHandle() to destroy it. ReleaseMutex() just makes it available to be re-aquired. Regards, Bruce
Technical Details
Message-ID:
<40febc43@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40feb982$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,ad55a220cec49a77 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: " Bruce Salzman" <bruce@nospam.org> Newsgroups: borland.public.cppbuilder.nativeapi References: <40feb982$1@newsgroups.borland.com> Subject: Re: mutex won't release Date: Wed, 21 Jul 2004 13:56:02 -0500 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 67.52.3.150 Message-ID: <40febc43@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090436163 67.52.3.150 (21 Jul 2004 11:56:03 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail