What is the string encoding for structures passed to Win32 async callback functions?

Viewed 69

I can't seem to find the documentation for this - when calling the Win32 API DnsQueryEx or DnsServiceBrowse, for async operation you pass in a callback of type DNS_QUERY_COMPLETION_ROUTINE. This callback receives a pointer PDNS_RECORD (the definition doesn't use PDNS_RECORDA or PDNS_RECORDW, just PDNS_RECORD). That structure has a field pName, which is documented as:

A pointer to a string that represents the domain name of the record set. This must be in the string format that corresponds to the function called, such as ANSI, Unicode, or UTF8.

But, those async functions don't have different variants for different encodings, and I'm not constructing this structure, the library is providing it. How do I know what encoding the pName field uses?

1 Answers
Related