共用方式為


Opening and Using a Parallel Device

The system-supplied bus driver for parallel ports enforces exclusive access to a parallel device attached to a parallel port. If a parallel device is open, the parallel port bus driver fails any subsequent IRP_MJ_CREATE requests for the device until the device has been closed. A client must open a parallel device before it sends other I/O requests to the device or calls the parallel device callback routines. A client must not attempt to communicate with a parallel device after the client has closed its file on a device. A client must close a device to allow other clients to access the device.

A client usually does the following:

Note that in a Plug and Play environment, a device can be removed or added whenever there are no open files on it. In general, every time a parallel device is added, Plug and Play assigns a different location and resources.

 

 

Send comments about this topic to Microsoft