#include #include #include struct LRProfile { UINT CodePage; UINT LCID; long Bias; int HookIME; int HookLCID; }; int WrtieConfigFileMap(LRProfile* profile) { SetEnvironmentVariableW(L"LRCodePage", (LPCWSTR)&profile->CodePage); SetEnvironmentVariableW(L"LRLCID", (LPCWSTR)&profile->LCID); SetEnvironmentVariableW(L"LRBIAS", (LPCWSTR)&profile->Bias); SetEnvironmentVariableW(L"LRHookIME", (LPCWSTR)&profile->HookIME); SetEnvironmentVariableW(L"LRHookLCID", (LPCWSTR)&profile->HookLCID); return 0; } //https://github.com/InWILL/Locale_Remulator/blob/master/LRProc/LRProc.cpp int LRwmain(int argc, wchar_t* wargv[]) { char current[2048]; GetModuleFileNameA(NULL, current, 2048); std::string _s = current; _s = _s.substr(0, _s.find_last_of("\\")); auto dllpath = _s + "\\Locale_Remulator\\"; auto targetexe = wargv[1]; std::wstring cmd=L""; for(int i=1;i