1 const char *p = "D:\\";
2 const WCHAR *pwcsName; //LPCWSTR
3
4 // required size
5 int size = MultiByteToWideChar(CP_ACP, 0, p, -1, NULL, 0);
6 // allocate it
7 pwcsName = new WCHAR[nChars];
8 MultiByteToWideChar(CP_ACP, 0, p, -1, (LPWSTR)pwcsName, size);
9 // use it....
10
11 // delete it
12 delete [] pwcsName;
13}