[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

Each opendevice() must eventually be matched by a call to closedevice().

All I/O requests must be complete before closedevice().  if any requests
are still pending, abort them with abortio().

   AbortIO(PrintIO);  /* Ask device to abort request, if pending */
   WaitIO(PrintIO);   /* Wait for abort, then clean up */

   CloseDevice((struct IORequest *)PrintIO);

   Use abortio() / waitio() intelligently.
   -------------------------------------
   Only call AbortIO()/WaitIO() for requests which have already been
   sent to the printer device.  Using the AbortIO()/WaitIO() sequence on
   requests which have not been sent results in a hung condition.