BOOL CDrvDlg::OnInitDialog() { TRY CDialog::OnInitDialog(); SetIcon(m_hIcon,TRUE); SetIcon(m_hIcon,FALSE); m_FftLen.SetCurSel(0); m_OsVersion.Initialize(); DWORD platformID = m_OsVersion.GetPlatformID(); if(VER_PLATFORM_WIN32_NT == platformID) { m_SvcNew.InstallService(drvnew); m_SvcOld.InstallService(drvold); } m_DrvNew.OpenDevice(drvnew); m_DrvOld.OpenDevice(drvold); ShowCPUInfo(); ShowOSInfo(); ShowIPPSLibInfo(); UpdateData(FALSE); m_string.Format(IDS_PRG_START); WriteLog(m_string); m_string.Format(IDS_DRV_OPEN,drvold,m_DrvOld.GetDeviceHandle()); WriteLog(m_string); m_string.Format(IDS_DRV_OPEN,drvnew,m_DrvNew.GetDeviceHandle()); WriteLog(m_string); CATCH(CMyException,e); Cleanup(); e->ReportError(); END_CATCH return TRUE; } // CDrvDlg::OnInitDialog()
BOOL Dlg_OnInitDialog(HWND hWnd, HWND hWndFocus, LPARAM lParam) { chSETDLGICONS(hWnd, IDI_SYSINFO); SYSTEM_INFO sinf; GetSystemInfo(&sinf); ShowCPUInfo(hWnd, sinf.wProcessorArchitecture, sinf.wProcessorLevel, sinf.wProcessorRevision); TCHAR szBuf[50]; SetDlgItemText(hWnd, IDC_PAGESIZE, BigNumToString(sinf.dwPageSize, szBuf, _countof(szBuf))); StringCchPrintf(szBuf, _countof(szBuf), TEXT("%p"), sinf.lpMinimumApplicationAddress); SetDlgItemText(hWnd, IDC_MINAPPADDR, szBuf); StringCchPrintf(szBuf, _countof(szBuf), TEXT("%p"), sinf.lpMaximumApplicationAddress); SetDlgItemText(hWnd, IDC_MAXAPPADDR, szBuf); StringCchPrintf(szBuf, _countof(szBuf), TEXT("0x%016I64X"), (__int64) sinf.dwActiveProcessorMask); SetDlgItemText(hWnd, IDC_ACTIVEPROCMASK, szBuf); SetDlgItemText(hWnd, IDC_NUMOFPROCS, BigNumToString(sinf.dwNumberOfProcessors, szBuf, _countof(szBuf))); SetDlgItemText(hWnd, IDC_ALLOCGRAN, BigNumToString(sinf.dwAllocationGranularity, szBuf, _countof(szBuf))); ShowBitness(hWnd); return(TRUE); }