Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!kazim From: kazim@Apple.COM (Alex Kazim) Newsgroups: comp.sys.mac.programmer Subject: Re: cdev question: Why does GetDItem return bad value on closeDev? Summary: Look again... Keywords: Control Panel, cdev Message-ID: <33373@apple.Apple.COM> Date: 21 Jul 89 23:33:50 GMT References: <783@kinetics.UUCP> Organization: Apple Computer Inc, Cupertino, CA Lines: 20 In article <783@kinetics.UUCP> mahboud@kinetics.com (Mahboud Zabetian) writes: > >In macsbug I notice that my DITL list is still pointed to by the Control Panel >window and that my cdev file is still open. So why am I not getting a valid >Handle back from GetDItem? > >mahboud Off the top of my head... I think the first 2 bytes of DITL information is the number of items in the list (zero based). Check to see if your item ID is not greater than this number or you might get a bad handle even if your DITL is there. ========================================================================== Alex Kazim Apple Computer Grunt Programmer's Opinions ==========================================================================