Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Articles
Search: 

Get Local IP address
John Harvey, September 28, 1998
The following code will retrieve your local ip address as well as your hostname, the remote host and remote host ip address. To view additional properties run the program then open the debug window. You would most likely want to remove the public declaration when using this in a class or prg. *...
Summary
The following code will retrieve your local ip address as well as your hostname, the remote host and remote host ip address. To view additional properties run the program then open the debug window. You would most likely want to remove the public declaration when using this in a class or prg. * getipaddress.prg * John Harvey * 9/28/98 * Leave IPSocket public to view all properties in the debug window. * I stumbled on this routine while trying to find information on subclassing * the WSH and thought it might be useful. 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
John Harvey, Shelbynet.Com
Custom database applications written primarily in Visual FoxPro and other Microsoft tools i.e. Visual Interdev, IE, VBA, VB Script as well as java script. Support for MS Windows NT as well. Web application development using MS Visual FoxPro and West-Wind's Web Connection. We also offer web hosting for VFP or other systems on a computer lease or co-locate basis. Certified Hughes Direcway Satellite Installer. I started with dBase III and jumped ship to FoxBase, never left. I have been on every beta since Dr. Fulton gave us the free copy at Devcon I. I am now a technical consultant with the Memphis Police Department, and also do independent consulting with other compaines like Honeywell, The Justice Network, other police departments, etc. I consult with other companies and developers both locally and nationally and recently started a web hosting service with emphasis on co-locating or leasing NT Servers for Web Connection and VFP. Http://www.shelbynet.com Have Computer, Will Travel
More articles from this author
John Harvey, November 13, 1999
I am posting this because I've seen several questions regarding this issue. Yes, you can use JPG files in a VFP report and also only store the pathname. Here's how: 1. Use a character field or memo to store the path to the image. 2. Drop the picture/activex bound control on the report. 3. ...
John Harvey, January 23, 2000
This is a short article that includes copies of a couple of pages from MS's MSDN on configuring lmhost files for mapping a drive across the internet using tcp-ip. There's also a link to another internet resource that has a great deal of information on this subject. YOU HAVE FOUND THE HOLY GRAIL FOR...
John Harvey, January 1, 2001
FoxPro is alive and well! Devcon had many eye opening sessions and the technology is moving forward. I wished this version had been version 3. With all the new wizards and the extensible framework, we should pick up alot of new users. The learning curve coupled with the lack of a built-in framew...