PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
notifyEvent just isn't ending....
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
notifyEvent just isn't ending....
![]() |
notifyEvent just isn't ending.... |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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) |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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)> |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 
(thanks again)
