Re: gethostbyaddr

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Wenfei wrote:
> struct hostent *localHost;
> struct in_addr addr;
> inet_aton("169.254.142.2",&addr);
>
> localHost = gethostbyaddr((const char *)&addr, sizeof(struct in_addr),
> AF_INET);
>
> Is above coding right?

No. It is bad code even on Linux where you have inet_aton. On Win32 there is
no such function to begin with.


--
Eugene
http://www.gershnik.com


.



Relevant Pages

  • Re: Linux / Windows GUI application with assembly
    ... before Applications could have been written in Asm, ... under Win32, and the Linux Asm Stuff is still in the ... There is still some assemblers which compile successfully binaries ... under Linux, and I thought someone had already investigated the GUI ...
    (alt.lang.asm)
  • Re: The Delphi Survey
    ... and Linux, but not for win32 and .NET. ... capacity and bigger gain for code compatibility with Linux than there is ... It's also different because .NET, without Mono support, is a Windows ...
    (borland.public.delphi.non-technical)
  • Re: Will there ever be a new Delphi for Win32?
    ... some .NET projects run on Mono directly. ... Calvert's article on running .NET WinForms code on Mono and Linux. ... No. CLX is only supported on Win32 and Linux. ... Yorai Aminov (TeamB) ...
    (borland.public.delphi.non-technical)
  • Re: findfirst, findnext and finddata_t
    ... |> I'm porting a Win32 application to linux. ... The Win32 API appears, based on the little bit posted in this thread, to ... tree walk) and each subsequent item. ... The ftw "package" does not appear ...
    (comp.os.linux.development.system)
  • Re: Interactive sessions on another box from Win32
    ... I planned to ssh to the ... > Expect is not an option on Win32. ... > for connecting securely to linux box and running interactive programs on the ... This is a command line login, or a GUI login? ...
    (comp.lang.perl.misc)