[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" }
architecture "x86"
platforms "x86"
exceptionhandling ("SEH")
--exceptionhandling ("SEH")
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());
}
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)
{
try
{
ShellExecuteA(nullptr, "open", url.data(), nullptr, nullptr, SW_SHOWNORMAL);
}
catch (...) {}
SafeShellExecute(nullptr, "open", url.data(), nullptr, nullptr, SW_SHOWNORMAL);
}
bool HasIntercection(unsigned int base1, unsigned int len1, unsigned int base2, unsigned int len2)