Re: Waitable Time Support
- From: Le Chaud Lapin <jaibuduvin@xxxxxxxxx>
- Date: Tue, 06 Nov 2007 17:30:20 -0800
On Oct 29, 9:01 pm, "Christopher Fairbairn"
<christop...@xxxxxxxxxxxxxx> wrote:
HiLeChaudLapin,
"LeChaudLapin" <jaibudu...@xxxxxxxxx> wrote in messagenews:1193507670.171498.240130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Oct 27, 11:25 am, "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote:
If you use CeRunAppAtTime and have it set a system event, then you
certainly
*can* use WaitForMultiple on those system events.
Hmm...CeRunAppAtTime seems to start an entire application at specific
time.
This functionality is a little hidden...
CeRunAppAtTime is documented on MSDN athttp://msdn2.microsoft.com/en-us/library/ms913957.aspxhowever as you
suggested the documentation tends to suggest the only way it works is to
launch an executable when the specific time occurs.
However if you look in notify.h i.e. the header file that contains this
function. You will find the following definitions:
//
// Application name can be prefixed with the following strings to specify
different
// named objects rather than an application. The action varies depending on
the prefix.
// In case of named event, the event gets signaled.
//
#define NAMED_EVENT_PREFIX_TEXT TEXT("\\\\.\\Notifications\\NamedEvents\\")
#define NAMED_EVENT_PREFIX_LEN
(sizeof(NAMED_EVENT_PREFIX_TEXT)/sizeof(TCHAR) - 1)
In other words if your application creates a named event (call CreateEvent
etc), and you pass the name of this event (with the above prefix attached)
as the "application name" the OS will set your event instead of attempting
to launch an executable.
You can obviously then use this event handle in your call to
WaitForMultipleObjects etc and will be notified when the specific time
occurs.
Hope this helps,
Christopher fairbairn
Hi,
I just wanted to say that, though I have not had time to try your
solution yet to see how it will fit in my C++ model, thanks. It is
obviously infinitely better than what I have now, which is a giant
zero, so I am really grateful. :)
If I have time to wrap the solution in C++ class , I will post the
result here.
-Le Chaud Lapin-
.
- Prev by Date: can a sub be too long in CE Emulator?
- Next by Date: Re: DLL resource issue
- Previous by thread: can a sub be too long in CE Emulator?
- Next by thread: Re: DLL resource issue
- Index(es):
Relevant Pages
|