I am rewriting an old QBasic program using VB .Net. In the old program, we accessed the com port treating it like a file. The code looked something like this:
(please forgive the approximations. I don't have my code in front of me)
Open "COM1:9600,E,7,1" For Random As #1
This opened the port for random access as file #1. I am trying to do something similar and I'm having all kinds of problems. Using code like this:
FileOpen (filenum, "COM1:9600,E,7,1", Random)
I know that's not the exact syntax, but it's similar.
Doing this, I get an error with Number 75 and Description (similar to) "FileStream will not open Win32 devices like disk partitions and tape drives."
I'm open to other methods of doing this, but I need to read data from and write data to a serial port. I saw some posts referencing (again, something like) MsiComm, but I don't know what that is or how to use it and I was unable to find any answers in my help files or on Tek-Tips.
Please offer what help you can. I'll be very grateful.
(please forgive the approximations. I don't have my code in front of me)
Open "COM1:9600,E,7,1" For Random As #1
This opened the port for random access as file #1. I am trying to do something similar and I'm having all kinds of problems. Using code like this:
FileOpen (filenum, "COM1:9600,E,7,1", Random)
I know that's not the exact syntax, but it's similar.
Doing this, I get an error with Number 75 and Description (similar to) "FileStream will not open Win32 devices like disk partitions and tape drives."
I'm open to other methods of doing this, but I need to read data from and write data to a serial port. I saw some posts referencing (again, something like) MsiComm, but I don't know what that is or how to use it and I was unable to find any answers in my help files or on Tek-Tips.
Please offer what help you can. I'll be very grateful.