Hello..
I want to call dnsapi.dll and get DnsQuery_A for a specific domain..
DNS_RECORD *pQueryRec; is where the results are stored.
Now I want to copy pNameExchange to server:
Code:
char *server;
server = new char[strlen(pQueryRec->Data.MX.pNameExchange) + 1];
strcpy(server, pQueryRec->Data.MX.pNameExchange);
And I get:
cannot convert parameter 1 from 'PWSTR' to 'const char *'
for strlen and strcpy.
I've looked what PWSTR is and couldnt find any good answers. Not sure if I should go with casting, or what else should I do?