🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: throwing an exception causes crash when exclusive volume locks held.

#16705
From: Remy Lebeau (TeamB)
Date: Wed, 30 Apr 2003 19:36
21 lines
2051 bytes
"Adam G." <gooch411@hotmail.com> wrote in message
news:3eb020e2@newsgroups.borland.com...
> i have a small program, that acquires a logical volume lock,
> via vwin32.vxd, on drive A. it works fine, until i throw an
> exception. as soon as i throw an exception while the locks
> are held.. it crashes.

You say that you have the locks held at the time of the exception, but your
code actually shows that you're trying to release the locks first before
throwing the exception.  Did you verify that your unlock code is correct?
I'm no expert in low-level device access, but it looks like your locking
code supports two different device categories while your unlocking code is
hard-coded to only support one instead.  Microsoft's documentation doesn't
even mention device catagory 0x48 at all, only 0x08.  Where did you find
0x48?  Shouldn't the device category for both locking and unlocking match
each other?  If 0x48 succeeds, you'll then be unlocking with 0x08 instead of
0x48.


Gambit
Technical Details
Message-ID: <3eb0257f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!out.nntp.be!propagator2-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3eb020e2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,734a7aac0e382db6
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-30 12:48:24 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3eb020e2@newsgroups.borland.com>
Subject: Re: throwing an exception causes crash when exclusive volume locks held.
Date: Wed, 30 Apr 2003 12:36:49 -0700
Lines: 23
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: 207.175.226.26
Message-ID: <3eb0257f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1051731327 207.175.226.26 (30 Apr 2003 12:35:27 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!out.nntp.be!propagator2-sterling!news-in.nuthinbutnews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail