Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Closing Application with c++

Status
Not open for further replies.

felixsoft

Programmer
Nov 8, 2001
15
0
0
US
How can i use c++ to close an external application that is running. I'm trying to write a program that closes and deletes the MSN Messenger virus. Any help is appreciated.
Also if any one can tell me how to edit the registry with c++.
 
If u r going to use windows API then there r API's to do so.
 
Check the following APIs from MSDN for what you need:

EnumProcesses
GetModuleFileName
TerminateProcess

For the registry:
RegOpenKey
RegCloseKey
RegEnumKey

and all the Reg... functions
(Check for the topic "Registry Functions" in MSDN);

BTW, the second issue, with the registry I think it can't be done without APIs because is OS dependent.

HTH, s-)

Blessed is he who in the name of justice and goodwill, sheperds the weak through the valley of darkness...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top