Skip to content

Commit

Permalink
Clarify errror messages
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Aug 18, 2021
1 parent 230a618 commit 3717fad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion loader/loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int main(int const Argc, char const* const Argv[])
}
catch (std::exception const& e)
{
std::cerr << e.what() << std::endl;
std::cerr << "Error: " << e.what() << std::endl;
return 1;
}
}
4 changes: 4 additions & 0 deletions unicon/inject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ inline HMODULE GetCurrentModuleHandle()

__declspec(dllexport) void inject(unsigned Pid)
{
BOOL IsWow64{};
if (IsWow64Process(GetCurrentProcess(), &IsWow64) && IsWow64)
throw std::runtime_error("WOW64 is not supported. Please use the x64 version.");

if (!Pid)
{
Pid = GetProcessConsoleHostProcessId(GetCurrentProcess());
Expand Down
2 changes: 1 addition & 1 deletion unicon/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extern "C" void WINAPI SetStartupInfoW(const struct PluginStartupInfo* PSInfo)

const wchar_t* Items[]
{
L"Error",
L"Unicon: error",
Str.data()
};

Expand Down

0 comments on commit 3717fad

Please sign in to comment.