Question: how to convert lpwstr to string?
Answer: h header file into our program. To convert std::wstring to wide character array type string, we can use the function called c_str() to make it C like string and point to wide character string. Convert LPWSTR to std::string · GitHub, Convert LPWSTR to std::string.