[Development] Implementing of a DNS feature under Windows [QTBUG-30166]

Shane Kearns shane.kearns.qt at gmail.com
Mon Sep 30 21:15:29 CEST 2013


Hi Mandeep,

DnsQueryEx unfortunately requires Windows 8.
So before using it, you'd need to check the library function exists.
Then fall back on the older API if it doesn't.


The MS support article you linked applies to windows 2000,XP and 2003
server only.
So you need to check the behaviour isn't deprecated on windows 7.

Particularly, when a parameter should be null, it may be silently ignored
for backward ABI compatibility.



On 28 September 2013 10:12, Mandeep Sandhu <mandeepsandhu.chd at gmail.com>wrote:

> On Fri, Sep 27, 2013 at 9:19 PM, Jan Kundrát <jkt at flaska.net> wrote:
>
>> On Thursday, 26 September 2013 10:33:49 CEST, Mandeep Sandhu wrote:
>> > . I'll be using the PIP4_ARRAY struct for specifying the nameserver
>>
>> How would you handle a situation where the user provides an IPv6 address
>> of
>> a nameserver?
>>
>
> Good Question.
>
> We're currently using the win API "DnsQuery_W()" function for executing
> the dns request synchronously. However, it _seems_, that this API will only
> accepts a PIP4_ARRAY struct. Actually, the argument which accepts DNS
> server list is sort of undocumented, at least in MSDN, though MS itself
> shows an example where this arg is being used to pass a DNS server ip addr
> list (see: http://support.microsoft.com/kb/831226).
>
> So the other option I see is to use another DNS API - DnsQueryEx (
> http://msdn.microsoft.com/en-us/library/windows/desktop/hh447188(v=vs.85).aspx).
> This is the async version, though it can be used synchronously as well.
> This API has provision for accepting a IPv6 address.
>
> I was unsure about replacing the existing API, and hence mentioned this,
> as a comment, in the case where a user passes an IPv6 nameserver address. I
> was hoping to get some suggestion in the review! :)
>
> Should we change the API in this ticket or open a new one for it?
>
> -mandeep
>
>
>>
>> Cheers,
>> Jan
>>
>> --
>> Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
>> _______________________________________________
>> Development mailing list
>> Development at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/development
>>
>
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130930/c0301da4/attachment.html>


More information about the Development mailing list