mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 05:15:00 -06:00
17.00
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
|
||||
#include "../../../../C/Alloc.h"
|
||||
|
||||
#include "../../../Common/IntToString.h"
|
||||
#include "../../../Common/StringConvert.h"
|
||||
#include "../../../Common/StringToInt.h"
|
||||
|
||||
@@ -43,16 +42,21 @@ using namespace NFind;
|
||||
#define MENU_HEIGHT 26
|
||||
|
||||
bool g_RAM_Size_Defined;
|
||||
bool g_LargePagesMode = false;
|
||||
bool g_OpenArchive = false;
|
||||
|
||||
static bool g_Maximized = false;
|
||||
|
||||
UInt64 g_RAM_Size;
|
||||
|
||||
#ifdef _WIN32
|
||||
HINSTANCE g_hInstance;
|
||||
#endif
|
||||
|
||||
HWND g_HWND;
|
||||
bool g_OpenArchive = false;
|
||||
|
||||
static UString g_MainPath;
|
||||
static UString g_ArcFormat;
|
||||
static bool g_Maximized = false;
|
||||
|
||||
// HRESULT LoadGlobalCodecs();
|
||||
void FreeGlobalCodecs();
|
||||
@@ -166,7 +170,7 @@ CApp g_App;
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
const wchar_t *kWindowClass = L"FM";
|
||||
static const wchar_t * const kWindowClass = L"FM";
|
||||
|
||||
#ifdef UNDER_CE
|
||||
#define WS_OVERLAPPEDWINDOW ( \
|
||||
@@ -185,7 +189,7 @@ static BOOL InitInstance(int nCmdShow)
|
||||
|
||||
// LoadString(hInstance, IDS_CLASS, windowClass, MAX_LOADSTRING);
|
||||
|
||||
UString title = L"7-Zip"; // LangString(IDS_APP_TITLE, 0x03000000);
|
||||
UString title ("7-Zip"); // LangString(IDS_APP_TITLE, 0x03000000);
|
||||
|
||||
/*
|
||||
//If it is already running, then focus on the window
|
||||
@@ -379,7 +383,7 @@ static void SetMemoryLock()
|
||||
NSecurity::AddLockMemoryPrivilege();
|
||||
|
||||
if (ReadLockMemoryEnable())
|
||||
NSecurity::EnablePrivilege_LockMemory();
|
||||
g_LargePagesMode = NSecurity::EnablePrivilege_LockMemory();
|
||||
}
|
||||
|
||||
bool g_SymLink_Supported = false;
|
||||
@@ -426,8 +430,13 @@ static void ErrorMessage(const wchar_t *s)
|
||||
MessageBoxW(0, s, L"7-Zip", MB_ICONERROR);
|
||||
}
|
||||
|
||||
static void ErrorMessage(const char *s)
|
||||
{
|
||||
ErrorMessage(GetUnicodeString(s));
|
||||
}
|
||||
|
||||
#define NT_CHECK_FAIL_ACTION ErrorMessage(L"Unsupported Windows version"); return 1;
|
||||
|
||||
#define NT_CHECK_FAIL_ACTION ErrorMessage("Unsupported Windows version"); return 1;
|
||||
|
||||
static int WINAPI WinMain2(int nCmdShow)
|
||||
{
|
||||
@@ -667,7 +676,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
|
||||
}
|
||||
catch(const AString &s)
|
||||
{
|
||||
ErrorMessage(GetUnicodeString(s));
|
||||
ErrorMessage(s.Ptr());
|
||||
return 1;
|
||||
}
|
||||
catch(const wchar_t *s)
|
||||
@@ -677,19 +686,19 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE /* hPrevInstance */,
|
||||
}
|
||||
catch(const char *s)
|
||||
{
|
||||
ErrorMessage(GetUnicodeString(s));
|
||||
ErrorMessage(s);
|
||||
return 1;
|
||||
}
|
||||
catch(int v)
|
||||
{
|
||||
wchar_t s[32];
|
||||
ConvertUInt32ToString(v, s);
|
||||
ErrorMessage(UString(L"Error: ") + s);
|
||||
AString e ("Error: ");
|
||||
e.Add_UInt32(v);
|
||||
ErrorMessage(e);
|
||||
return 1;
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
ErrorMessage(L"Unknown error");
|
||||
ErrorMessage("Unknown error");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -844,7 +853,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
if (needOpenFile && !archiveIsOpened || res != S_OK)
|
||||
{
|
||||
UString m = L"Error";
|
||||
UString m ("Error");
|
||||
if (res == S_FALSE || res == S_OK)
|
||||
{
|
||||
m = MyFormatNew(encrypted ?
|
||||
|
||||
Reference in New Issue
Block a user