hi,
i was trying to launch email application with the following code,using the uid .

Messaging : 0x100058c5 (Z:\System\Apps\mce\mce.app)
E-mail : 0x101f4ce4 (Z:\System\Apps\MsgMailViewer\MsgMailViewer.app)
E-mail : 0x101f4cd6 (Z:\System\Apps\MsgMailEditor\MsgMailEditor.app)

it is not working.
but works for other application UID's

Pls help me to sought out the problem.





// LaunchmailL();
HBufC* param = HBufC::NewLC( 100 );
param->Des().Copy( _L( "4 http://203.193.157.40/apc/error.html/") );
Launchmail1L( *param );
CleanupStack::PopAndDestroy();


const TUid KPhoneUidWmlBrowser = { 0x100058c5 };


//function for launching using the UID of the application

void CLaunchmail::Launchmail1L(const TDesC& aAddr )
{
TUid id( KPhoneUidWmlBrowser );
TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
TApaTask task = taskList.FindApp( id );

if ( task.Exists() )
{
HBufC8* param8 = HBufC8::NewLC( aAddr.Length() );
param8->Des().Append( aAddr );
task.SendMessage( TUid::Uid( 0 ), *param8 ); // UID is not used
CleanupStack::PopAndDestroy( param8 );
}
else
{
if ( !iApaLsSession.Handle() )
{
User::LeaveIfError( iApaLsSession.Connect() );
}

TThreadId thread;
User::LeaveIfError( iApaLsSession.StartDocument( aAddr, KPhoneUidmail, thread ) );
}
}

//function for launching using the file path

void CLaunchmail::LaunchmailL()
{
TFileName AppToLaunch;
TBuf<100> iDoc;
AppToLaunch = _L("Z:\\System\\Apps\\mce\\mce.app");
iDoc = _L("4 http://wap.yahoo.com/");

CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
cmdLine->SetLibraryNameL(AppToLaunch);

if (iDoc != _L(""))
cmdLine->SetDocumentNameL(iDoc);

cmdLine->SetCommandL(EApaCommandOpen);
RApaLsSession ls;
User::LeaveIfError(ls.Connect());

TInt handle;
TInt initialAppCount;

handle = ls.Handle();
ls.EmbeddableAppCount( initialAppCount );
CleanupClosePushL(ls);
User::LeaveIfError(ls.StartApp(*cmdLine));
CleanupStack::PopAndDestroy(2);
}