Hi,

my problem is illustrated by the following code...

Code:
void CServerSettings::CreateAMRFileNameL(const TDesC aFilePath, const TDesC& aAMRFilename )
	{
	
	TInt64 currentTimeMillis = (static_cast<CTMSAppUi*>( iEikonEnv->EikAppUi() ) )->iDatabaseEngine->GetCurrentTimeMillis();
	
	TBuf<255> caption( NULL );
	TBuf<255> caption2( NULL );
	HBufC* buffer = HBufC::NewLC( 255 );
	HBufC* result = HBufC::NewLC( 255 );

	_LIT( KFormat, "%Ld" );
	_LIT( KFileExtension, ".amr" );		


	caption.Append( aFilePath );
	caption.Append( KFormat );
        caption.Append( KFileExtension );
	
	
	caption2.Format( caption, currentTimeMillis );
	buffer->Des().Append( aFilePath );
	buffer->Des().Append( KFormat() );
        buffer->Des().Append( KFileExtension() );
	
	result->Des().Format( *buffer, currentTimeMillis );
	
	
	CleanupStack::PopAndDestroy( buffer );
	
	aAMRFilename = &caption2;
	
	CleanupStack::PopAndDestroy( result );
	}

I want to put a filepath like "C:\\Data\\" to my method
inside my method i want to append "%Ld" (my format) then format my buffer with filename + extension.
And then put the result back to aAMRFilename. How do i do this?


Greetz
Franky


(These TDesC, HBufC*, TPtr stuff drives me mad)