Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!ucsd!pacbell.com!pacbell!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: how do i start a device driver from an INIT? Message-ID: <20247@well.sf.ca.us> Date: 13 Sep 90 04:37:41 GMT References: <4959@cica.cica.indiana.edu> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 25 In article <4959@cica.cica.indiana.edu> ssw@cica.cica.indiana.edu (Steve Wallace) writes: _>I want to start a device driver from an INIT( or an application). I _>created a simple device driver, for testing, loaded it into the _>resource file of an application. The application then called the _>device driver with the OpenDriver command using the device driver name _>preceeded by '.'. I receive the error -37 (bdNameErr). What am I doing _>wrong? 1.) The name of the device driver should already start with a '.'. You call OpenDriver with the name, as a pascal string, exactly as it stands. 2.) You'll need to renumber your driver to a free slot in the unit table. See the tech note on doing this. 3.) If you don't DetachResource() your driver, it will be deallocated when your INIT or Application returns. If it is still receiving interrupts after its been deallocated, the machine will crash. 4.) If your driver allocates big buffers, you may need a sysz resource to make the system expand the system heap before trying to run your driver. -- -- David Phillip Oster - Note new signature. Old one has gone Bye Bye. -- oster@well.sf.ca.us = {backbone}!well!oster