Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Workstation's IP Address
Message
 
À
03/07/2001 11:31:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00526200
Message ID:
00526387
Vues:
18
>Thanks bob, but I'm trying to avoid the old dos window. Any other ideas?
>
>Kev

I don't remember where I read about this first but this works:
PUBLIC IPSocket
crlf=CHR(13)+CHR(10)
* Show local ip address
IPSocket = CREATEOBJECT("MSWinsock.Winsock")
IF TYPE('IPSocket')='O'
	IPAddress = IPSocket.LocalIP
	localhostname=IPSocket.localhostname
	remotehost=IPSocket.remotehost
	remotehostip=IPSocket.remotehostip
	MESSAGEBOX ("Local IP = " + IPAddress+crlf+"local host = "+localhostname;
		+crlf+"Remotehost = "+remotehost+crlf+"Remotehostip = "+remotehostip)
ELSE
	MESSAGEBOX ("Winsock Is Not Installed!")
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform