当前位置: 首页>>代码示例>>C++>>正文


C++ TDesC16::Size方法代码示例

本文整理汇总了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.
	}
开发者ID:cdaffara,项目名称:symbiandump-mw1,代码行数:9,代码来源:tvwappui.CPP

示例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);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:38,代码来源:MSCHAP.CPP

示例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;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:24,代码来源:ost.cpp

示例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;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:26,代码来源:ost.cpp

示例5: Write

// ---------------------------------------------------------
// RUnicodeFile::Write
// ---------------------------------------------------------
//
TInt RUnicodeFile::Write( const TDesC16& aDes )
    {
    return iFile.Write ( TPtrC8( (const TUint8*)aDes.Ptr(), aDes.Size() ) );
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:8,代码来源:UnicodeFile.cpp


注:本文中的TDesC16::Size方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。