Re: Waitable Time Support



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-

.



Relevant Pages

  • Re: Great SWT Program
    ... Not "without reading any documentation", ... If there's no hint in the UI that given functionality exists, ... you can just hit enter to launch the search. ... The puppy will ...
    (comp.lang.java.programmer)
  • Re: Accessing file extended properties in .NET
    ... the help files and forums and other documentation I can think of for ... some managed code equivalent to this functionality without ... a JPG's dimensions by simply examining the file and not because the data is ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Waitable Time Support
    ... *can* use WaitForMultiple on those system events. ... CeRunAppAtTime is documented on MSDN at http://msdn2.microsoft.com/en-us/library/ms913957.aspx however as you suggested the documentation tends to suggest the only way it works is to launch an executable when the specific time occurs. ... In other words if your application creates a named event, 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. ...
    (microsoft.public.pocketpc.developer)
  • Re: Linux API developer documentation
    ... >> Where does one normally find the documentation to the core functions ... >> of the Linux API? ... general documentation other than the libc documentation about the kernel ... Sorry to be comparing the Linux core functionality to ...
    (alt.os.linux)
  • Re: What are the Missing Parts in the CVF Windows API?
    ... Both the documentation and third-party books say that **almost** ... | all of the full functionality of the Windows API, ...
    (comp.lang.fortran)