void charTowchar(const char *chr, wchar_t *wchar, int size)
{
MultiByteToWideChar(CP_ACP, 0, chr,
strlen(chr) + 1, wchar, size / sizeof(wchar[0]));
}
void wcharTochar(const wchar_t *wchar, char *chr, int length)
{
WideCharToMultiByte(CP_ACP, 0, wchar, -1,
chr, length, NULL, NULL);
}
_tprintf() 是 printf() 和 wprintf() 的通用类型;如果定义了 _unicode,那么 _tprintf() 就会转换为 wprintf(),否则为 printf()