Hi,
I am create a console app that should automatically run after I install it, but its not running, I have check in the process list using the Y-Task, its not there, but the other running apps are there in the process list.
here is the code
E20841DA.rss where E20841DA is the UID of the application (Not Protected) i am using developer sertificate.
.mmp fileCode:#include <startupitem.rh> RESOURCE STARTUP_ITEM_INFO devinfo { executable_name = "!:\\sys\\bin\\Timer.exe"; recovery = EStartupItemExPolicyNone; }
.pkg fileCode:SOURCEPATH ..\data START RESOURCE E20841DA.rss TARGET E20841DA.rsc TARGETPATH \resource END
.cpp fileCode:"$(EPOCROOT)epoc32\data\z\resource\Startup.rsc" -"c:\private\101f875a\import\[E20841DA].rsc" "$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\Timer.exe" -"!:\sys\bin\Timer.exe",FR,RI
Code:LOCAL_D CConsoleBase* console; // write all messages to this // Local Functions LOCAL_C void MainL() { // // add your program code here, example code below // console->Write(_L("Hello, world!\n")); } LOCAL_C void DoStartL() { // Create active scheduler (to run active objects) CActiveScheduler* scheduler = new (ELeave) CActiveScheduler(); CleanupStack::PushL(scheduler); CActiveScheduler::Install(scheduler); CActiveObject *iActiveObj = CActiveObject::NewL(); CleanupStack::PushL(iActiveObj); scheduler->Start(); // Delete active scheduler CleanupStack::PopAndDestroy(iActiveObj); CleanupStack::PopAndDestroy(scheduler); } // Global Functions GLDEF_C TInt E32Main() { // Create cleanup stack __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); // Run application code inside TRAP harness, wait keypress when terminated TRAPD(mainError, DoStartL()); delete cleanup; __UHEAP_MARKEND; return KErrNone; }
Please let me know where I am making mistake

Reply With Quote


