PC Review


Reply
Thread Tools Rate Thread

notifyEvent just isn't ending....

 
 
=?Utf-8?B?Um9iIFM=?=
Guest
Posts: n/a
 
      13th Jun 2005
Having problems ending a notify event.

My code is this:

// Create event for notification.
notifyEvent = new
OpenNETCF.Threading.EventWaitHandle(false,EventResetMode.AutoReset,"SAMS_SYNC_EVENT");

// Set up notification.
Notify.RunAppAtTime( "\\\\.\\Notifications\\NamedEvents\\SAMS_SYNC_EVENT",
runtime);

...etc

Then i try and end it with: (in closing event)


notifyEvent = new
OpenNETCF.Threading.EventWaitHandle(false,OpenNETCF.Threading.EventResetMode.AutoReset,"SAMS_SYNC_EVENT" );

// Notify the thread to stop.
notifyEvent.Set();
notifyEvent.Close();
timedSyncThread = null;

However, in the threads window it still says it's running, if i goto the
code from the threads window, it highlights:

Notify.RunAppAtTime( "\\\\.\\Notifications\\NamedEvents\\SAMS_SYNC_EVENT",
runtime);

What can i do???

Thanks for any help

PS. Code was "borrowed" from the vault (thanks again)

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Um9iIFM=?=
Guest
Posts: n/a
 
      13th Jun 2005

Problem sorted now, thanks.

Forgot to add the if (!appExiting)....



"Rob S" wrote:

> Having problems ending a notify event.
>
> My code is this:
>
> // Create event for notification.
> notifyEvent = new
> OpenNETCF.Threading.EventWaitHandle(false,EventResetMode.AutoReset,"SAMS_SYNC_EVENT");
>
> // Set up notification.
> Notify.RunAppAtTime( "\\\\.\\Notifications\\NamedEvents\\SAMS_SYNC_EVENT",
> runtime);
>
> ..etc
>
> Then i try and end it with: (in closing event)
>
>
> notifyEvent = new
> OpenNETCF.Threading.EventWaitHandle(false,OpenNETCF.Threading.EventResetMode.AutoReset,"SAMS_SYNC_EVENT" );
>
> // Notify the thread to stop.
> notifyEvent.Set();
> notifyEvent.Close();
> timedSyncThread = null;
>
> However, in the threads window it still says it's running, if i goto the
> code from the threads window, it highlights:
>
> Notify.RunAppAtTime( "\\\\.\\Notifications\\NamedEvents\\SAMS_SYNC_EVENT",
> runtime);
>
> What can i do???
>
> Thanks for any help
>
> PS. Code was "borrowed" from the vault (thanks again)
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
what is the creiteria for month ending Format([Week Ending],"Shor Frankie Microsoft Access Queries 1 6th Apr 2009 02:26 AM
Week Ending & Month Ending date Alex Martinez Microsoft Access Form Coding 2 18th Aug 2005 05:21 AM
Ending In 5 JR Microsoft Excel Discussion 8 10th Jun 2005 06:43 AM
Never Ending If-Then-Else............ =?Utf-8?B?TVJM?= Microsoft Access Form Coding 3 25th Mar 2005 04:38 PM
Ending Sub =?Utf-8?B?UGF1bA==?= Microsoft Excel Programming 3 1st Oct 2004 08:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:50 PM.