DNS Lookup

new topic     » topic index » view thread      » older message » newer message

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/

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu