Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extended FoxTools help
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00253960
Message ID:
00254007
Views:
29
Hi George,

>I've been banging my head against the wall (figuratively, of course) trying to figure out what the parameters are so that I can add these. I've made a number of attempts, and haven't had much success.

All I've found is the following excerpt of a backgrounder written by Calvin Hsia ("Custom OLE Server").

-------------------------
I've added three functions to Foxtools that will resolve IP addresses.

{"_WSOCKSTARTUP", (FPFI) WSockStartup, 7, "I,R,R,R,R,R,R"},
{"_WSOCKCLEANUP", (FPFI) WSockCleanup, 0, ""},
{"_WSOCKGETHOSTBYADDR", (FPFI) WSockGetHostByAddr, 2, "C,R"},

Call _WSOCKSTARTUP and _WSOCKCLEANUP to initialize/uninitialize the Winsock library. The _WSOCKGETHOSTBYADDR function takes an IP address string like "123.123.123.123" and resolves it into the name of the machine.

// store 0 to buff1,buff2,buff3,buff4,buff5,buff6
//?_wsockstartup(256 * 1 + 1,@buff1,@buff2,@buff3,@buff4,@buff5,@buff6)
// integer version, wVersion,wHighVersion,szDescription,szSystemStatus,iMaxSockets,iMaxUdpDg


//? _wsockgethostbyaddr("123.123.123.123",@buff1) &&returns 1 on success, 0 on failure
// ?buff1 && returns the host name
// Note: if the target machine is not available, this call can take a long time.
-------------------


>>BTW, may I upload the file to the CompuServe VFOX forum?
>
>Certainly.

Thanks!

Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform