fix: Cannot start application when code page is 65001. Closes #814.

This commit may cause breaking change: changing working directory to the directory where the executable locates in.
This commit is contained in:
huanghongxun
2021-05-30 02:25:31 +08:00
parent 228695d511
commit 258a6628e4
6 changed files with 28 additions and 14 deletions

View File

@@ -16,7 +16,7 @@ LSTATUS MyGetModuleFileName(HMODULE hModule, std::wstring &out);
LSTATUS MyGetEnvironmentVariable(LPCWSTR name, std::wstring &out);
// Create process by invoking CreateProcess, only pass command.
bool MyCreateProcess(const std::wstring &command);
bool MyCreateProcess(const std::wstring &command, const std::wstring& workdir);
// Check if file lpPath exists.
bool FindFirstFileExists(LPCWSTR lpPath, DWORD dwFilter);