-46 error:平台安全问题

来源:互联网 发布:app原型设计工具 mac 编辑:程序博客网 时间:2024/05/19 12:11

使用RProperty::Define时出现如下错误:

*PlatSec* WARNING - Secure Id Check would have failed - Process Console[eaa429d8]0001 attempted an operation requiring the secure id: e3fbcccc.  Additional diagnostic message: Checked whilst trying to Define a Publish and Subscribe Property

 

46 (KErrPermissionDenied) means you are missing some capabilities

 

解决:

const TInt KMaxStrLen = 10;
const TUid KMyProperty = {0xE3FBCCCC};
//const TUid KMyProperty = {0x10003b20};
enum TMyPropertyKeys { EIntProperty, EStrProperty };

 

TInt ret=RProperty::Define(KMyProperty ,EIntProperty,RProperty::EInt);
if (ret != KErrAlreadyExists)
{
User::LeaveIfError(ret);
}

KExampleProperty的值设为:0x10003b20

 

 

深入:平台安全问题