diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-10-02 13:57:55 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-10-02 13:57:55 -0700 |
| commit | 20d911a91508c16bd01272ae94a3ca239a4d984e (patch) | |
| tree | 0184a50f664a63e4a928d2adc6d6b33ab8639172 /toolsrc/src | |
| parent | b5de54f8add66fb60668e831ae00a29698ee55e9 (diff) | |
| download | vcpkg-20d911a91508c16bd01272ae94a3ca239a4d984e.tar.gz vcpkg-20d911a91508c16bd01272ae94a3ca239a4d984e.zip | |
[vcpkg] Fix use of UNICODE-sensitive Windows APIs
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/commands_integrate.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/toolsrc/src/commands_integrate.cpp b/toolsrc/src/commands_integrate.cpp index 1bf26910c..fd2f11294 100644 --- a/toolsrc/src/commands_integrate.cpp +++ b/toolsrc/src/commands_integrate.cpp @@ -113,19 +113,20 @@ namespace vcpkg::Commands::Integrate static ElevationPromptChoice elevated_cmd_execute(const std::string& param) { - SHELLEXECUTEINFO sh_ex_info = {0}; + SHELLEXECUTEINFOW sh_ex_info = {0}; sh_ex_info.cbSize = sizeof(sh_ex_info); sh_ex_info.fMask = SEE_MASK_NOCLOSEPROCESS; sh_ex_info.hwnd = nullptr; - sh_ex_info.lpVerb = "runas"; - sh_ex_info.lpFile = "cmd"; // Application to start + sh_ex_info.lpVerb = L"runas"; + sh_ex_info.lpFile = L"cmd"; // Application to start - sh_ex_info.lpParameters = param.c_str(); // Additional parameters + auto wparam = Strings::to_utf16(param); + sh_ex_info.lpParameters = wparam.c_str(); // Additional parameters sh_ex_info.lpDirectory = nullptr; sh_ex_info.nShow = SW_HIDE; sh_ex_info.hInstApp = nullptr; - if (!ShellExecuteExA(&sh_ex_info)) + if (!ShellExecuteExW(&sh_ex_info)) { return ElevationPromptChoice::NO; } |
