IRP_MJ_CREATE (Parallel Device)

The IRP_MJ_CREATE request opens a parallel device.

When Sent

A client must use an IRP_MJ_CREATE request to open a parallel device before it can access the device.

Input Parameters

None.

Output Parameters

None.

I/O Status Block

The Information member is set to zero.

The Status member is set to one of the following values:

  • STATUS_SUCCESS
    The device was opened successfully.

  • STATUS_ACCESS_DENIED
    The device is already open.

  • STATUS_DELETE_PENDING
    The device is in a Plug and Play surprised-removed state.

  • STATUS_DEVICE_REMOVED
    The device has been removed.

  • STATUS_INVALID_DEVICE_REQUEST
    There is no hardware present.

  • STATUS_NOT_A_DIRECTORY
    The device is not a directory.

Operation

A parallel device is an exclusive device. If a parallel device is open, the system-supplied bus driver for parallel ports 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.

For more information, see Opening and Using a Parallel Device.

Requirements

Header

Wdm.h (include Wdm.h or Ntddk.h)

See also

IRP_MJ_CREATE

 

 

Send comments about this topic to Microsoft