diff options
Diffstat (limited to '7zip/UI/GUI/GUI.cpp')
-rwxr-xr-x | 7zip/UI/GUI/GUI.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/7zip/UI/GUI/GUI.cpp b/7zip/UI/GUI/GUI.cpp index cd26f35f..fe956dbd 100755 --- a/7zip/UI/GUI/GUI.cpp +++ b/7zip/UI/GUI/GUI.cpp @@ -17,6 +17,7 @@ #include "Windows/FileName.h" #ifdef _WIN32 #include "Windows/MemoryLock.h" +#include "Common/Alloc.h" #endif #include "../../IStream.h" @@ -168,7 +169,7 @@ static bool inline IsItWindowsNT() return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT); } -int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) +int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */, LPSTR /* lpCmdLine */, int /* nCmdShow */) { g_hInstance = hInstance; #ifdef _UNICODE @@ -181,6 +182,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi g_IsNT = IsItWindowsNT(); #endif + #ifdef _WIN32 + SetLargePageSize(); + #endif + InitCommonControls(); ReloadLang(); @@ -195,6 +200,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi MyMessageBox(kMemoryExceptionMessage); return (NExitCode::kMemoryError); } + catch(const CArchiveCommandLineException &e) + { + MyMessageBox(GetUnicodeString(e)); + return (NExitCode::kUserError); + } catch(const CSystemException &systemError) { if (systemError.ErrorCode == E_OUTOFMEMORY) @@ -224,6 +234,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi MyMessageBox(s); return (NExitCode::kFatalError); } + catch(const AString &s) + { + MyMessageBox(GetUnicodeString(s)); + return (NExitCode::kFatalError); + } catch(const char *s) { MyMessageBox(GetUnicodeString(s)); |