Something like this
wstring wstr( L"abcdef" );
int len = WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), wstr.size(), NULL, 0, NULL, NULL);
char* buffer = new char[len + 1];
WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), wstr.size(), buffer, len, NULL, NULL);
buffer[len] = '\0';
or to be specific to your case:
PCWSTR pstr(L"abcdef");
int len = WideCharToMultiByte(CP_ACP, 0, pstr, wcslen(pstr), NULL, 0, NULL, NULL);
char* buffer = new char[len + 1];
WideCharToMultiByte(CP_ACP, 0, pstr, wcslen(pstr), buffer, len, NULL, NULL);
buffer[len] = '\0';