// usbprint.h
// CTL_CODE(0x0022, 0x00d, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_USBPRINT_GET_1284_ID 0x00220034
View the official Windows Driver Kit DDI referenceNo description available.
The IOCTL_USBPRINT_GET_1284_ID control code allows upper-layer software (such as a language monitor), to request and obtain the printer's IEEE 1284 device ID string.
Not used in this operation; set this parameter to NULL.
Not used in this operation; set this parameter to 0.
The output buffer will contain UCHAR data. On success this buffer can hold 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 STATUS_BUFFER_TOO_SMALL, the output buffer was not large enough to hold the data intended for it.
The output buffer must be large enough to contain a two-byte quantity holding the length of the device's IEEE 1284 device ID, the device ID (up to 64 KB in size), and a terminating null.
The IOCTL_USBPRINT_GET_1284_ID output buffer length is placed directly into the USB packet. On some USB print devices, using the maximum 65535 bytes can cause the call to fail with error 23. Reduce the buffer to 4094 bytes or less to resolve this issue.
Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful. Otherwise, Status to the appropriate error condition as a NTSTATUS code.
Creating IOCTL Requests in Drivers
WdfIoTargetSendInternalIoctlOthersSynchronously
WdfIoTargetSendInternalIoctlSynchronously
WdfIoTargetSendIoctlSynchronously