PDA

View Full Version : winsock in a c++ script


snorkis
05-14-2004, 05:45 PM
I'm trying to use gethostbyname in a c++ script for ioftpd but it always return 11001 host not found when run from ioftpd.

If I run it from a shell with the same parameters it gets from ioftpd,it resolvs the host.

any help would be appreciated. :)

neoxed
05-14-2004, 05:49 PM
Check to make sure you are not missing the following entries in the ioftpd.env:

SYSTEMROOT=%[environment(SYSTEMROOT)]
WINDIR=%[environment(WINDIR)]

You have to restart ioFTPD for changes to take effect.

Mouton
05-14-2004, 05:49 PM
http://www.ioftpd.com/kb/view.php?kbid=67

snorkis
05-14-2004, 06:18 PM
thanks for the help guys but it didn't help.
the wsa gets initialized correctly according to the return value from WSAStartup.

The error reply comes the same nanosecond it executes gethostbyname. Winsock is not even trying to resolve the host from ioftpd :(

I'll have to call it for today. Been banging my head for too long now.

Thanks

snorkis
05-15-2004, 10:25 AM
lol
I pasted the lines from the page and ofcourse there was a space after the systemroot line and ioftpd didn't like that.

Thanks 10x for the help
Back to work. :)