×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Location
    51°11'4.78"N -|- 2°48'27.05"E (Belgium)
    Posts
    730

    Error opening a system file

    HI,
    I'm trying to open a system ini file with the following code :

    TFileName fn( _L("c:\\system\\shareddata\\100058b3.ini&quot );
    RFile file;
    TInt fileErr = file.Open( fsSession, fn, EFileRead|EFileShareReadersOnly );

    (the fsSession is defined somewhere else)
    the fileErr return the error code of KErrInUse !! the attributes are define to share ! how can therefore open a file which is already in use ??

    Thanks,
    Dominique HUGO
    ----------------------------------------------------------------------------------
    FExplorer is my baby !

    you can get the FREE version from www.gosymbian.com
    you can get the PRO version from http://store.ovi.com/content/339454

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146
    i think if u have to access any internal system file u will have to use the ETel Server..it will not let u access it directly.correct me if m wrong.
    ciao

  3. #3
    Regular Contributor
    Join Date
    Jun 2007
    Location
    Bangkok
    Posts
    84

    Re: Error opening a system file

    I found the same problem as Jeepy.

    Yesterday,my program can read system file
    c:\\System\\Shareddata\\10005a32.ini

    but today I cannot open it. The error code that my program receive is "KErrInUse" (-14).

    Code:
            _LIT(KSysINIFile, "c:\\System\\Shareddata\\10005a32.ini");            
    
    	RFs iFs;
    	iFs.Connect();
    	RFile hist;
    		
    	TInt errorcode = hist.Open(iFs,KSysINIFile,EFileRead|EFileShareReadersOnly);
    This problem is appearing when symbianOS have to rewrite new data in "c:\\System\\Shareddata\\10005a32.ini". After that, my program cannot read file "c:\\System\\Shareddata\\10005a32.ini".

    Phone Restart --> Open My Program for reading this file --> OK

    but

    Phone Restart --> Open My Program for reading this file --> OK ---> Apply Theme to new one ---> Symbian rewrite new data into "c:\\System\\Shareddata\\10005a32.ini" ----> my program cannot read this file at all (GET ERROR KErrInUse -14).
    Last edited by junmobus; 2008-04-19 at 21:32.
    Sawaddee krab.

  4. #4
    Regular Contributor
    Join Date
    Jun 2007
    Location
    Bangkok
    Posts
    84

    Re: Error opening a system file

    Solved it

    change the last parameter in RFile.Open function to be
    Code:
    EFileWrite|EFileShareAny
    because symbian have to write data into this file and my program have to read this file.

    use this instead
    Code:
    _LIT(KFilename,"filename.ext");
    RFile file;
    file.Open(theFs,KFilename,EFileWrite|EFileShareAny);
    http://www.symbian.com/developer/tec...eModeEnum.html
    Sawaddee krab.

Posting Permissions

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