Subject: Re: code in ares_init

Re: code in ares_init

From: Mark Weaver <mark-clist_at_npsl.co.uk>
Date: 2005-05-02

> I don't understand why author use LoadLibraryA and GetProcAddress only
> to load the function GetNetworkParams
>
So that the compiled binary will run on platforms where this function is
not present without modificaion.

> Can you explain for me the purpose of author? thank so much. Cos in
> evc++ 4.0 emulator, sometimes it makes the
>
> error access violation.
Sounds like the emulator is screwed.

>
> So i try to use the code like below:
>
>
>
> #ifdef _WIN32_WCE
>
> FIXED_INFO* FixedInfo = new FIXED_INFO;
> ULONG* ulOutBufLen= new ULONG;
> DWORD iResponse = 0;
> *ulOutBufLen = sizeof( FIXED_INFO );
>
> iResponse = GetNetworkParams(FixedInfo,ulOutBufLen);
>
> if (iResponse == ERROR_BUFFER_OVERFLOW)
> {
> .....
>
> }
that's C++, ares is written in C.
_______________________________________________
http://cool.haxx.se/mailman/listinfo/c-ares
Received on Mon May 2 12:11:37 2005