Поделиться через


LPDISABLE_DEVICE (Compact 2013)

3/26/2014

This function disables an attached device by disabling the port on the universal serial bus (USB) hub. After the attached device is disabled, it can be optionally re-enabled by the USB host controller.

Syntax

typedef BOOL (* LPDISABLE_DEVICE)(
  USB_HANDLE hDevice ,
  BOOL fResetDevice ,
  UCHAR bInterfaceNumber
);

Parameters

  • hDevice
    [in] Handle to a USB device.
  • fResetDevice
    [in] Optional. If set to TRUE the device will be re-enumerated. If set to FALSE, then user has to physically detach and re-attach the device to get it re-enumerated.
  • bInterfaceNumber
    [in] Interface number being disabled on the device.

Return Value

Returns TRUE if the operation is successful. Otherwise, returns FALSE.

Remarks

For multiple interface devices, if multiple interfaces are activated, the device is only disabled after DisableDevice is called on all active interfaces.

Requirements

Header

usbdi.h

See Also

Reference

USB Driver Functions
LPRESUME_DEVICE
LPSUSPEND_DEVICE