Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!samsung!noose.ecn.purdue.edu!news From: moyman@ecn.purdue.edu (James M Moya) Newsgroups: comp.sys.mac.programmer Subject: Calling "OpenDriver" from LightSpeed C Message-ID: <1990Aug17.215833.15273@ecn.purdue.edu> Date: 17 Aug 90 21:58:33 GMT Sender: news@ecn.purdue.edu (USENET news) Organization: Purdue University Engineering Computer Network Lines: 21 This is interesting. I wrote a simple Device Driver from LSC that simply does a SysBeep every 2 seconds. I select the "Build Device Driver" menu item. I then attach the resources created to an application that just calls "Open Driver". Here is the interesting part: If the DRVR resource is 0 then everything works fine, you get a SysBeep every 2 seconds. If you use an DRVR ID inside the IM range 0-31 other than zero, the driver starts up but nothing else (the driver Open routine gets called but nothing else). If you use a number > 31 I get a -21 error returned from the OpenDriver call. Something seems very wrong. I figured OpenDriver would select a free unit number and assign the refnumber accordingly, it doesn't, It always uses the DRVR resource ID whether it's being used or not. I have looked at several DRVR resource in my system, all use numbers like 63, 124, etc... (>31)??? Am I missing something?? Also, shouldn't the driver continue to run until I call a CloseDriver?? This isn't the case either, It only runs until I quit the application that called the OpenDriver...Maybe this behavior is from running the app within the LSC debugger...Any ideas Mike Moya Engineering Computer Network Purdue University