Winsock 2

Bruno Jesus 00cpxxx at gmail.com
Sun Sep 20 03:16:37 CDT 2015


On Sun, Sep 20, 2015 at 3:44 PM, Christopher Harrington
<ironiridis+winehq at gmail.com> wrote:
> On Sun, Sep 20, 2015 at 2:17 AM Henri Verbeet <hverbeet at gmail.com> wrote:
>>
>> On 19 September 2015 at 23:53, Christopher Harrington
>> <ironiridis+winehq at gmail.com> wrote:
>> > I'm looking at trying to implement some of the Winsock 2 stubs, namely
>> > WSALookupServiceBegin/Next/End. I'm probably only going to implement
>> > enough
>> > of it that my target binary will stop bailing out with "out of memory".
>> > I
>> > suspect the app is using it to resolve DNS...
>> >
>> > Am I stepping on anyone's toes? If not, can someone point me at the
>> > right
>> > place to look for where wine is currently doing DNS lookups so I can
>> > reuse
>> > that non-broken code?
>> >
>> I think we'd welcome the help. We do lookups in for example
>> resolve_hostname() in dlls/winhttp, but it's probably a good idea to
>> learn how getaddrinfo() works in general.
>
>
> Sure, I just don't want to duplicate code/effort if there's already
> functional and tested code living elsewhere in the tree. Writing my own from
> scratch, even if I'm proficient in the API, is bound to be less
> bug-resilient.

Thanks for your interest in working in this. Currently we have some
applications suffering from the stub implementation of these
functions, most notably [1] which will not run. Many other
applications will cope with the stub returns, looking for
WSALookupServiceBegin in wine bugzilla will get some results.

I have written some tests for this function a while ago, but never got
into developing the function. So they can at least be used for some
basic testing ("make test" inside dlls/ws2_32/tests will run them,
source at dlls/ws2_32/tests/sock.c:8550.

When I studied this function I could not find any real life example
about what it does, so I thought it was related to listing information
from your own system only, I never thought it could be used for name
resolving, that is interesting to know. Please expand the tests if
possible to demonstrate this.

[1] https://bugs.winehq.org/show_bug.cgi?id=29231

Best wishes,
Bruno



More information about the wine-devel mailing list