[Premake] Remove structured exception handler

This commit is contained in:
momo5502 2017-07-12 13:36:27 +02:00
parent 69eb4848ac
commit ef4a2492af
2 changed files with 11 additions and 6 deletions

View File

@ -245,7 +245,7 @@ workspace "iw4x"
configurations { "Debug", "Release" } configurations { "Debug", "Release" }
architecture "x86" architecture "x86"
platforms "x86" platforms "x86"
exceptionhandling ("SEH") --exceptionhandling ("SEH")
flags { "StaticRuntime" } flags { "StaticRuntime" }

View File

@ -121,13 +121,18 @@ namespace Utils
return GetModuleHandleA(Utils::String::XOR(std::string(reinterpret_cast<char*>(ntdll), sizeof ntdll), -1).data()); return GetModuleHandleA(Utils::String::XOR(std::string(reinterpret_cast<char*>(ntdll), sizeof ntdll), -1).data());
} }
void SafeShellExecute(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd)
{
__try
{
ShellExecuteA(hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd);
}
__finally {}
}
void OpenUrl(std::string url) void OpenUrl(std::string url)
{ {
try SafeShellExecute(nullptr, "open", url.data(), nullptr, nullptr, SW_SHOWNORMAL);
{
ShellExecuteA(nullptr, "open", url.data(), nullptr, nullptr, SW_SHOWNORMAL);
}
catch (...) {}
} }
bool HasIntercection(unsigned int base1, unsigned int len1, unsigned int base2, unsigned int len2) bool HasIntercection(unsigned int base1, unsigned int len1, unsigned int base2, unsigned int len2)