In the main thread when click a button, then begin the long-working thread,
before the long-working thread finish it's work, then the user click the exit button
to exit the application! And in the long-working thread I CreateFile to use all long
with the thread life time.
In such situation, how will the long-working thread know when user exit the application?
how to properly clean up the thread.
Thanks in advance!