installationservices/swi/source/sisregistry/server/scrhelperutil.cpp
changeset 75 2d2d25361590
parent 44 329d304c1aa1
equal deleted inserted replaced
69:b18a4bf55ddb 75:2d2d25361590
  1454 // Extracts the UID of the component from it's global Id data.
  1454 // Extracts the UID of the component from it's global Id data.
  1455 // Just an string to TUid conversion.
  1455 // Just an string to TUid conversion.
  1456 void ScrHelperUtil::ExtractCompUidL(const TDesC& aGlobalIdStr, TUid& aUid)
  1456 void ScrHelperUtil::ExtractCompUidL(const TDesC& aGlobalIdStr, TUid& aUid)
  1457 	{
  1457 	{
  1458 	TInt64 uidNum;	
  1458 	TInt64 uidNum;	
  1459 	// Make sure the length of the global id string is exactly 8 chahacters in length.
       
  1460 	__ASSERT_ALWAYS((aGlobalIdStr.Length() == 8), User::Leave(KErrCorrupt));
       
  1461 	TLex lex(aGlobalIdStr);
  1459 	TLex lex(aGlobalIdStr);
  1462 	TInt error = lex.Val(uidNum, EHex);
  1460 	TInt error = lex.Val(uidNum, EHex);
  1463 	__ASSERT_ALWAYS((error == KErrNone), User::Leave(error));
  1461 	__ASSERT_ALWAYS((error == KErrNone), User::Leave(error));
  1464 	aUid = TUid::Uid(uidNum);
  1462 	aUid = TUid::Uid(uidNum);
  1465 	}
  1463 	}