DNS Lookup
Hi,
I'm trying to do a DNS lookup using the winsock function GetHostByName, in
Visual Basic the following works:
Declare Function GetHostByName Lib "wsock32.dll" Alias "gethostbyname"
(ByVal sHostName As String) As Long
In Euphoria I tried this:
constant WSOCK32 = open_dll("wsock32.dll")
atom gethostbyname
gethostbyname = define_c_func(WSOCK32,"gethostbyname",{C_LONG},C_LONG)
memDNS = allocate_string("www.infoseek.com")
? c_func(dllgethostbyname,{memDNS})
free(memDNS)
But it just returns 0, can any one see what I'm doing wrong here?
Thomas Parslow (PatRat) ICQ #:26359483
Rat Software
http://www.ratsoft.freeserve.co.uk/
Get paid to surf the web!
http://members.tripod.co.uk/paid2surf/
|
Not Categorized, Please Help
|
|