Click here to Skip to main content
13,256,716 members (51,025 online)
Click here to Skip to main content


474 bookmarked
Posted 23 May 2000

Remote Control PCs

, 20 Sep 2013
Two projects that work together to remote control PCs across a LAN.
#pragma once

#include <winsvc.h>

class CControlService
	CControlService(const TCHAR * pszServiceName = NULL);

	bool Open(const TCHAR * pszServiceName);
	void Close();
	bool IsOpen();
	bool IsAvailable();
	bool IsRunning();
	bool IsPaused();
	bool IsStopped();
	bool IsPending();
	bool Start();
	DWORD Stop();
	DWORD Pause();
	DWORD Continue();
	DWORD UserSync(DWORD dwOp = 0);
	bool Install(const TCHAR * pszServiceName,const TCHAR * pszDescription,const TCHAR * pszFileName);
	bool Remove(const TCHAR * pszServiceName);

	DWORD Query();
	DWORD Control(DWORD dwControl);

	SC_HANDLE m_hService;

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.


This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


About the Author

Andy Bantly
United States United States
Working as a software developer since 1989. Started out with Basic, FORTRAN and JCL, moved into Visual Basic 1.0, C, then C++, and now I work mainly in C++ using MFC, Win32, and ATL/COM. I use Microsoft Products only because that is what gives me gainful employment. Through work, I have a lot of experience with HTML, JavaScript, XSL transformations, the XMLHTTP object, PHP 4.x, and simple COM object integrations.

I've worked for the University of Oklahoma in the school of meteorology (Go SOONERS!), consulting, and now as a Senior Software Engineer. These things keep my lights on and electricity going. My dream job is to own a bowling alley and rub elbows with pro-bowlers! I'm also an avid pedicab driver and have my own cab. I like the hustle of picking up people in downtown and biking them to their destination.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171114.1 | Last Updated 20 Sep 2013
Article Copyright 2000 by Andy Bantly
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid