Hi,
>
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
>
I think at the API level you'd be using CloseHandle(HANDLE) but MSCOMM doesn't expose it's handle and, IAC, would probably not be too happy about having it ripped out from under it. Maybe the answer lies, as Jim suggests, in clearing up any buffers etc before attempting the close.
If you decide you need to handle all communications thru API calls then there's a MSDN article "Serial Communications in Win32" that will help..
HTH,
Viv
Précédent
Suivant
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