界面如下:
主要代碼如下:
CProcessManagerDlg::InitProcessList( m_ListProcess.SetExtendedStyle(m_ListProcess.GetExtendedStyle() | LVS_EX_GRIDLINES | m_ListProcess.InsertColumn(, _T( m_ListProcess.InsertColumn(, _T( m_ListProcess.InsertColumn(, _T( m_ListProcess.SetColumnWidth( m_ListProcess.SetColumnWidth( m_ListProcess.SetColumnWidth( CProcessManagerDlg::InitDLLList( m_ListDLL.SetExtendedStyle(m_ListDLL.GetExtendedStyle() | LVS_EX_GRIDLINES | m_ListDLL.InsertColumn(, _T( m_ListDLL.InsertColumn(, _T( m_ListDLL.InsertColumn(, _T( m_ListDLL.SetColumnWidth( m_ListDLL.SetColumnWidth( m_ListDLL.SetColumnWidth( CProcessManagerDlg::ShowProcessList( HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, (INVALID_HANDLE_VALUE == AfxMessageBox(_T( i = PROCESSENTRY32 Pe32 = { Pe32.dwSize = BOOL bRet = Process32First(hSnap, & str.Format(_T( str.Format(_T( m_ListProcess.SetItemText(i, m_ListProcess.SetItemText(i++, bRet = Process32Next(hSnap, & MODULEENTRY32 Me32 = { Me32.dwSize = HANDLE hSnap = DWORD dwErr = i = BOOL bRet = Module32First(hSnap, & str.Format(_T( m_ListDLL.SetItemText(i, m_ListDLL.SetItemText(i++, bRet = Module32Next(hSnap, & POSITION pos = iSelected = - iSelected = (- == AfxMessageBox(_T( TCHAR szProcessID[] = { m_ListProcess.GetItemText(iSelected, , szProcessID, DWORD dwPid = HANDLE hProcess = (NULL == TerminateProcess(hProcess, POSITION pos = iSelected = - iSelected = (- == AfxMessageBox(_T( TCHAR szProcessID[] = { m_ListProcess.GetItemText(iSelected, , szProcessID, DWORD dwPid = HANDLE hSnap = (INVALID_HANDLE_VALUE == AfxMessageBox(_T( THREADENTRY32 Te32 = { Te32.dwSize = BOOL bRet = Thread32First(hSnap, & (Te32.th32OwnerProcessID == HANDLE hThread = bRet = Thread32Next(hSnap, & POSITION pos = iSelected = - iSelected = (- == AfxMessageBox(_T( TCHAR szProcessID[] = { m_ListProcess.GetItemText(iSelected, , szProcessID, DWORD dwPid = HANDLE hSnap = (INVALID_HANDLE_VALUE == AfxMessageBox(_T( THREADENTRY32 Te32 = { Te32.dwSize = BOOL bRet = Thread32First(hSnap, & (Te32.th32OwnerProcessID == HANDLE hThread = bRet = Thread32Next(hSnap, & POSITION pos = iSelected = - iSelected = (- == AfxMessageBox(_T( TCHAR szProcessID[] = { m_ListProcess.GetItemText(iSelected, , szProcessID, CProcessManagerDlg::DebugPrivilege( HANDLE hToken = BOOL bRet = OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, & (TRUE == tp.PrivilegeCount = LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tp.Privileges[ tp.Privileges[].Attributes = AdjustTokenPrivileges(hToken, FALSE, &tp, }
下載地址如下:
http://pan.baidu.com/s/1o659BR0