Is there anybody could tell me how to read/write data from/to USB Serial by Visual Basic
-
You don't read/write data to the port, you do it to the device attached to the port. How you do this depends on the device itself and what methods it exposes. Since you mentioned Serial, I assume the device exposes itself as being attached to a COM port, in which case, you'd be looking for examples on Serial Communication.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
You don't read/write data to the port, you do it to the device attached to the port. How you do this depends on the device itself and what methods it exposes. Since you mentioned Serial, I assume the device exposes itself as being attached to a COM port, in which case, you'd be looking for examples on Serial Communication.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Oh,I see! I guessed I can not read/write data to the port,too! But my friend need to do it,and she tell me nothing about the device. Thanks a lot! Let me try another way to do it, or if somebody has another good idea,tell me,please!
Billypon wrote:
But my friend need to do it,
Like I said, you don't talk to the USB interface directly. You MUST have some API to talk to the device itself. Without knowing anything about the device, there's nothing you can do that will work.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Oh,I see! I guessed I can not read/write data to the port,too! But my friend need to do it,and she tell me nothing about the device. Thanks a lot! Let me try another way to do it, or if somebody has another good idea,tell me,please!
This is not like a serial or parallel port where you can talk to any device plugged into it just by talking to the port. USB is a BUS, not a port. You have to address devices to talk to them. This is something that is left up to the driver of the device. Like I've said before, you need to know about the device and the API exposed by either the driver or some SDK for the device.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Hi, To Read/Write From USB Port, u will have to use "MSComm" Control. Check this Link : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/comm98/html/vbobjcommx.asp[^]http://support.microsoft.com/kb/194922[^]Regards ips
-
Hi, To Read/Write From USB Port, u will have to use "MSComm" Control. Check this Link : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/comm98/html/vbobjcommx.asp[^]http://support.microsoft.com/kb/194922[^]Regards ips