// ntddpar.h
// CTL_CODE(0x0016, 0x016, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_PAR_QUERY_LOCATION 0x00160058
View the official Windows Driver Kit DDI referenceNo description available.
The IOCTL_PAR_QUERY_LOCATION request returns the "LPTn" or "LPTn.m" symbolic link name associated with a parallel device. This request is only supported by Windows XP and later.
For more information, see Device Stacks for ParallelPorts and Devices and Parallel Device Interfaces, Internal Names, and Symbolic Links.
The client sets the AssociatedIrp.SystemBuffer member to a pointer to a character buffer for the location information.
The length of the character buffer.
The parallel port bus driver outputs the location information in the buffer pointed to by AssociatedIrp.SystemBuffer as a NULL-terminated character string.
The client sets the Parameters.DeviceIoControl.OutputBufferLength member to the length of the output buffer that the system-supplied bus driver for parallel ports uses to output the device location information.
If the request succeeds, the Information member is set to the length, in bytes, of the symbolic link name plus the NULL terminator. Otherwise, Information is set to zero.
The Status member is set to one of the generic status values returned by device control requests for parallel devices or to the following value:
STATUS_BUFFER_TOO_SMALL
The Parameters.DeviceIoControl.OutputBufferLength member is less than size, in bytes, of the location information and the NULL terminator.