CaptureKey security capability on S60 v3

Login to reply to this topic.
Thu, 2006-10-05 15:53
Joined: 2004-06-13
Forum posts: 21
Hello,

I am trying to use RWindowGroup::CaptureKey/CaptureKeyUpAndDowns to override the default menu application (the customer's request Cheezy). The application works fine on the emulator (Carbide C++, Symbian OS 9, Series 60 v3), however on the phone (E50) when pressing the menu key, the default menu application is launched. On the phone, CaptureKey/CaptureKeyUpAndDowns returns -46 (KErrPermissionDenied). The SDK help says this error is returned if the ws.ini file has the requested key protected. What is this ws.ini file. I've searched it with FExplorer/Y-Browser on both a Nokia 6600 phone and also on the E50 phone and no such file was found. Perhaps on v3, the file is actually on the phone but the file explorer could not find it due to security issues. I've also could not find it on the SDK root on the hard disk.

Another source of the problem could be due to signing the application. I've used a Developer Certificate from Symbian Signed, which has rights for the SwEvent capability under which the CaptureKey/CaptureKeyUpAndDowns methods recide. However the same error (-46) is returned even when signing it with this certificate.

So my question would be whether the problem is related to ws.ini file or to the signing of the application. Actually any information related you might have would be very helpful.

Thanks.

Thu, 2006-10-05 17:39
Joined: 2004-06-13
Forum posts: 21
Re: CaptureKey security capability on S60 v3
I've made another application to test the RWsSession::SimulateKeyEvent which is also in the SwEvent capability. The method again works fine on the emulator but crashes on the phone with the WSERV 66 panic. So the problem seems to be from signing the application. Although my developer certificate was created with the SwEvent capabillity (I checked again on the SymbianSigned site for my generated certificate capabilities, and SwEvent is present) the application doesn't seem to really have it. So is there any way to test applications with Developer Certificates or do we have to pay 350$ (or even more) for a public certificate only for testing purposes??? But then again it might be just a E50 bug. So does anyone have any ideas on how to enforce the SwEvent capability?
Thanks a lot.
Thu, 2006-10-05 18:39
Joined: 2006-03-04
Forum posts: 194
Re: CaptureKey security capability on S60 v3
Signing hasn't really got anything to do with what capabilites your program has - these are defined in its .mmp file/s.
Signing just allows you to be able to install the software.

It doesn't matter what capabilies your certificate has got, if your program doesn't have them in the first place.

If you need SWEvent then your code has to be built with that, i.e. SWEvent has to be in the .mmp file.


Run on the emulator and then look in epocwind.out and see if you get a -46 in there. It'll tell you the reason.
Fri, 2006-10-06 10:36
Joined: 2004-06-13
Forum posts: 21
Re: CaptureKey security capability on S60 v3
Thanks a lot,
I didn't know I also had to add the needed capabilities in the mmp file. I did it and now it works fine.
Thanks.
Mon, 2008-02-11 13:24
Joined: 2007-08-02
Forum posts: 4
Re: CaptureKey security capability on S60 v3

Thaks from my side too...

Its solved my problem.

-bytes

  • Login to reply to this topic.