共用方式為


UsbSetupPacket 類別

定義

描述 USB 控制傳輸的設定封包。 如需安裝封包的說明,請參閱通用序列匯流排 (USB) 規格中的表格 9.2。

public ref class UsbSetupPacket sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Usb.IUsbSetupPacketFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class UsbSetupPacket final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Devices.Usb.IUsbSetupPacketFactory, 65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class UsbSetupPacket final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Usb.IUsbSetupPacketFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class UsbSetupPacket
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Devices.Usb.IUsbSetupPacketFactory), 65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class UsbSetupPacket
function UsbSetupPacket(eightByteBuffer)
Public NotInheritable Class UsbSetupPacket
繼承
Object Platform::Object IInspectable UsbSetupPacket
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

建構函式

UsbSetupPacket()

建立 UsbSetupPacket 物件。

UsbSetupPacket(IBuffer)

從格式化緩衝區建立 UsbSetupPacket 物件, (包含安裝封包的八個位元組) 。

屬性

Index

取得或設定 USB 控制項傳輸之安裝封包中的 wIndex 欄位。

Length

取得安裝封包的長度,以位元組為單位。

Request

取得或設定 USB 控制項傳輸之安裝封包中的 bRequest 欄位。

RequestType

取得或設定 USB 控制項傳輸之安裝封包中的 bmRequestType 欄位。 該欄位是由 UsbControlRequestType 物件表示。

Value

取得或設定 USB 控制傳輸之安裝封包中的 wValue 欄位。

適用於