G
Guest
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)
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)