From: Fergus on
I was able to cancel the LargeIntervalTimer using Timer.Enabled = false.
The only way I could cancel an event set up using CeRunAppAtTime, was to set it to a date far in the future (say year 2027).
This definitely worked in the short term.
Hopefully the PDA will no longer be in regular use by 2027 and the event will not have consequences.




Paul G. Tobey [eMVP] wrote:

CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
18-Aug-09

CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
hardware, so that calls into the OEM's code to set the alarms, since how
that is done is hardware-specific. I do not think that CeRunAppAtEvent() does
anything like this (it is not hardware-specific, so, when a serial driver
indicates that a serial device is connected, it fires the application, but
that is all really high-level; it is not detecting the serial connection
itself).

Paul T.

Previous Posts In This Thread:

On Friday, August 14, 2009 10:28 AM
Andy Baker wrote:

LargeIntervalTimer question
Our VB2005 CE5 application uses the OpenNETCF LargeIntervalTimer to wake
itself up during the night and perform some houskeeping tasks. We recently
received a new device from a different manufacturer where it did not work. I
posted here about this and was advised that the LargeIntervalTimer used
CeRunAppAtTime(). I contacted the manufacturer who have since implemented
CeRunAppAtTime() in their device image and it now works.
I wrote a simple test application for the device to display a message on
screen after 5 minutes. The problem I now have is that the timer is not
cancelling itself even after I have exited the application and the device is
waking up every 5 minutes. My other devices do not behave in this way - it
wakes up at the FirstEventTime and after the first Interval but then no
more. Is there another function that I need them to implement in order to
cancel the timer?
Thanks in advance.

Andy Baker

On Friday, August 14, 2009 5:47 PM
Chris Tacke, MVP wrote:

Sounds like they still have a bug in their timer implementation.
Sounds like they still have a bug in their timer implementation.
CeRunAppAtEvent is called with something like EVENT_NONE to cancel the
pending event (check the source to see exactly what it calls) and it sounds
like they are not handling that.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

On Monday, August 17, 2009 6:11 AM
Andy Baker wrote:

Hi ChrisThanks for the reply.
Hi Chris

Thanks for the reply. I have added a cancel option to my test application
(that calls CeRunAppAtTime() rather than using the LargeIntervalTimer) and
it cancels the running of the application but not the waking up.

Do they need to implement CeRunAppAtEvent() as well as CeRunAppAtTime() in
order to get the LIT working?

Andy Baker

On Tuesday, August 18, 2009 4:28 PM
Chris Tacke, MVP wrote:

I'm not sure - I'd have to look at the CE source to know for sure and I don't
I am not sure - I'd have to look at the CE source to know for sure and I
do not have time to do that. it is quite possible.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

On Tuesday, August 18, 2009 5:19 PM
Paul G. Tobey [eMVP] wrote:

CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
hardware, so that calls into the OEM's code to set the alarms, since how
that is done is hardware-specific. I do not think that CeRunAppAtEvent() does
anything like this (it is not hardware-specific, so, when a serial driver
indicates that a serial device is connected, it fires the application, but
that is all really high-level; it is not detecting the serial connection
itself).

Paul T.

EggHeadCafe - Software Developer Portal of Choice
Dr. Dotnetsky's Cool .NET Tips and Tricks # 19
http://www.eggheadcafe.com/tutorials/aspnet/186c09db-bbcf-4f3d-8f57-bb41f7f8a8be/dr-dotnetskys-cool-net.aspx
From: Joel Ivory Johnson on
The proper way would be to specify NULL for the time.

"Fergus O'Donnell" wrote in message
news:2009114145030fergus.odonnell(a)bluetreeservices.co.uk...
> I was able to cancel the LargeIntervalTimer using Timer.Enabled = false.
> The only way I could cancel an event set up using CeRunAppAtTime, was to
> set it to a date far in the future (say year 2027).
> This definitely worked in the short term.
> Hopefully the PDA will no longer be in regular use by 2027 and the event
> will not have consequences.
>
>
>
>
> Paul G. Tobey [eMVP] wrote:
>
> CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
> 18-Aug-09
>
> CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
> hardware, so that calls into the OEM's code to set the alarms, since how
> that is done is hardware-specific. I do not think that CeRunAppAtEvent()
> does
> anything like this (it is not hardware-specific, so, when a serial driver
> indicates that a serial device is connected, it fires the application, but
> that is all really high-level; it is not detecting the serial connection
> itself).
>
> Paul T.
>
> Previous Posts In This Thread:
>
> On Friday, August 14, 2009 10:28 AM
> Andy Baker wrote:
>
> LargeIntervalTimer question
> Our VB2005 CE5 application uses the OpenNETCF LargeIntervalTimer to wake
> itself up during the night and perform some houskeeping tasks. We recently
> received a new device from a different manufacturer where it did not work.
> I
> posted here about this and was advised that the LargeIntervalTimer used
> CeRunAppAtTime(). I contacted the manufacturer who have since implemented
> CeRunAppAtTime() in their device image and it now works.
> I wrote a simple test application for the device to display a message on
> screen after 5 minutes. The problem I now have is that the timer is not
> cancelling itself even after I have exited the application and the device
> is
> waking up every 5 minutes. My other devices do not behave in this way - it
> wakes up at the FirstEventTime and after the first Interval but then no
> more. Is there another function that I need them to implement in order to
> cancel the timer?
> Thanks in advance.
>
> Andy Baker
>
> On Friday, August 14, 2009 5:47 PM
> Chris Tacke, MVP wrote:
>
> Sounds like they still have a bug in their timer implementation.
> Sounds like they still have a bug in their timer implementation.
> CeRunAppAtEvent is called with something like EVENT_NONE to cancel the
> pending event (check the source to see exactly what it calls) and it
> sounds
> like they are not handling that.
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded community
> http://community.OpenNETCF.com
>
> On Monday, August 17, 2009 6:11 AM
> Andy Baker wrote:
>
> Hi ChrisThanks for the reply.
> Hi Chris
>
> Thanks for the reply. I have added a cancel option to my test application
> (that calls CeRunAppAtTime() rather than using the LargeIntervalTimer) and
> it cancels the running of the application but not the waking up.
>
> Do they need to implement CeRunAppAtEvent() as well as CeRunAppAtTime() in
> order to get the LIT working?
>
> Andy Baker
>
> On Tuesday, August 18, 2009 4:28 PM
> Chris Tacke, MVP wrote:
>
> I'm not sure - I'd have to look at the CE source to know for sure and I
> don't
> I am not sure - I'd have to look at the CE source to know for sure and I
> do not have time to do that. it is quite possible.
>
>
> --
>
> Chris Tacke, Embedded MVP
> OpenNETCF Consulting
> Giving back to the embedded community
> http://community.OpenNETCF.com
>
> On Tuesday, August 18, 2009 5:19 PM
> Paul G. Tobey [eMVP] wrote:
>
> CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
> CeRunAppAtTime() uses the alarm capabilities of the real-time clock in the
> hardware, so that calls into the OEM's code to set the alarms, since how
> that is done is hardware-specific. I do not think that CeRunAppAtEvent()
> does
> anything like this (it is not hardware-specific, so, when a serial driver
> indicates that a serial device is connected, it fires the application, but
> that is all really high-level; it is not detecting the serial connection
> itself).
>
> Paul T.
>
> EggHeadCafe - Software Developer Portal of Choice
> Dr. Dotnetsky's Cool .NET Tips and Tricks # 19
> http://www.eggheadcafe.com/tutorials/aspnet/186c09db-bbcf-4f3d-8f57-bb41f7f8a8be/dr-dotnetskys-cool-net.aspx