Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor gemilib's Avatar
    Join Date
    Oct 2007
    Posts
    90
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    You should not have multiple CAPABILITY lines in the .mmp, since only the first one will be taken into account.

  3. #3
    Regular Contributor gemilib's Avatar
    Join Date
    Oct 2007
    Posts
    90
    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
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved