Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!han From: han@Apple.COM (Byron Han, scapegoat) Newsgroups: comp.sys.mac.programmer Subject: Re: RAM serial driver and event handling Message-ID: <10749@goofy.Apple.COM> Date: 17 Oct 90 20:40:32 GMT References: <1990Sep20.143626.23475@midway.uchicago.edu> <10326@goofy.Apple.COM> <1990Sep24.000818.29952@svc.portal.com> Organization: Apple Computer, Inc. Lines: 12 In article <1990Sep24.000818.29952@svc.portal.com> leonardr@svc.portal.com writes: > How would you recommed that you check for 'already open'? I can't >speak for PBOpen, but FSOpen DOES NOT (at least under 6.x) return portInUse >it just goes ahead and opens up the driver AGAIN. Caused big problems when >I updated my old code from the Ram driver since I no longer got portInUse >errors... > Sorry about taking so long to respond, just got back from 3wk vacation... You might want to check the driver unit table and check the driver flags to see if the driver has already been opened... there is a routine in the 7.0 version of the Comm Rsrc Mgr called CRMIsDriverOpen() which does this...