Community: Wiki

你在这里: You Are Here: Olet tässä: Vous êtes ici: Sie befinden sich hier: Tu sei qui: 現在のページ: Você está aqui: Вы здесь: Usted está aquí:
 

Talk:Process and threads, how to find them

From Forum Nokia Wiki

This code not work whene process have panic or was killed:

TBool IsProcessRunning(void)
{
    TBool Ret(EFalse);
	
    TFileName res;
    TFindProcess find;
    while(find.Next(res) == KErrNone)
    {
    	RProcess ph;
	ph.Open(res);
	  	  			
	#ifdef __SERIES60_3X__	
	  	if(ph.SecureId() == 0x12345678)// SID of the process we are looking for
	#else
		if(ph.FileName().Find(KtxApplicationFileName) != KErrNotFound)
	#endif
	 	{
	  		Ret = ETrue;
	  		break;
	  	}
  	
	ph.Close();
    }
 
    return Ret;
}

So I use antoher if

...
if(ph.SecureId() == 0x12345678)// SID of the process we are looking for
...
if (ph.ExitType() == EExitPending)
{
	Ret = ETrue;
	break;
}	
...
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Invite a friend Invite a friend
E-mail Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us Regional websites: Chinese Japanese © 2008 Nokia 
RDF Facets: qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZWebpageQ qfnZtypeQUqfnTypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX