Thursday, January 22, 2015

HOW TO KILL AN EXE?


TFindProcess process(_L("*"));//NAME PATTERN
TFullName aResult;
TBuf<32> aPtr(_L("ATCamera"));
//GET ALL THE PROCESS NAME WHICH MET'S THE NAME PATTERN
while(process.Next(aResult)==KErrNone)
{
 TInt pId= aResult.Find(aPtr); //FIND THE ATCAMERA.EXE
 RDebug::Printf("matches the name %d",pId);
 if(pId != KErrNotFound)
 {
 RProcess myProcess;
 myProcess.Open(process);
 myProcess.Kill(0);
 myProcess.Close();
 }
}

0 comments:

Post a Comment