No, you don't have to do anything, generally (I don't know how you're
stopping your thread), to notify the thread that it's time to exit. I
generally leave threads sitting either in WaitOne() sorts of things where
the event on which it is waiting will be Set() by the outside code to exit
the thread, or in other blocked calls, specific to the thread's job (in
which case, I set an event, then unblock the thread, maybe by closing the
socket it's waiting on, closing the serial port it's waiting on, etc.) The
thread unblocks, usually with an exception, handles the exception suitably,
then checks the event (WaitOne(0)), realizes that it's time to exit, and
does. If you run this program in the debugger, does the debugger thinkthat
the application has exited, or does it wait for the thread to exit forever?
Does Remote Process Viewer still show the process?
Paul T.
OK, so Remote Process Viewer wouldn't show it, then, just to be sure? If
that's the case, it would seem that Symbol is persisting the state of the
scanner, separate from its state within your code. Do the Hello, World
examples from Symbol suffer from this problem?
<
[email protected]> wrote in message
On Jun 18, 12:08 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote:
Define "terminate my application". You did what? Clicked the X icon? If
so, that doesn't terminate anything. Make sure you tell us what you've
done
so far and what the results were.
Paul T.
-----
Hi Harry,
I just recently started programming on the MC50. My previous
experience has been on Dell Axim Pocket PCs. I started back in 2001
using EVB and have upgraded along with the Studio and Dot Net CF. I am
currently using Studio 2005 and have been very pleased so far.
I am also using Symbol SDK 1.7 which seems to work fine. I am having
one problem which someone from the group may be able to assist me
with. Even though I followed the Hello World programs in the SDK
documentation I am getting an error after I terminate my application
on the MC50 and attempt to restart the application. The error occurs
when I attempt to enable the scanner. If I do a warm reset the error
does not occur. Any thoughts on this error? The error indicates
SCAN_Enable. I thought I was properly disposing of all the scanner
objects along with the eventhandler, but I still get the error after
one time running my applcation. Thanks in advance for any help you can
give me on this.
Alan Rohulich
By terminate I mean that as the user taps the Ok on the MC50 a form
onclosing event checks for active threads, and once all active threads
have been stopped the following code is executed
then an me.close is executed.- Hide quoted text -
I am using the Hello World example almost verbatim. The only
difference is that I have a sleeping thread that needs to be stopped
prior to disposing the scanners objects. Maybe that is why the scanner
state is not the same. This may be a dumb question, but should I be
executing the code prior to stopping the thread via control invoke to
be at the same thread level / state?- Hide quoted text -
- Show quoted text -