1、char * 转换成 LPCTSTR
char s[10];
WCHAR Ws[10];
memset(s,0,10 * sizeof(char));
memset(Ws,0,10 * sizeof(WCHAR));
sprintf(s,"%s","Mychar..");
MultiByteToWideChar(CP_ACP, 0, s, strlen(s) + 1, Ws, sizeof(Ws) / sizeof(Ws[0]));
1、char * 转换成 LPCTSTR
char s[10];
WCHAR Ws[10];
memset(s,0,10 * sizeof(char));
memset(Ws,0,10 * sizeof(WCHAR));
sprintf(s,"%s","Mychar..");
MultiByteToWideChar(CP_ACP, 0, s, strlen(s) + 1, Ws, sizeof(Ws) / sizeof(Ws[0]));