Summarize the issues of embedded SIS self-starting.
Average Program You can use RSS to start your programs. But embedded in another SIS package
After the installation is complete, restart the built-in SIS on the mobile phone and you will not be able to start it on your own. Sadly, I was surprised to find out how to use the dynamic theme of the magic show.
RSS packaging can be self-started. Why can't I do it? Is it a matter of character.
Let's take a look at how to build an embedded sis.
The following is the syntax of embedded sis in PKG.
If not package (0 xuid) // first determine whether your sis package is installed
@ "E: \ symbian3rd_mr \ yourapp \ SIS \ yourapp. Sis", (0 xuid)
Endif
Ah, time is not waiting for a person. I can only find another method to solve this problem.
Create your own plugin DLL and use the DLL to call your own exe.
The following describes how to implement it.
Tint cstart ***** recog: startappthreadfunction (Tany *)
{
User: After (5000000); // wait for five seconds until the system starts up.
// Create a trap cleanup
Ctrapcleanup * cleanup = ctrapcleanup: New ();
Tint err;
If (cleanup = NULL)
{
Err = kerrnomemory;
}
Else
{
Trap (err, startappthreadfunctionl ());
}
Delete cleanup;
If (Err! = Kerrnone)
User: panic (_ L ("autostart"), err );
Return err;
}
Bool cstart ***** recog: isprocessrunning ()
{
Bool ret = false;
Tbuf8 <128> AAAA;
Tfilename res;
Tfindprocess find (_ L ("*"));
While (find. Next (RES) = kerrnone)
{
Rprocess pH;
Ph. Open (RES );
If (pH. SecureID () = 0x20020000f) // SID of the process we are looking
{
Ret = true;
Ph. Close ();
Break;
}
Ph. Close ();
}
Return ret;
}
Void cstart ***** recog: startappthreadfunctionl ()
{
If (isprocessrunning ()){
Return;
}
// You can call your own EXE here
Tfilename fnapppath = _ L ("\ sys \ bin \ yourself.exe ");
Rprocess server;
Cleanupclosepushl (server );
User: leaveiferror (server. Create (fnapppath, _ L ("")));
Server. Resume ();
Server. Close ();
Cleanupstack: popanddestroy ();
}
Above Code Passed the test on n73