×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Jul 2006
    Posts
    145

    Store the phone Uid s60 3rd edition

    Hi everybody!
    I work on series60 3rd edition, in this function i want to store the uid of my phone, but the line i pink provoques a "system error(-1)" and i don't why. If anybody has an idea... thanks!

    Code:
    void CmobifinditAppUi::StorePhoneAppUidL()
    {
    	_LIT (KFile,		 "Z:\\System\\Apps\\%S");
    	_LIT (KNowApp,	 "Now\\Now.app");
    	_LIT (KPhoneApp, "Phone\\Phone.app");
    
    	TBuf<64> mainApp;
    
    	TInt mUid;
    	HAL::Get (HALData::EMachineUid, mUid);
    	
    	// Test phone model
    	//TUint ESendoX = 0x101FA031;
    	//if((TUint)mUid == ESendoX)
    	//	mainApp.Format (KFile, &KNowApp);
    	//else
    	mainApp.Format (KFile, &KPhoneApp); // On N70 0x100058B3
    
    	TUid appUid;
    	TDataType dataType;
    
    	RApaLsSession apaLs;
    	User::LeaveIfError (apaLs.Connect ());
    	CleanupClosePushL (apaLs);
    
    	// crash with chinese emulator	
    	//#ifndef __WINS__
    	
    	User::LeaveIfError (apaLs.AppForDocument (mainApp, appUid, dataType));
    	TBool isProgram;
    	User::LeaveIfError (apaLs.IsProgram(mainApp,isProgram));
    
    	if (appUid != KNullUid)
    	{
    		TApaTaskList taskList (iCoeEnv->WsSession ());
    		//TApaTask task = (taskList.FindApp (appUid));
    		TApaTask task2 = (taskList.FindByPos (1));
    		CApaWindowGroupName* temp = CApaWindowGroupName::NewL (iCoeEnv->WsSession (), task2.WgId ());
    		temp->AppUid ();
    
    		if(task2.Exists ())
    		{
    			iPhoneAppUid = appUid;
    		}
    	}
    
    	//#endif
    		
    	CleanupStack::PopAndDestroy(); // apals
    }

  2. #2
    Regular Contributor
    Join Date
    Aug 2004
    Location
    East Coast, USA
    Posts
    192

    Re: Store the phone Uid s60 3rd edition

    Hi,
    s60 3rd changed folder structure and file locations. Application are not located anymore in \system\apps\

    Further applications are now .exe's instead of .app's

    So, the path and name you are specfiying is not correct anymore. Thus you get the -1 (not found) error back from the system.

    On the emulator the .exe's are in epoc\release\winscw\udeb (or urel)
    on the device in \sys\bin

    And your phone.app is now most likely phone.exe



    Best regards,

    -- Blizzz

Similar Threads

  1. S60 3rd Edition CCamera API
    By nokoder in forum Symbian Media (Closed)
    Replies: 8
    Last Post: 2009-04-28, 11:28
  2. S60 3rd Edition sdk emulator cannot be started up
    By ShirleyKing in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2009-03-11, 22:30
  3. Replies: 7
    Last Post: 2007-06-19, 12:01
  4. RTP stack on S60 3rd edition
    By kit_walker in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2006-09-28, 14:37
  5. What is going on with Vibration on S60?
    By amd_rikus in forum Mobile Java General
    Replies: 3
    Last Post: 2006-06-16, 00:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×