Article View: comp.sys.mac
Article #1903OpenDriver returns OSErr == 2
From: Charles Halpern
Date: Wed, 26 Jul 1989 05:09
Date: Wed, 26 Jul 1989 05:09
23 lines
1291 bytes
1291 bytes
My trouble is I do like this:
err = OpenDriver ("\p.x10", &driverRefNum);
in THINK C, and err (of type OSErr) comes back 2.
I'm using System 6.0.2 and THINK C 3.02 on an Mac SE.
It should be 0 (== noErr) or perhaps -21, -26, -23, or -22 (badUnitErr,
dInstErr, openErr, or unitEmptyErr) according to Inside Mac II-178.
It should at least be negative (except for 0, +1, or +128) according
to Inside Mac III-205.
When I ignore this anomaly, and go on, everything seems to be working
fine. Specifically, driverRefNum contains the right value. Control
calls to the driver are handled properly (and return noErr). CloseDriver
also returns noErr.
When I change "\p.x10" (a existing resource name) to "\p.xxx" (a resource
that does not exist), OpenDriver returns -43 (fnfErr, file not found). I
think that it should return -26 (dInstErr, couldn't find driver in resource
file).
Is this a bug everyone knows about, or am I alone? What can I do?
Technical Details
Message-ID:
<1989Jul26.010949.7778@jarvis.csri.toronto.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!csri.toronto.edu!halpernShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!csri.toronto.edu!halpern From: halpern@csri.toronto.edu (Charles Halpern) Newsgroups: comp.sys.mac Subject: OpenDriver returns OSErr == 2 Message-ID: <1989Jul26.010949.7778@jarvis.csri.toronto.edu> Organization: University of Toronto, CSRI Date: 26 Jul 89 05:09:49 GMT