×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    53

    can not understand this error? can someone solve it? related to TDES.copy()

    I get errors

    'TDes8::Copy(const TDesC16 &)' (non-static)
    'TDes8::Copy(const TDesC8 &)' (non-static) TRM_Symb/src
    'TDes8::Copy(const unsigned char *, int)' (non-static)
    'TDes8::Copy(const unsigned char *)' (non-static)
    function call '[const TDes8].Copy(TPtrC8)' does not match

    code is
    _LIT(KTxtFileName, "c:\\Data\\Images\\LbsSample.jpg");

    iJPG_Reader = new(ELeave)CTRM_SymbImageReader(*this);
    iJPG_Reader->ConstructL(KTxtFileName);

    void CTRM_SymbImageReader::ConstructL(const TDesC& aFileName)
    {
    TBuf8<255> ImageType;
    GetFileType(aFileName, ImageType);
    -------
    ------
    }

    ----------------------------------------------------------------

    void CTRM_SymbImageReader::GetFileType(const TDesC& aFileName, const TDes8& aFileType)
    {
    TEntry FileEntry;

    if(CCoeEnv::Static()->FsSession().Entry(aFileName,FileEntry) == KErrNone)
    {
    TBuf8<255> FileBuffer;

    if(!FileEntry.IsDir())
    {
    TInt FileSize = FileEntry.iSize;

    if(FileSize > 255)
    {
    FileSize = 255;
    }

    if(CCoeEnv::Static()->FsSession().ReadFileSection(aFileName,0,FileBuffer,FileSize) == KErrNone)
    {
    RApaLsSession RSession;
    if(RSession.Connect() == KErrNone)
    {
    TDataRecognitionResult FileDataType;

    RSession.RecognizeData(aFileName,FileBuffer,*&FileDataType);

    // if(FileDataType.iConfidence > aResult.iConfidence)
    // {
    aFileType.Copy(FileDataType.iDataType.Des8());
    //opy(/*FileDataType.iDataType.Des8()*/);
    // }

    RSession.Close();
    }
    }
    }
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    4,538

    Re: can not understand this error? can someone solve it? related to TDES.copy()

    you might find info here useful:
    http://descriptors.blogspot.com/

    Note: use code tags when pasting code, so that anybody wanting to check it more carefully feels encouraged to do so.

  3. #3
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: can not understand this error? can someone solve it? related to TDES.copy()

    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: can not understand this error? can someone solve it? related to TDES.copy()

    try changing the "const TDes8& aFileType" to "TDes8& aFileType"

  5. #5
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    53

    Re: can not understand this error? can someone solve it? related to TDES.copy()

    I did not notice the const
    It is solved now

    Thanks

Similar Threads

  1. Solve any build related problem
    By umesh.roy in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-01-25, 10:31

Posting Permissions

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