Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6 How to: Get the IP address of the machine
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00893826
Message ID:
00895025
Vues:
23
I assumed that the internal one was what he was looking for - if it is internal (intranet) it would not be visible to the public.
This routine works in what I think is a similar situation, where we need to know the IP address of a workstation for troubleshooting purposes.

>Ashley
>In his case, this won't work for him, since he will get the internal IP address, not the external ( public ) one.
>Jaime
>
>>An alternative I've used:
>>
>>! ipconfig > c:\ip.txt
>>cIP=filetostr('c:\ip.txt')
>>cIP=substr(cIP,at('IP Address',cIP),at('Subnet Mask',cIP)-at('IP Address',cIP))
>>cIP=substr(cIP,at(': ',cIP)+1)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform