CeRunAppAtEvent

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

How does this work? Do you run it once and it writes something to the
registry in order to let CE to look for the executable? Does the
launched application get an event that lets you know it was started in
response to this condition?
 
It's held in the object store, not the registry. You get a command line
specific to the event.

-Chris
 
Visit http://www.opennetcf.org
Paul said:
How does this work? Do you run it once and it writes something to the
registry in order to let CE to look for the executable? Yes.
Does the launched application get an event that lets you know it was
started in
response to this condition?
No, it is passed a command-line parameter. See the description of
CeRunAppAtEvent in MSDN documentation
In case of CF applications the problem is that on PPC the new instance will
simply activate the old one and quit - your code will never get a chance to
execute and in the old instance all you get is an Activate event. Search
this news for various technics to overcome this. The best one I know is to
have a small command-line app - a launcher, that would register with
CeRunAppAtEvent and either start a new instance of your app or send a
prearranged signal to the existing one
 
If I don't want to write a small isntall program, can I call this from
the program itself every time to make sure that the program is
subsequently ready to come alive on the given event?
 
There is no documented way to do it without a small helper application. You
would really be better of by going this way. If you want the undocumented
way, let me know
 
You could use CeSetUserNotification and use an event to be signaled instead
of app launch. In your app spawn a worker thread at startup that waits for
this event.

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate
 
Back
Top