次の方法で共有


GetDescriptor method of the CIM_USBDevice class

Retrieves the descriptor for a USB device.

Note

For more information on USB descriptors, see the USB Specification.

Syntax

uint32 GetDescriptor(
  [in]      uint8  RequestType,
  [in]      uint16 RequestValue,
  [in]      uint16 RequestIndex,
  [in, out] uint16 RequestLength,
  [out]     uint8  Buffer[]
);

Parameters

RequestType [in]

A bitmap that identifies the type of descriptor request and the recipient. The type of request can be standard, class or vendor-specific. The recipient may be device, interface, endpoint or other. See the USB Specification for the appropriate values for each bit.

RequestValue [in]

The descriptor type in the high byte, and the descriptor index, in the low byte. See the USB Specification for more information on this parameter.

RequestIndex [in]

The 2 byte language ID code used by the USB device when returning string descriptor data. The parameter is typically "0" for non-string descriptors. Refer to the USB specification for more information.

RequestLength [in, out]

The length, in octets, of the descriptor to return. If this value is less than the actual length of the descriptor, only the requested length is returned. If it is more than the actual length, the actual length is returned.

When this method returns, this parameter contains the length, in octets, of the Buffer parameter. f the requested Descriptor does not exist, the contents of RequestLength are undefined.

Buffer [out]

A buffer that returns the requested descriptor information. If the descriptor does not exist, the contents of the buffer are undefined.

Return value

Returns "0" on success, "1" if the request is not supported. Otherwise, returns a WMI error code.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2016
Namespace
Root\HyperVCluster\v2
Header
Wmcodecdsp.h
MOF
WindowsHyperVCluster.V2.mof
DLL
VMMS.exe

See also

CIM_USBDevice