Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Comm ports
Message
De
12/12/2006 10:55:04
 
 
À
12/12/2006 10:33:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Divers
Thread ID:
01167666
Message ID:
01176872
Vues:
11
Which my original post pointed to...

>Ed's Faq does it for you:
>
>LOCAL oComm, i, cOldErrorHandler
>DECLARE aComPorts[16]
>aComPorts = .T.
>cOldErrorHandler = ON('ERROR')
>FOR i = 1 TO 16
>  oComm = CREATEOBJ('MsCOMMLib.Mscomm')
>  oComm.CommPort = i
>  ON ERROR aComPorts[i] = .F.
>  oComm.PortOpen = .T.
>  oComm.PortOpen = .F.
>  oComm = NULL
>  ON ERROR &cOldErrorHandler
>ENDFOR
>For i = 1 TO 16
>	IF aComPorts[i]
>		? [Comm Port ] + ALLTRIM(STR(i)) + [ is valid]
>	ENDIF
>ENDFOR
>
>
>>>Up to 16,
>>>
>>>FAQ #7943
>>>
>>>>Hi all,
>>>>
>>>>is there a vfp command that can give me the number of serial ports installed ?
>>>>
>>>>Best Regards,
>>>>Hans
>>
>>Jim
>>
>>Is there a VFP command which can tell me what those ports are?
>>
>>Thanks
>>
>>Colin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform