X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/27e903c56380abcb11b5a0b8d7ccab88a14b5cde..8bc22a17b97149d69fd377f5e9f5ed617a4385db:/dnswin.pas?ds=inline diff --git a/dnswin.pas b/dnswin.pas index 567ea68..5e85f70 100644 --- a/dnswin.pas +++ b/dnswin.pas @@ -39,9 +39,11 @@ type end; +procedure init; + implementation uses - { zipplet: moved pgtypes to interface because it's needed for the string definitions } + // zipplet: moved pgtypes to interface because it's needed for the string definitions lsocket,sysutils,winsock,windows,messages; type @@ -108,15 +110,15 @@ begin getmem(output,sizeof(taddrinfo)); if assigned(prev) then prev.ai_next := output; - getmem(output.ai_addr,sizeof(tinetsockaddr)); + getmem(output.ai_addr,sizeof(tlinetsockaddr4)); if servname <> nil then output.ai_addr.InAddr.port := htons(strtoint(servname)) else output.ai_addr.InAddr.port := 0; output.ai_addr.InAddr.addr := longint(addrlist^^); - inc(integer(addrlist),4); + inc(taddrint(addrlist),4); output.ai_flags := 0; output.ai_family := af_inet; output.ai_socktype := 0; output.ai_protocol := 0; - output.ai_addrlen := sizeof(tinetsockaddr); + output.ai_addrlen := sizeof(tlinetsockaddr4); output.ai_canonname := nil; output.ai_next := nil; prev := output; @@ -330,6 +332,7 @@ var hbrBackground : 0; lpszMenuName : nil; lpszClassName : 'dnswinClass'); +procedure init; begin if Windows.RegisterClass(MyWindowClass) = 0 then halt; @@ -346,4 +349,7 @@ begin nil); { CreateParam } //writeln('dnswin hwnd is ',hwnddnswin); //writeln('last error is ',GetLastError); +end; + + end.