Click here to Skip to main content
15,891,136 members
Articles / Desktop Programming / MFC

Process viewer

Rate me:
Please Sign up or sign in to vote.
4.94/5 (104 votes)
9 Mar 2008CPOL9 min read 456.5K   22K   294  
Lists out the details of running processes in a system, loaded drivers, loaded dlls, version of each dll and process, process times, command line, owner, priority, GDI resource usage, privileges, loaded symbols, window heirarchy, autostart app finding and more.
#pragma once
#include "afxwin.h"

#include "ProcessPrivilegeMgr.h"


// CPrivilegeMgrDlg dialog
class CPrivilegeMgrDlg : public CDialog
{
	DECLARE_DYNAMIC(CPrivilegeMgrDlg)
public:

	CPrivilegeMgrDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CPrivilegeMgrDlg();

    bool SetProcessHandle( HANDLE hProcess )
    {
        ASSERT( hProcess );
        if( !m_ProcessPrivMgr.OpenKeepProcessToken( hProcess ))
		{
			Utils::GetLastErrorMsg();
			return false;
		}

		return true;
    }

// Dialog Data
	enum { IDD = IDD_PRIVILEGE_MGR };

protected:

	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    virtual BOOL OnInitDialog();
    void Refresh();
    void OnCheckPrivilegeList();

private:
    CCheckListBox m_PrivilegeLstBx;
    CProcessPrivilegeMgr m_ProcessPrivMgr;

	DECLARE_MESSAGE_MAP()
    afx_msg void OnBnClickedButtonDisableall();
    afx_msg void OnBnClickedButtonEnableAll();
    afx_msg void OnBnClickedButtonRemoveAll();
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Microsoft
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions