WEB开发网
开发学院手机开发Symbian 开发 Symbian 杀死进程的实现 Kill process for symbia... 阅读

Symbian 杀死进程的实现 Kill process for symbian

 2010-04-20 16:09:00 来源:WEB开发网   
核心提示:Kill process for symbian//Kill process for symbianvoid KillProcess(const TDesC& aProcessNameNotExtName){ //根据程序名,在系统中杀掉一个进程 KillProcess(_L(“HelloWorld”));TFullN

Kill process for symbian

//Kill process for symbian

void KillProcess(const TDesC& aProcessNameNotExtName)

{ //根据程序名,在系统中杀掉一个进程 KillProcess(_L(“HelloWorld”));

TFullName name;

TFindProcess finder;

while(finder.Next(name) == KErrNone)

{

console->Printf(_L(“%S ”),&name);

// console->Getch();

// check if this is our process

if(name.FindF(aProcessNameNotExtName) != KErrNotFound)

{

RProcess process;

if(process.Open(finder, EOwnerProcess) == KErrNone) // Open process

{

process.Kill(KErrNone); // Kill process

process.Close();

}

}

}

}

Tags:Symbian 杀死 进程

编辑录入:coldstar [复制链接] [打 印]
赞助商链接