Ejemplo n.º 1
0
TBool IsAlreadyRunning()
{
	RDebug::Print(_L("TrkLauncher::IsAlreadyRunning()"));

	_LIT(KTrkConsoleSearchPattern, "*TRKPROCESS*");
	_LIT(KTrkConsoleProcessPattern, "*");
	
	TFindProcess finder;
	TFullName fullName;
	TBool found = EFalse;
	finder.Find(KTrkConsoleProcessPattern);

	while (!found && finder.Next(fullName) == KErrNone)
	{
		fullName.UpperCase();
		
		if (fullName.Match(KTrkConsoleSearchPattern) != KErrNotFound)
		{
			found = ETrue;
			RDebug::Print(_L("process found Inside while"));
			break;
		}
	}

	if (found)
	{
		RDebug::Print(_L("TrkLauncher - Process found outside while"));
	}
	else
	{
		RDebug::Print(_L("TrkLauncher - Process was never found"));
	}
		
	return found;
}