The IOCTL_GET_HCD_DRIVERKEY_NAME I/O control request retrieves the driver key name in the registry for a USB host controller driver.
IOCTL_GET_HCD_DRIVERKEY_NAME is a user-mode I/O control request. This request targets the USB host controller (GUID_DEVINTERFACE_USB_HOST_CONTROLLER).
Input Buffer Length
The AssociatedIrp.SystemBuffer member specifies the address of a caller-allocated buffer that contains a USB_HCD_DRIVERKEY_NAME structure. On output, this structure holds the driver key name. For more information, see Remarks.
Output Buffer Length
The size of this buffer is specified in the Parameters.DeviceIoControl.OutputBufferLength member.
The USB stack sets Irp->IoStatus.Status to STATUS_SUCCESS if the request is successful. Otherwise, the USB stack sets Status to the appropriate error condition, such as STATUS_INVALID_PARAMETER or STATUS_INSUFFICIENT_RESOURCES.
To get the driver key name in the registry, you must perform the following tasks:
- Declare a variable of the type USB_HCD_DRIVERKEY_NAME.
- Send an IOCTL_GET_HCD_DRIVERKEY_NAME request by specifying the address and size of the variable in the output parameters. On return, the ActualLength member of USB_HCD_DRIVERKEY_NAME contains the length required to allocate a buffer to hold a USB_HCD_DRIVERKEY_NAME that is populated with the driver key name.
- Allocate memory for a buffer to hold a USB_HCD_DRIVERKEY_NAME structure. The size of the buffer must be the received ActualLength value.
- Send an IOCTL_GET_HCD_DRIVERKEY_NAME request by passing a pointer to the allocated buffer and its size in the output parameters. On return, the DriverKeyName member of USB_HCD_DRIVERKEY_NAME is a null-terminated Unicode string that contains the name of the driver key associated with the host controller driver.
|Header||usbioctl.h (include Usbioctl.h)|