本文整理汇总了C++中TDes16::MaxSize方法的典型用法代码示例。如果您正苦于以下问题:C++ TDes16::MaxSize方法的具体用法?C++ TDes16::MaxSize怎么用?C++ TDes16::MaxSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDes16
的用法示例。
在下文中一共展示了TDes16::MaxSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Get
/** Reads a descriptor setting.
@param aKey Key of setting to be read.
@param aValue Returns the value of the setting if it is a descriptor.
@return
KErrNone if successful,
KErrNotFound if the setting does not exist,
KErrArgument if the setting exists but is not a descriptor,
KErrOverflow if the descriptor is too small to receive the value in the repository,
plus other system-wide error codes.
@post Transactions fail only on those "other system-wide error codes".
@capability Dependent Caller must satisfy the read access policy of that key in the repository.
*/
EXPORT_C TInt CRepository::Get(TUint32 aKey, TDes16& aValue)
{
TPtr8 ptr8((TUint8*)aValue.Ptr(), 0, aValue.MaxSize());
TInt ret=Get(aKey,ptr8);
if (ret==KErrNone)
aValue.SetLength(ptr8.Length()/2);
return ret;
}