Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IOCTL_USBPRINT_GET_LPT_STATUS control code

The IOCTL_USBPRINT_GET_LPT_STATUS request allows upper-layer software (such as a language monitor), to request and obtain the printer status byte from a USB printer.

Input Buffer

Not used in this operation; set this parameter to NULL. A pointer to a UCHAR input buffer.

Input Buffer Length

Not used in this operation; set this parameter to 0. The size of the input buffer, in bytes.

Output Buffer

A pointer to the output buffer, which consists of UCHAR data. On success this buffer holds the following: a two-byte prefix that specifies the size, in bytes, of the device's IEEE 1284 device ID; the device ID; and a null terminator. An IEEE 1284 device ID can be up to 64 KB in size. On failure, if GetLastError returns the error code ERROR_FILE_NOT_FOUND, this buffer contains the value BATTERY_TAG_INVALID.

Output Buffer Length

The size of the output buffer, in bytes.

Status block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful. Otherwise, Status to the appropriate error condition as a NTSTATUS code.

Remarks

To retrieve a handle to the device, you must call the CreateFile function with either the name of a device or the name of the driver associated with a device. To specify a device name, use the following format:

\\.\DeviceName

DeviceIoControl can accept a handle to a specific device. For example, to open a handle to the logical drive A: with CreateFile, specify \\.\a:. Alternatively, you can use the names \\.\PhysicalDrive0, \\.\PhysicalDrive1, and so on, to open handles to the physical drives on a system.

Requirements

Header

Usbprint.h

See also

Creating IOCTL Requests in Drivers
WdfIoTargetSendInternalIoctlOthersSynchronously
WdfIoTargetSendInternalIoctlSynchronously
WdfIoTargetSendIoctlSynchronously

 

 

Send comments about this topic to Microsoft

Show: