本文整理汇总了C++中TResourceReader::ReadHBufC16L方法的典型用法代码示例。如果您正苦于以下问题:C++ TResourceReader::ReadHBufC16L方法的具体用法?C++ TResourceReader::ReadHBufC16L怎么用?C++ TResourceReader::ReadHBufC16L使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TResourceReader
的用法示例。
在下文中一共展示了TResourceReader::ReadHBufC16L方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetTitleL
// ---------------------------------------------------------
// CNSmlDsProvisioningAdapter::GetTitleL
// ---------------------------------------------------------
void CNSmlDsProvisioningAdapter::GetTitleL()
{
if( iTitle == 0 )
{
RFs fs;
User::LeaveIfError( fs.Connect() );
CleanupClosePushL( fs );
TFileName fileName;
TParse parse;
parse.Set( KNSmlDsPovisioningDirAndResource, &KDC_RESOURCE_FILES_DIR, NULL );
fileName = parse.FullName();
RResourceFile resourceFile;
BaflUtils::NearestLanguageFile( fs, fileName );
resourceFile.OpenL( fs, fileName );
CleanupClosePushL( resourceFile );
HBufC8* dataBuffer = resourceFile.AllocReadLC( R_SYNC_PROVISIONING_TITLE );
TResourceReader reader;
reader.SetBuffer( dataBuffer );
iTitle = reader.ReadHBufC16L();
CleanupStack::PopAndDestroy( 3 ); //fs, resourcefile, databuffer
}
}
示例2: ConstructL
// Complete the construction of the
// CResData object using the supplied
// reource reader representing the resource data.
// The structure of the data is assumed to be
// defined by the resource struct DATA in "ReadData.rh"
void CResData::ConstructL(TResourceReader& aReader)
{
// Interpret next bytes as a TInt16
iWrd = aReader.ReadInt16();
// Interpret next bytes as a TInt16
iFlags = aReader.ReadInt16();
// Interpret next bytes as a TInt32
iLng = aReader.ReadInt32();
iTxt = aReader.ReadTPtrC();
// Interpret the next byte as the length
// of text. The text itself follows
// this byte.
iLtxt = aReader.ReadHBufC16L();
// Interpret the next byte as a TInt8
iByt = aReader.ReadInt8();
// Interpret next bytes as a TReal
iDbl = aReader.ReadReal64();
}
示例3: ConstructFromResourceL
// ---------------------------------------------------------------------------
// CLangName::ConstructFromResourceL()
// ---------------------------------------------------------------------------
//
void CLangName::ConstructFromResourceL( TResourceReader& aReader )
{
iId = static_cast< TLanguage >( aReader.ReadInt16() );
iName = aReader.ReadHBufC16L();
}