STDAPI SetLargePageMode() { #if defined(_WIN32) && defined(_7ZIP_LARGE_PAGES) SetLargePageSize(); #endif return S_OK; }
zmodifyer::zmodifyer(wchar_t const * file_name) : outStream_( 0 ) , file_name_(file_name ? file_name : L"") , codecs_(0) , zdb_( new ZDB( file_name ? file_name : L"" ) ) { init(); memset( key, 0, sizeof(key) ); // 압축 코덱 생성 codecs_ = new CCodecs; HRESULT result = codecs_->Load(); if (result != S_OK) { delete codecs_; codecs_ = 0; //throw CSystemException(result); return; } #if defined(_WIN32) && defined(_7ZIP_LARGE_PAGES) if (options.LargePages) { SetLargePageSize(); NSecurity::EnableLockMemoryPrivilege(); } #endif }
DLLEXPORT BOOL WINAPI DllMain(HINSTANCE /* hInstance */, DWORD dwReason, LPVOID /*lpReserved*/) { if (dwReason == DLL_PROCESS_ATTACH) { // NCompress::NRangeCoder::g_PriceTables.Init(); // CCRC::InitTable(); #ifdef _WIN32 SetLargePageSize(); #endif } return TRUE; }
BOOL CEcoZipFMApp::InitInstance() { g_hInstance = m_hInstance; // InitCommonControlsEx() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); // Set this to include all the common control classes you want to use // in your application. InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); CWinAppEx::InitInstance(); // Initialize OLE libraries if (!AfxOleInit()) { AfxMessageBox(IDP_OLE_INIT_FAILED); return FALSE; } CoInitialize(NULL); if (FAILED(CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL))) return FALSE; AfxEnableControlContainer(); // Create the shell manager, in case the dialog contains // any shell tree view or shell list view controls. InitShellManager(); // Activate "Windows Native" visual manager for enabling themes in MFC controls CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows7)); // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need // Change the registry key under which our settings are stored // TODO: You should modify this string to be something appropriate // such as the name of your company or organization m_strRegSection.Empty(); SetRegistryKey(_T(""));// _T("[email protected]")); InitContextMenuManager(); InitKeyboardManager(); InitTooltipManager(); CMFCToolTipInfo ttParams; ttParams.m_bVislManagerTheme = TRUE; theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL, RUNTIME_CLASS(CMFCToolTipCtrl), &ttParams); LoadState(); // DWORD dwRouting; // if (SystemParametersInfo(SPI_GETMOUSEWHEELROUTING, 0, &dwRouting, 0)) { // DWORD dwNewRouting = MOUSEWHEEL_ROUTING_HYBRID; // SystemParametersInfo(SPI_SETMOUSEWHEELROUTING, 0, &dwNewRouting, 0); // } g_RAM_Size_Defined = NWindows::NSystem::GetRamSize(g_RAM_Size); SetLargePageSize(); LoadLangOneTime(); #if defined(_WIN32) && !defined(_WIN64) && !defined(UNDER_CE) Set_Wow64(); #endif #if defined(_WIN32) && !defined(UNDER_CE) SetMemoryLock(); Set_SymLink_Supported(); #endif ReloadLang(); CEcoZipFMDlg dlg; InitWindow(&dlg); m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } else if (nResponse == -1) { TRACE(traceAppMsg, 0, "Warning: dialog creation failed, so application is terminating unexpectedly.\n"); TRACE(traceAppMsg, 0, "Warning: if you are using MFC controls on the dialog, you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n"); } SaveState(); CoUninitialize(); // SystemParametersInfo(SPI_SETMOUSEWHEELROUTING, 0, &dwRouting, 0); // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }