Chris
Wed Sep 22 12:33:30 CDT 2004
If multiple threads are waiting on the event, Pulse signals them all.
-Chris
"Neil" <apollosoftware@hotmail.com> wrote in message
news:uBGsdaMoEHA.3968@TK2MSFTNGP11.phx.gbl...
> Can you explain why PulseEvent is better than SetEvent please? As far as I
> can see...because the CreateEvent function sets up the event object as
> Automatically Reset (i.e. second parameter is FALSE) then it doesn't
really
> make much difference whether you call PulseEvent or SetEvent. However, I
am
> not well versed in these functions so I could well have misunderstood
> something.
>
>
> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message
> news:ORHVRKMoEHA.2588@TK2MSFTNGP12.phx.gbl...
> > PulseEvent would probably be a better call than SetEvent, but you're
> > right.
> >
> > -Chris
> >
> >
> > "Neil" <apollosoftware@hotmail.com> wrote in message
> > news:OwolVTLoEHA.1668@TK2MSFTNGP14.phx.gbl...
> >> I think you actually need to tell the Event to trigger, otherwise
you've
> >> created an Event but done nothing with it:
> >>
> >> HANDLE HdlBackLightEvent = CreateEvent(
> >> NULL,FALSE,FALSE,TEXT("BackLightChangeEvent") );
> >> if (HdlBackLightEvent)
> >> {
> >> SetEvent(HdlBackLightEvent);
> >> CloseHandle(HdlBackLightEvent);
> >> }
> >>
> >> "KP" <kampheng@pacific.net.sg> wrote in message
> >> news:7c12973b.0409142211.369d4e43@posting.google.com...
> >> > The method to resolve this is this:-
> >> > - Change the registry value of the backlight type (say
BatteryTimeout)
> >> > to something large (0x7fffffff)
> >> > - Call CreateEvent(NULL,FALSE,FALSE,TEXT("BackLightChangeEvent")) to
> >> > notify the system of this change.
> >> > - upon exit of your app, change back the registry value to it's
> >> > previous setting.
> >> >
> >> >
> >> > "Peter Foot [MVP]" <feedback@no-spam.inthehand.com> wrote in message
> >> > news:<O8OdAJxlEHA.2340@TK2MSFTNGP11.phx.gbl>...
> >> >> There is a power management function which can be used to request a
> >> >> specific
> >> >> power state, you can call this at a particular point in your app and
> > then
> >> >> unregister when you wish to return to the default behaviour. I wrote
a
> >> >> sample here for Smartphone in VB.NET but you should be able to apply
> > the
> >> >> same technique to Pocket PC:-
> >> >>
> >
http://blog.opennetcf.org/pfoot/PermaLink.aspx?guid=d130e903-ffea-44d0-b909-9e8009e75954
> >> >>
> >> >> If you are using eVC++ then the definition of the function and
> > constants
> >> >> is
> >> >> in the pm.h header file.
> >> >>
> >> >> Peter
> >> >>
> >> >> --
> >> >> Peter Foot
> >> >> Windows Embedded MVP
> >> >> www.inthehand.com | www.opennetcf.org
> >> >>
> >> >> Do have an opinion on the effectiveness of Microsoft Windows Mobile
> >> >> and
> >> >> Embedded newsgroups? Let us know!
> >> >> https://www.windowsembeddedeval.com/community/newsgroups
> >> >>
> >> >> "Jonathan" <Jonathan@discussions.microsoft.com> wrote in message
> >> >> news:52742802-FC2B-4A09-9864-798FDDEFEF50@microsoft.com...
> >> >> >I have been looking for a way to control the backlight on the PPC.
My
> >> >> > application has a long process and the backlght goes off right in
> >> >> > the
> >> >> > middle
> >> >> > of it. I need to keep the backlight on for the process to
complete.
> >> >> > I
> >> >> > have
> >> >> > identified two solutions:
> >> >> >
> >> >> > 1) The ideal solution would be to keep the backlight on with a
> > function
> >> >> > call. Is there a DLL that will do this?
> >> >> >
> >> >> > 2) An alternate method would be to change the setting of the PPC
to
> >> >> > keep
> >> >> > the
> >> >> > backlight always on. Under battery settings there is an otpion
that
> >> >> > will
> >> >> > always keep the backlight on. I would assume that this is stored
in
> > the
> >> >> > registry somewhere. Any ideas on how I can find what registry key
it
> >> >> > is? I
> >> >> > am
> >> >> > thinking of setting the option to keep the backlight on when my
> >> >> > application
> >> >> > starts and then resetting it to the previous value when my
> > application
> >> >> > closes. The only draw back is that someone may change the setting
> > while
> >> >> > my
> >> >> > app is running - this is why this is the second choice.
> >> >> >
> >> >> > Has anyone encountered this problem? Any advice? Thanks for the
> >> >> > help.
> >>
> >>
> >
> >
>
>