Click here to Skip to main content
15,886,137 members
Articles / Desktop Programming / MFC

GetProcessTimes

Rate me:
Please Sign up or sign in to vote.
4.29/5 (12 votes)
4 May 20042 min read 200.3K   2.9K   26  
How to retrieve the running-time of a process
#if !defined(AFX_PROCESSINFODLG_H__D00752A8_2ACD_4083_BAFE_F794D07284C9__INCLUDED_)
#define AFX_PROCESSINFODLG_H__D00752A8_2ACD_4083_BAFE_F794D07284C9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CProcessInfoDlg dialog

class CProcessInfoDlg : public CDialog
{
// Construction
public:
	CProcessInfoDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CProcessInfoDlg)
	enum { IDD = IDD_PROCESSINFO_DIALOG };
	CListCtrl	m_lcProcessInfo;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CProcessInfoDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CProcessInfoDlg)
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
    void Process( void );
    CString GetErrorMessage( void );
    DWORD GetModuleBaseName( const HANDLE hProcess, const HMODULE hModule, CString &strName );
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PROCESSINFODLG_H__D00752A8_2ACD_4083_BAFE_F794D07284C9__INCLUDED_)

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior) Pinnacle Business Systems
United States United States

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

HTTP 404 - File not found
Internet Information Services

Comments and Discussions