Click here to Skip to main content
15,881,455 members
Articles / Desktop Programming / MFC

Remote Processes and Machine control of Windows NT based systems (2000/XP)

Rate me:
Please Sign up or sign in to vote.
4.80/5 (35 votes)
1 Apr 2012CPOL5 min read 156.5K   8.9K   103  
Control certain aspects of machines sitting remotely, without having to install and trigger an application on the remote machine.
#ifndef REMOTEADMINVIEW_H
#define REMOTEADMINVIEW_H

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

#include <afxcview.h>

class CRemoteAdminView : public CListView
{
	DECLARE_DYNCREATE(CRemoteAdminView)
    DECLARE_MESSAGE_MAP()

public:
    virtual ~CRemoteAdminView();
	CRemoteAdminDoc* GetDocument();
    void RefreshProcesses(CString strRemoteMachineIP);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRemoteAdminView)
	public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	protected:
	virtual void OnInitialUpdate(); // called first time after construct
	//}}AFX_VIRTUAL

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
    CRemoteAdminView();    // create from serialization only

	//{{AFX_MSG(CRemoteAdminView)
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnEndProcess();
	//}}AFX_MSG
    
	afx_msg void OnStyleChanged(int nStyleType, LPSTYLESTRUCT lpStyleStruct);
    CString m_strLastClickedProcessID;
};

#ifndef _DEBUG  // debug version in RemoteAdminView.cpp
inline CRemoteAdminDoc* CRemoteAdminView::GetDocument()
   { return (CRemoteAdminDoc*)m_pDocument; }
#endif

#endif // REMOTEADMINVIEW_H

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
Web Developer
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