Matt,
If you are trying to switch ports on the fly, you must close the port first, then set the commport and reopen. No exceptions :-) Also adviseable is to test for anything pending in the output buffer, and clear it if necessary. Trying to close the port with pending data may fail.
>Hi Viv,
>
>Thanks for tips. Unfortunately, in my case, if Comm Port 1 is opened and when I use oComm.PortOpen = .F. after issuing oComm.CommPort = 1, it still opened. Is there a win32 api function that will force specific port to close. Thanks
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only