Using RunAppAtTime method

G

Guest

Dear All,
I am using RunAppAtTime() to run an application at a specified time, and it
works very good. but now what i want is when the program run, a specified
method in my code be called to run, is this possible and if yes how is that?
if no, what other solutions i could use?
Thanks in advance
Best Regards

Tamer Hesham
 
P

Peter Foot [MVP]

If you app is not running already you could use a command line argument to
perform a particular function - you'll need to change the default static
void main to accept a string array into which your command line arguments
will be placed.
Alternatively if you want to signal to your already running application you
could use a number of methods, for example signal a named event (which you
can do from the notify APIs such as CeRunAppAtTime by passing the event name
into the appName in the format
"\\\\.\\Notifications\\NamedEvents\\Event Name"
Then in your app have a thread waiting on this named event, and fire off
your specific process when the event is signalled. For more details on IPC
options check out the definitive blog post:-
http://www.danielmoth.com/Blog/2004/09/ipc-with-cf-on-ce-part-1.html

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top