IOCTL_HID_GET_SERIALNUMBER_STRING control code

The IOCTL_HID_GET_SERIALNUMBER_STRING request obtains a top-level collection's embedded string that identifies the device's serial number. The retrieved string is a NULL-terminated wide character string in a human-readable format.

For general information about HIDClass devices, see HID Collections.

Input Parameters

Parameters.DeviceIoControl.OutputBufferLength in the I/O stack location of the IRP indicates the size, in bytes, of the output buffer. If the output buffer is not large enough to hold the entire NULL-terminated embedded string, the request returns nothing in the output buffer. The maximum possible number of characters in an embedded string is device specific. For USB devices, the maximum string length is 126 wide characters (not including the terminating NULL character).

Output Parameters

Irp->MdlAddress points to a buffer to receive the serial number string (a NULL-terminated wide character string).

I/O Status Block

The HID class driver sets the following fields of Irp->IoStatus:

  • Information is set to the number of bytes transferred from the device.

  • Status is set to STATUS_SUCCESS if the transfer completed without error. Otherwise, it is set to an appropriate NTSTATUS error code.

Requirements

Header

Hidclass.h (include Hidclass.h)

See also

HidD_GetIndexedString
HidD_GetManufacturerString
HidD_GetPhysicalDescriptor
HidD_GetProductString
HidD_GetSerialNumberString
IOCTL_HID_GET_INDEXED_STRING
IOCTL_HID_GET_MANUFACTURER_STRING
IOCTL_HID_GET_PRODUCT_STRING

 

 

Send comments about this topic to Microsoft

Show: