亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? usbinterface.bas

?? vb6.0 訪問USB HID設備的示例代碼和通用模塊文件
?? BAS
字號:
Attribute VB_Name = "USBdefinitions"
'
'   Declare all of the USB Data Structures
'
'   Note that most of these Data Structures MUST be defined a BYTES.
'   This prevents Visual Basic "helpfully" aligning variables on their natural byte boundaries.
'   Little Endian is assumed. ie If Byte(3)= Long,  Then byte(0) = LSB
'
Public Type UNameType: Length As Long: UnicodeName(256) As Byte: End Type
Public Type UNodeType: ConnectionIndex As Long: Length As Long: UnicodeName(256) As Byte: End Type

Public Type SetupPacket
    RequestType As Byte: Request As Byte: wValueLo As Byte: wValueHi As Byte: wIndex As Integer: wLength As Integer: End Type

Public Type DescriptorRequest
    ConnectionIndex As Long: PacketData As SetupPacket: ConfigurationDescriptor(2000) As Byte: End Type
    
Public Type DeviceDescriptor
     Contents(17) As Byte: End Type
' Defined as a Byte Array to make later data movement simpler
'    Length As Byte:    DescriptorType As Byte:    USBSpec(1) As Byte:    Class As Byte
'    SubClass As Byte:  Protocol As Byte:          MaxEP0Size As Byte:    VendorID(1) As Byte
'    ProductID(1) As Byte:       DeviceRevision(1) As Byte:       ManufacturerStringIndex As Byte
'    ProductStringIndex As Byte: SerialNumberStringIndex As Byte: ConfigurationCount As Byte: End Type

Public Type HubDescriptor
    Length As Byte:       HubType As Byte:    PortCount As Byte:     Characteristics(1) As Byte
    PowerOn2Good As Byte: MaxCurrent As Byte: PowerMask(63) As Byte: End Type

Public Type EndPointDescriptor
    Length As Byte:     DescriptorType As Byte:   EndpointAddress As Byte
    Attributes As Byte: MaxPacketSize(1) As Byte: PollingInterval As Byte: End Type

Public Type NodeInformation
    NodeType As Long: NodeDescriptor As HubDescriptor: HubIsBusPowered As Byte: End Type

Public Type NodeConnectionInformation
    ConnectionIndex As Long: ThisDevice As DeviceDescriptor: CurrentConfiguration As Byte
    LowSpeed As Byte: DeviceIsHub As Byte: DeviceAddress(1) As Byte: NumberOfOpenEndPoints(3) As Byte
    ThisConnectionStatus(3) As Byte: MyEndPoints(29) As EndPointDescriptor: End Type

'   I keep all of the IO Device information I collect in a big table
'   Most USB installations will only fill part of this table
Public Type CollectedDeviceData
    DeviceType As Long: DeviceHandle As Long: ConnectionData As NodeConnectionInformation
    NodeData As NodeInformation: End Type
