Symbian embedded SIS auto start (Inline SIS autostart ))

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.