| Reply | « Previous Thread | Next Thread » |
|
Can anyone provide the sample code to use Start-on-boot API to launch exe file?
Thanks! |
|
|
|
The codes below do not work with the downloaded ExeStartOnBoot.h
.cpp--------------------------------------------- #include "ExeStartOnBoot.h" #include <e32base.h> #include <e32def.h> _LIT(KWatchCallApp, "\\system\\apps\\run\\run.exe"); void MainL() { RServiceStartOnBoot sob; sob.CreateL(); CleanupClosePushL(sob); sob.AddServiceL(KWatchCallApp); sob.Close(); CleanupStack::PopAndDestroy(); } // Cleanup stack harness GLDEF_C TInt E32Main() { __UHEAP_MARK; CTrapCleanup* cleanupStack = CTrapCleanup::New(); TRAPD(error, MainL()); __ASSERT_ALWAYS(!error, User::Panic(_L("ExeStartOnBoot"), error)); delete cleanupStack; __UHEAP_MARKEND; User::Exit(0); return KErrNone; // and return } .mmp---------------------------------------------- TARGET ExeStartOnBoot.exe TARGETTYPE exe UID 0 SOURCEPATH . SOURCE ExeStartOnBoot.cpp USERINCLUDE . SYSTEMINCLUDE . \epoc32\include LIBRARY euser.lib //ws32.lib ------------------------------------------- Any help? Thanks... |
|
whell first of all you should tell you that my start-on-boot is also not working. but I can see that some things are missing in your code
1-you need to add the EXESTARTONBOOT.LIB to your .mmp (don't forget to use makmake after you add this LIB) 2-I think that where you have #include "exestartonboot.h" you should have #include <exestartonboot.h> (I'm not shure if this is relevant) Tell me then if you can put this thing working Hugo Maurício |
|
Yes, after add the EXESTARTONBOOT.LIB to the mmp, it compiles successfully. But when run the exe file, it gives error that missing startonbootdb.dll, which is odd. I still don't know why there is a class CServiceStartOnBootDb in .h file and how to use it. Possible the missing dll is from this class.
Any idea? |
|
Hey!!
Yes that is odd and happend to me too in the emulator. But have you tried it in a mobile phone? Whell I did and it doesn't work! Hugo |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| PC Suite error: (Code: Init IMediaControl2) HELP?! | chunkyspudmonkey | General Discussion | 29 | 2008-06-30 12:47 |
| Is there a C++ API for the video player | avbrozhko | General Symbian C++ | 9 | 2008-06-06 15:34 |
| Cryptography (cryptalg) API on Series 60? | cbrueckner | General Symbian C++ | 0 | 2003-05-08 12:16 |
| Cryptography (cryptalg) API on Series 60? | cbrueckner | Symbian Tools & SDKs | 0 | 2003-05-08 12:12 |
| MMS API and Start Java Application | chrisdah | Mobile Java General | 1 | 2003-03-04 13:24 |