Public DeviceData(200) As CollectedDeviceData
'
'   All Descriptors are concatenated here once a device is selected
Public DescriptorData(2000) As Byte
'
'   I need to send Requests to USB devices
Public PCHostRequest As DescriptorRequest
'
Public ConnectionStatus(6) As String
'
'   Declare my support sub-routines
Public Function DataIndex()
' All writes to the DeviceData table are done to entry DataIndex
' Need to keep DeviceData and IODevice_Display in sync
DataIndex = Collect_Data.Device_Display.ListCount
End Function
Public Function OpenConnection(Name$)
Dim SA As Security_Attributes
Handle& = CreateFile("\\.\" & Name$, &HC0000000, 3, SA, 3, 0, 0)
If Handle& = 0 Then ErrorExit ("Could not open a connection to " & Name$)
OpenConnection = Handle&
End Function
Public Sub GetNodeInformation(Handle&)
'   Get the node information
Dim BytesReturned&, Status&
Status& = DeviceIoControl(Handle&, &H220408, DeviceData(DataIndex).NodeData.NodeType, 256, DeviceData(DataIndex).NodeData.NodeType, 256, BytesReturned&, 0)
If Status& = 0 Then ErrorExit ("Could not get node information")
If BytesReturned& > 256 Then ErrorExit ("DeviceIOControl returned >256 bytes of data")
End Sub
Public Sub GetNodeConnectionData(Handle&, PortIndex&)
Dim BytesReturned&, Status&
DeviceData(DataIndex).ConnectionData.ConnectionIndex = PortIndex&
Status& = DeviceIoControl(Handle&, &H22040C, DeviceData(DataIndex).ConnectionData.ConnectionIndex, 256, DeviceData(DataIndex).ConnectionData.ConnectionIndex, 256, BytesReturned&, 0)
If Status& = 0 Then ErrorExit ("Could not get Node Connection Data")
If BytesReturned& > 256 Then ErrorExit ("DeviceIOControl returned >256 bytes of data")
End Sub
Function GetNameOf$(DeviceName$, DeviceHandle&, API_ID&)
Dim NameBuffer As UNameType
'
'   First need to get the length of the name string
Status& = DeviceIoControl(DeviceHandle&, API_ID&, 0, 0, NameBuffer.Length, 260, BytesReturned&, 0)
If Status& = 0 Then ErrorExit ("Could not get LENGTH of " & DeviceName$ & " Name")
If NameBuffer.Length > 256 Then ErrorExit (Name$ & " Name > 256 Characters")
'
'   . . . and then the string. It will be returned in UNICODE format
Status& = DeviceIoControl(DeviceHandle&, API_ID&, NameBuffer.Length, NameBuffer.Length, NameBuffer.Length, NameBuffer.Length, BytesReturned&, 0)
If Status& = 0 Then ErrorExit ("Could not get TEXT of " & DeviceName$ & " Name")
temp$ = "": i = 0   'A simple unicode to basic string conversion
Do While NameBuffer.UnicodeName(i) <> 0: temp$ = temp$ & Chr(NameBuffer.UnicodeName(i)): i = i + 2: Loop
GetNameOf$ = temp$ 'StrConv(NameBuffer.Length, vbFromUnicode)
End Function
Function GetExternalHubName$(ConnectionIndex&, DeviceHandle&)
Dim NameBuffer As UNodeType
'
'   First need to get the length of the name string
NameBuffer.ConnectionIndex = ConnectionIndex
Status& = DeviceIoControl(DeviceHandle&, &H220414, NameBuffer.ConnectionIndex, 260, NameBuffer.ConnectionIndex, 260, BytesReturned&, CNull)
If Status& = 0 Then ErrorExit ("Could not get LENGTH of External Hub Name")
If NameBuffer.Length > 256 Then ErrorExit ("External Hub Name > 256 Characters")
'
'   . . . and then the string. It will be returned in UNICODE format
NameBuffer.ConnectionIndex = ConnectionIndex
Status& = DeviceIoControl(DeviceHandle&, &H220414, NameBuffer.ConnectionIndex, NameBuffer.Length, NameBuffer.ConnectionIndex, NameBuffer.Length, BytesReturned&, 0)
If Status& = 0 Then ErrorExit ("Could not get TEXT of External Hub Name")
temp$ = "": i = 0
Do While NameBuffer.UnicodeName(i) <> 0: temp$ = temp$ & Chr(NameBuffer.UnicodeName(i)): i = i + 2: Loop
GetExternalHubName$ = temp$
End Function

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品乱码久久久久| 国产在线观看一区二区| 中文字幕免费观看一区| 91久久精品日日躁夜夜躁欧美| 久久99精品国产.久久久久久 | 亚洲综合自拍偷拍| 国产婷婷色一区二区三区 | 91搞黄在线观看| 一本色道a无线码一区v| 国产尤物一区二区| 日本系列欧美系列| 丝袜美腿高跟呻吟高潮一区| 亚洲欧美日韩在线| 最新不卡av在线| 亚洲激情图片小说视频| 香蕉久久夜色精品国产使用方法| 午夜视频一区在线观看| 中文字幕一区av| 欧美理论在线播放| 欧美福利视频导航| 国产精品国产自产拍在线| 亚洲永久精品国产| 亚洲午夜免费电影| 亚洲视频每日更新| 亚洲国产另类精品专区| 亚洲综合在线免费观看| 亚洲国产wwwccc36天堂| 激情深爱一区二区| 毛片av一区二区| 蜜臀av一区二区三区| 国产精品资源在线观看| 麻豆国产91在线播放| 麻豆成人综合网| 国产在线看一区| 国产亚洲欧美激情| 国产欧美日韩在线看| 亚洲小说春色综合另类电影| 国产一区二区在线看| 色综合色综合色综合色综合色综合| 欧美精品免费视频| 亚洲三级免费观看| 蜜桃av一区二区| 日本精品视频一区二区| 91精品国产手机| 亚洲免费观看高清完整版在线观看 | 色综合天天狠狠| 久久综合99re88久久爱| 国产精品久久久久久久久免费桃花| 一区二区三区在线视频播放| a在线欧美一区| 欧美激情综合网| 成人97人人超碰人人99| 国产精品丝袜久久久久久app| 国产馆精品极品| 国产日产精品1区| 国产资源在线一区| 欧美一级理论片| 蜜臀av国产精品久久久久 | 久久久久综合网| 久久精品国产精品亚洲红杏| 欧美伦理影视网| 日韩精品一区第一页| 欧美日韩精品一区二区在线播放| 亚洲免费在线看| 在线亚洲精品福利网址导航| 亚洲精品乱码久久久久久黑人| 99久久99久久综合| 亚洲欧洲精品一区二区三区| 波多野结衣的一区二区三区| 中文字幕av资源一区| 99久久伊人精品| 亚洲一区二区黄色| 91精品中文字幕一区二区三区| 日本中文在线一区| 久久欧美一区二区| 成人免费视频一区二区| 最新国产の精品合集bt伙计| 在线观看精品一区| 精品午夜久久福利影院| 国产女人18水真多18精品一级做| 国产v日产∨综合v精品视频| 综合久久久久久| 欧美精品 日韩| 国产成人一区二区精品非洲| 亚洲人成伊人成综合网小说| 6080日韩午夜伦伦午夜伦| 日韩黄色免费电影| 国产亚洲人成网站| 欧美精品乱码久久久久久| 国产真实乱偷精品视频免| 1024精品合集| 日韩一区二区不卡| 91蜜桃免费观看视频| 看电视剧不卡顿的网站| 一区二区三区中文免费| 精品日韩欧美在线| 欧美日韩黄色影视| 国产成人免费视频| 青青草原综合久久大伊人精品| 中文字幕精品在线不卡| 日韩欧美第一区| 精品视频在线免费| 91啪在线观看| 风间由美性色一区二区三区| 视频一区视频二区中文| 亚洲欧美另类图片小说| 久久综合一区二区| 制服视频三区第一页精品| www.成人网.com| 成人午夜在线视频| 国产精品一级片| 国模娜娜一区二区三区| 亚洲777理论| 日本欧美韩国一区三区| 天天综合网天天综合色| 天堂一区二区在线| 亚洲国产精品一区二区尤物区| 欧美国产禁国产网站cc| 久久久激情视频| 精品日韩av一区二区| 日韩一区二区在线看片| 色婷婷一区二区三区四区| 欧美在线一区二区| 欧美久久一区二区| 欧美在线你懂得| 欧美一区二区三区在线电影| 9191精品国产综合久久久久久| 91福利视频在线| 8x福利精品第一导航| 69p69国产精品| 国产亚洲欧洲一区高清在线观看| 久久精品男人天堂av| 精品欧美一区二区久久| 欧美日韩国产色站一区二区三区| 在线观看亚洲a| 日韩欧美国产三级| 亚洲日本一区二区| 秋霞电影一区二区| 成人丝袜18视频在线观看| 在线观看一区日韩| 国产亚洲综合性久久久影院| 亚洲伦理在线免费看| 狂野欧美性猛交blacked| 91麻豆国产香蕉久久精品| 日韩一级黄色大片| 亚洲欧美日本在线| 久久91精品国产91久久小草| 91久久一区二区| 国产精品美女久久久久高潮| 久久精品国产成人一区二区三区| 日韩电影在线看| 国产一区二区三区电影在线观看| 调教+趴+乳夹+国产+精品| 成人免费高清在线观看| 一区在线播放视频| 91麻豆成人久久精品二区三区| 樱桃视频在线观看一区| 欧美三区在线视频| 亚洲777理论| 91精品国产一区二区三区| 日日摸夜夜添夜夜添国产精品 | 精品成人在线观看| 国产成人在线视频网站| 欧美—级在线免费片| 风间由美一区二区三区在线观看| 国产欧美va欧美不卡在线| 国产激情一区二区三区四区| 国产无一区二区| 成人深夜视频在线观看| 国产精品天天看| 色综合天天性综合| 日韩精品91亚洲二区在线观看| 欧美性高清videossexo| 亚洲一区二区三区激情| 日韩一级片在线观看| 国产激情一区二区三区四区| 亚洲夂夂婷婷色拍ww47 | 一区二区三区丝袜| 欧美mv和日韩mv国产网站| 粉嫩嫩av羞羞动漫久久久| 亚洲综合色自拍一区| 91成人国产精品| 久久国产精品无码网站| 亚洲视频一二区| 91麻豆精品国产91久久久资源速度| 美女在线观看视频一区二区| 国产精品久久久久久久第一福利 | 亚洲宅男天堂在线观看无病毒| 欧美日韩久久久| 成人精品视频一区二区三区 | 777久久久精品| 成人久久视频在线观看| 免费在线观看一区二区三区| 亚洲色图视频网站| 国产网红主播福利一区二区| 日韩一区二区视频| 7777精品伊人久久久大香线蕉| 97超碰欧美中文字幕| 成人av电影免费观看| av一区二区三区四区|