Slighthaze = [color blue]NULL[/color]
[img http://www.sweetpotatosoftware.com/ttimages/hostandip.gif]
The neatest thing about this example isn't really what it returns (there are less painful ways to get the Local Host and IP), but that it shows you an example of how to handle an API call that returns a pointer to a structure - notice for instance the line "lnResult = gethostbyname(lcHostname)" in the code below. (Cut-N-Paste this code into a PRG file and run it from within VFP.)
Special thanks to FoxWiki - especially wgcs and the late Ed Rauh - for the stuff I learned from a couple of pages out there regarding the use of structures & pointers in VFP, and as always to http://www.news2news.com/vfp/ for their VFP Declare Statements. I couldn't have pieced this thing together without you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.