请问 VB关于USB异步通信
如题 请教大家如何实现?有没有相关资料
谢谢楼上的
我调用creatfile
readfile
writefile
等函数可以实现同步通信对设备的访问,但是异步通信就不能接收到下位机传送的数据
有没有人能提供一个关于异步通信的解决方案啊
附上代码VB code:
Function FindTheHid() As Boolean
'Makes a series of API calls to locate the desired HID-class device.
'Returns True if the device is detected, False if not detected.
Dim Count As Integer
Dim GUIDString As String
Dim HidGuid As GUID
Dim MemberIndex As Long
LastDevice = False
MyDeviceDetected = False
Result = HidD_GetHidGuid(HidGuid)
Call DisplayResultOfAPICall("GetHidGuid")
'Display the GUID.
GUIDString = _
Hex$(HidGuid.Data1) & "-" & _
Hex$(HidGuid.Data2) & "-" & _
Hex$(HidGuid.Data3) & "-"
For Count = 0 To 7
'Ensure that each of the 8 bytes in the GUID displays two characters.
If HidGuid.Data4(Count) >= &H10 Then
GUIDString = GUIDString & Hex$(HidGuid.Data4(Count)) & " "
Else
GUIDString = GUIDString & "0" & Hex$(HidGuid.Data4(Count)) & " "
End If
Next Count
DeviceInfoSet = SetupDiGetClassDevs _
(HidGuid, _
vbNullString, _
0, _
(DIGCF_PRESENT Or DIGCF_DEVICEINTERFACE))
相关问答:
login.aspx.vb:
Public ReadOnly Property nameT() As String
Get
Return TextBox1.Text
&nb ......
大家好,问个vb打印问题
printer.print "dsff"
.....
....
Printer.EndDoc
打印成功后我将执行
sqlstr = "update vc_yh set pr=' 已打印 ', ......
想在warcraft3里进行写屏操作【如对战平台中的胜负提示信息】,效果就像游戏平台中一样,我试过在一窗口中写入文字,然后一直让窗口强制最前,虽然能实现文字显示,但是文字会不断闪烁,而且有不确定BUG,通过论坛搜 ......
我制作了个用户控件,需要动态加载到窗体上
Set objExt = Controls.Add("工程1.meActiveX", argName)
objExt.Visible = True
程序一次能加载N个, 现在想对 ......