The DnsWriteQuestionToBuffer function type creates a DNS query message and stores it in a DNS_MESSAGE_BUFFER structure. Like many DNS functions, the DnsWriteQuestionToBuffer function type is implemented in multiple forms to facilitate different character encoding. Based on the character encoding involved, use one of the following functions:
- DnsWriteQuestionToBuffer_W (_W for Unicode encoding)
- DnsWriteQuestionToBuffer_UTF8 (_UTF8 for UTF-8 encoding)
BOOL DnsWriteQuestionToBuffer_UTF8( PDNS_MESSAGE_BUFFER pDnsBuffer, PDWORD pdwBufferSize, PCSTR pszName, WORD wType, WORD Xid, BOOL fRecursionDesired );
A pointer to a DNS_MESSAGE_BUFFER structure that contains a DNS query message stored in a buffer.
The size, in bytes, of the buffer allocated to store pDnsBuffer. If the buffer size is insufficient to contain the message, FALSE is returned and pdwBufferSize contains the minimum required buffer size.
A pointer to a string that represents the name of the owner of the record set being queried.
A value that specifies the unique DNS query identifier.
A BOOL that specifies whether recursive name query should be used by the DNS name server. Set to TRUE to request recursive name query, FALSE to request iterative name query.
Returns TRUE upon successful execution, otherwise FALSE.
The following declaration for DnsWriteQuestionToBuffer_UTF8 can be found in Windns.h.
BOOL WINAPI DnsWriteQuestionToBuffer_UTF8( __inout PDNS_MESSAGE_BUFFER pDnsBuffer, __inout PDWORD pdwBufferSize, __in PCSTR pszName, __in WORD wType, __in WORD Xid, __in BOOL fRecursionDesired );
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|