It can be called multiple times to construct a request message consisting of multiple question records.
- pIDNS:The interface pointer.
- nType:DNS question type.
- nClass:DNS class.
- pszDomain:A zero-terminated string representing a domain name in dotted notation (for example, "example.com"). Single dot terminators (e.g. "example.com.") are acceptable and treated identically to domain names without a terminating dot. (Domain search paths and relative domain names are not supported.)
int IDNS_AddQuestion(IDNS *pIDNS, AEEDNSQType nType, AEEDNSClass nClass, const char *pszDomain);
All other values indicate failure, in which case the DNS request is unmodified. In this context, the following error codes have special meaning:
AEE_EFAILED: The new question would make the DNS message exceed the maximum size (512 bytes for DNS over UDP). AEE_EBADPARM: The domain name is mal-formed. AEE_NET_EINVAL: IDNS is not in the proper state for questions to be added. Questions cannot be added after Start() has been called.
Other errors might be returned; the caller should verify that IDNS_AddQuestion() succeeded.
Colon (:), slash (/) and comma (,) characters do not delimit the domain name as in IAddrInfo.
When constructing a question record, IDNS does not use the compressed form of domain names.