×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    90

    KErrPermissionDenied and Keylistener

    Hi
    when my app executes the following istruction

    TRAP(errorCode,User::LeaveIfError( iCaptureHandle = iWindowGroup->CaptureKey( KKeyCode0 , 0, 0 )));

    it exits with the following code:
    errorCode=-46

    (KErrPermissionDenied = -46 An operation cannot be performed due to a potential security violation.)

    I have added SwEvent Capability in the mmp file.

    the code is at the following link

    http://discussion.forum.nokia.com/fo...d.php?t=119211

    mmp file

    TARGET GlobalKeyCaptureGUI_0xE46B04C6.exe
    TARGETTYPE exe
    UID 0x100039CE 0xE46B04C6

    SOURCEPATH ..\src
    SOURCE GlobalKeyCaptureGUI.cpp
    SOURCE GlobalKeyCaptureGUIApplication.cpp
    SOURCE GlobalKeyCaptureGUIAppView.cpp
    SOURCE GlobalKeyCaptureGUIAppUi.cpp
    SOURCE GlobalKeyCaptureGUIDocument.cpp

    SOURCEPATH ..\data

    START RESOURCE GlobalKeyCaptureGUI.rss
    HEADER
    TARGET GlobalKeyCaptureGUI_0xE46B04C6.rsc
    TARGETPATH resource\apps
    END //RESOURCE

    START RESOURCE GlobalKeyCaptureGUI_reg.rss
    TARGET GlobalKeyCaptureGUI_0xE46B04C6_reg.rsc
    TARGETPATH \private\10003a3f\apps
    END //RESOURCE



    USERINCLUDE ..\inc
    USERINCLUDE ..\help

    SYSTEMINCLUDE \epoc32\include

    LIBRARY euser.lib
    LIBRARY apparc.lib
    LIBRARY cone.lib
    LIBRARY eikcore.lib
    LIBRARY avkon.lib
    LIBRARY commonengine.lib
    LIBRARY efsrv.lib
    LIBRARY estor.lib
    LIBRARY aknnotify.lib
    LIBRARY hlplch.lib ws32.lib apgrfx.lib


    LANG SC

    VENDORID 0
    SECUREID 0xE46B04C6
    CAPABILITY ReadUserData
    CAPABILITY SwEvent
    // End of File
    SOURCEPATH ..\src
    SOURCE GlobalKeyCapture.cpp




    Could you help me ,please?

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: KErrPermissionDenied and Keylistener

    You should not have multiple CAPABILITY lines in the .mmp, since only the first one will be taken into account.

  3. #3
    Regular Contributor
    Join Date
    Oct 2007
    Posts
    90

    Re: KErrPermissionDenied and Keylistener

    Could I have in .mmp file one line like this?


    CAPABILITY ReadUserData SwEvent



    Quote Originally Posted by wizard_hu_ View Post
    You should not have multiple CAPABILITY lines in the .mmp, since only the first one will be taken into account.

  4. #4
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: KErrPermissionDenied and Keylistener

    you are right gemilib line is very important if you did not mention this in your mmp file by default the capability is none and for key handling you need SwEvent capability.

    for more detail about mmp file look "mmp File" in sdk.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

Posting Permissions

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