Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Closing Port
Message
De
19/11/2003 06:37:53
 
 
À
19/11/2003 03:59:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00850804
Message ID:
00851332
Vues:
8
>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

Viv,

DECLARE INTEGER CloseHandle IN Win32API INTEGER hObject
nporthandle = form1.olecontrol1.commid
nerr = closehandle(nporthandle)

will close the port and drop the handle. And the control will not like it one bit :-)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform