IRP_MJ_QUERY_INFORMATION (Parallel Device)

The IRP_MJ_QUERY_INFORMATION request obtains information about the file that represents the parallel device.

When Sent

A client sends a query information request to determine the file size or current byte offset of the file pointer.

Input Parameters

The Parameters.QueryFile.FileInformationClass member is set to FileStandardInformation or FilePositionInformation.

  • FileStandardInformation request
    The AssociatedIrp.SystemBuffer member points to a FILE_STANDARD_INFORMATION structure that the client allocates for output of file information.

    The Parameters.QueryFile.Length member is set to the size, in bytes, of a FILE_STANDARD_INFORMATION structure.

  • FilePositionInformation request
    AssociatedIrp.SystemBuffer points to a FILE_POSITION_INFORMATION structure that the client allocates for output of file information.

    The Parameters.SetFile.Length member is set to the size, in bytes, of a FILE_POSITION_INFORMATION structure.

Output Parameters

AssociatedIrp.SystemBuffer points to the requested information.

  • FileStandardInformation request type
    Sets the following members in the FILE_STANDARD_INFORMATION structure:

    AllocationSize.QuadPart set to zero.

    EndOfFile is set to the value of the AllocationSize member.

    NumberOfLinks is set to zero.

    DeletePending is set to FALSE.

    Directory is set to FALSE.

  • FilePositionInformation request type
    Sets the CurrentByteOffset.QuadPart member of a FILE_POSITION_INFORMATION structure to zero.

I/O Status Block

If the request succeeds, the Information member is set to the size, in bytes, of the structure associated with the type of request. Otherwise, the Information member is set to zero.

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

  • STATUS_SUCCESS
    The request completed successfully.

  • STATUS_BUFFER_TOO_SMALL
    The size, in bytes, of the structure, specified by the input parameter, is less than the size, in bytes, of the structure associated with the request type.

  • STATUS_DEVICE_REMOVED
    The device has been removed.

  • STATUS_INVALID_PARAMETER
    The specified type of information is not valid.

Operation

The system-supplied bus driver for parallel ports supports queries for the following types of information:

  • FileStandardInformation

  • FilePositionInformation

Requirements

Header

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

See also

IRP_MJ_QUERY_INFORMATION

 

 

Send comments about this topic to Microsoft