I get information from user and save them in std::string variables like the following:
std::string username;
std::string domain;
std::string hash_ntlm;
std::string process_name;
std::cout << "\n\tUsername: ";
std::getline(std::cin, username);
std::cout << "\tDomain: ";
std::getline(std::cin, domain);
std::cout << "\tNTLM Hash: ";
std::getline(std::cin, hash_ntlm);
std::cout << "\tProcess: ";
std::getline(std::cin, process_name);
std::cout << "\n";
Unfortuently, I have to work with functions which gets arguments with PCWSTR datatype like the following one:
bool Function(ProcessCreateType arg_type, PCWSTR arg_command_Line, DWORD arg_process_flags, HANDLE arg_user_token, DWORD arg_logon_flags, PCWSTR arg_user, PCWSTR arg_domain, PCWSTR arg_password, PPROCESS_INFORMATION arg_process_infos, BOOL arg_auto_close_handle)
But when I redefine variables with PCWSTR datatype, I can't get them with std::getline(std::cin, domain); or I can't pass them std::string variable with even calling c_str() method. How should I fix this issue of working with PCWSTR and std::string.