What's the best/correct way of assigning return values of non unicode functions to unicode char arrays?
e.g. if I have defined _UNICODE, what would be the correct way to assign a return value from the following:
I'm guessing:Code:TCHAR *ip; ip = inet_ntoa(source.sin_addr);
Code:TCHAR *ip; char *iptemp; iptemp = inet_ntoa(source.sin_addr); #ifdef _UNICODE MultiByteToWideChar(0,0, iptemp, sizeof(*iptemp), ip, 256); #else *ip = *iptemp; #endif