Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting Workstation's IP Address
Message
 
To
03/07/2001 11:31:30
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00526200
Message ID:
00526387
Views:
17
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform