PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework notifyEvent just isn't ending....

Reply

notifyEvent just isn't ending....

 
Thread Tools Rate Thread
Old 13-06-2005, 10:10 AM   #1
=?Utf-8?B?Um9iIFM=?=
Guest
 
Posts: n/a
Default notifyEvent just isn't ending....


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
Old 13-06-2005, 01:37 PM   #2
=?Utf-8?B?Um9iIFM=?=
Guest
 
Posts: n/a
Default RE: notifyEvent just isn't ending....


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off