Click here to Skip to main content
15,899,314 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello sir/madam,
I am MCA student. I want to do a networking project-"Process dispatcher" in c++.
Basic idea behind this project is-There are many computers connected to each other in LAN. On server machine,admin should be able to view each of the client's running processes and admin should have rights to end/kill any unwanted process on client's machine.
This can be useful for e.g.-during computer practicals,online exams one should not be able to open any browser for copy purpose etc.
So my question is can we implement such idea in c++?If yes,plz guide me ho to do that as soon as possible.
Posted

Frnd!

yes you can do this in C++.


To connecto any server : use
HANDLE hServer = WTSOpenServer(char *ServerName);
This returns the handle to the server.

With this handle, enumerate the process on the server machine using the api

ASM
DWORD pCount = 0;
PWTS_PROCESS_INFO ppProcessInfo,pProcess;



WTSEnumerateProcesses(hServer,0,1,&ppProcessInfo,&pCount);

C#
for(int i = 0; i < pCount; i++)
{
    pProcess->pProcessName;
    pProcess++;
}


With this process structure. Iterate for the "iexplore.exe" and if it exists kill the process!

Hope this will help u.
 
Share this answer
 
Comments
Ashish Tyagi 40 8-Sep-11 3:31am    
Nice one my 5
You need (at least) three cooperating applications:
  • A Windows application, running on Windows clients, able to list and terminate any local process (and to communicate with the application running on the server).
  • A Linux application, running on Linux clients, able to list and terminate any local process (and to communicate with the application running on the server).
  • An application running on the server (Windows or Linux, depending precisely on server OS), able to communicate with the above applications.


Encrypted communication between server and clients would be a bonus.
Please note that, from an architectural point of view, the applications running on the clients are 'the server' ones.

Good luck.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900