Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Driver Kit
Input
Human Input Devices
Reference
 HidD_GetSerialNumberString

  Switch on low bandwidth view
Windows Driver Kit: Human Input Devices
HidD_GetSerialNumberString

The HidD_GetSerialNumberString routine returns the embedded string of a top-level collection that identifies the serial number of the collection's physical device.

BOOLEAN
  HidD_GetSerialNumberString(
    IN HANDLE  HidDeviceObject,
    OUT PVOID  Buffer,
    IN ULONG  BufferLength
    );

Parameters

HidDeviceObject
Specifies an open handle to a top-level collection.
Buffer
Pointer to a caller-allocated buffer that the routine uses to return the requested serial number string. The routine returns a NULL-terminated wide character string.
BufferLength
Specifies the length, in bytes, of a caller-allocated buffer provided at Buffer. If the buffer is not large enough to return the entire NULL-terminated embedded string, the routine returns nothing in the buffer.

Return Value

HidD_GetSerialNumberString returns TRUE if it successfully returns the entire NULL-terminated embedded string. Otherwise, the routine returns FALSE.

Comments

Only user-mode applications can call HidD_GetSerialNumberString. Kernel-mode drivers can use IOCTL_HID_GET_SERIALNUMBER_STRING.

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).

For more information, see HID Concepts, HID Collections, and Operating HID Collections.

Requirements

Headers: Declared in hidsdi.h. Include hidsdi.h.

See Also

HidD_GetManufacturerString, HidD_GetPhysicalDescriptor, HidD_GetProductString, IOCTL_HID_GET_INDEXED_STRING, IOCTL_HID_GET_MANUFACTURER_STRING, IOCTL_HID_GET_PRODUCT_STRING, IOCTL_HID_GET_SERIALNUMBER_STRING


Send feedback on this topic
Built on May 20, 2009
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker