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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement