本文整理汇总了C++中TDesC16::Size方法的典型用法代码示例。如果您正苦于以下问题:C++ TDesC16::Size方法的具体用法?C++ TDesC16::Size怎么用?C++ TDesC16::Size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TDesC16
的用法示例。
在下文中一共展示了TDesC16::Size方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ActivateViewL
void CTestVwAppUi::ActivateViewL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC16& aCustomMessage)
{
HBufC8* narrowMessage=HBufC8::NewLC(aCustomMessage.Size());
TPtr8 ptr=narrowMessage->Des();
ptr.Copy((TUint8*)aCustomMessage.Ptr(),aCustomMessage.Size());
CCoeAppUi::ActivateViewL(aViewId,aCustomMessageId,*narrowMessage);
CleanupStack::PopAndDestroy(); // narrowMessage.
}
示例2: NtPasswordHashL
inline void CPppMsChap::NtPasswordHashL(const TDesC16& aPassword,
TDes8& aPasswordHash)
/**
Computes the hash of the Microsoft Windows NT password using MD4.
@param aPassword [in] The Microsoft Windows NT password (0 to 256
Unicode char).
@param aPasswordHash [out] The MD4 hash of the Microsoft Windows NT
password (16 octets).
@note This function implements the NtPasswordHash routine specified
in RFC 2433.
@internalComponent
*/
{
ASSERT(aPassword.Length() <= KPppMsChapMaxNTPasswordLength);
ASSERT(aPasswordHash.Length() == KPppMsChapHashSize);
// The following code does not use the Symbian Security subsystem
// components, because they do not provide a MD4 implementation yet.
// This is a provisional solution until the Symbian Security subsystem
// components will provide a MD4 implementation.
CMd4* md4 = CMd4::NewL();
CleanupStack::PushL(md4);
// The following code assumes that the data in TDesC16 descriptors is
// stored in little endian byte order, which is currently a
// characteristic of Symbian OS, so the reinterpret_cast is assumed to
// be safe here.
md4->Input(TPtrC8(reinterpret_cast<const TUint8*>(
aPassword.Ptr()),
aPassword.Size()));
md4->Output(aPasswordHash);
CleanupStack::PopAndDestroy(md4);
ASSERT(aPasswordHash.Length() == KPppMsChapHashSize);
}
示例3: OstPrint
/**
Prints a string by outputting a trace packet with the Trace ID KFormatPrintfUnicode
If the specified string is too long to fit into a single trace packet
a multipart trace is generated.
@deprecated
@param aContext The trace packet context. @see TTraceContext
@param aDes The string. This must not be longer than 256 characters.
@return The trace packet was/was not output.
@See BTrace::TMultipart
*/
EXPORT_C TBool OstPrint(const TTraceContext& aContext, const TDesC16& aDes)
{
if(IsTraceActive(aContext))
{
GET_PC(pc);
return OST_SECONDARY_ANY(aContext.GroupId(), aContext.ComponentId(), aContext.HasThreadIdentification(), aContext.HasProgramCounter(), pc, KFormatPrintfUnicode, aDes.Ptr(), aDes.Size());
}
return EFalse;
}
示例4: OstTrace
/**
Outputs a trace packet containing variable length data.
If the specified data is too big to fit into a single
trace record a multipart trace is generated.
@deprecated
@param aContext Attributes of the trace point.
@param aTraceId The trace point identifier as specified by @see TTraceId
@param aData Additional data to add to trace packet.
Must be word aligned, i.e. a multiple of 4.
@return The trace packet was/was not logged.
@See BTrace::TMultipart
*/
EXPORT_C TBool OstTrace(const TTraceContext& aContext, const TTraceId aTraceId, const TDesC16& aData)
{
if(IsTraceActive(aContext))
{
GET_PC(pc);
return OST_SECONDARY_ANY(aContext.GroupId(), aContext.ComponentId(), aContext.HasThreadIdentification(), aContext.HasProgramCounter(), pc, aTraceId, aData.Ptr(), aData.Size());
}
return EFalse;
}
示例5: Write
// ---------------------------------------------------------
// RUnicodeFile::Write
// ---------------------------------------------------------
//
TInt RUnicodeFile::Write( const TDesC16& aDes )
{
return iFile.Write ( TPtrC8( (const TUint8*)aDes.Ptr(), aDes.Size() ) );
}