Terminating a thread !!!!

Hi All,
Can anybody please tell me is there anyway by which I can terminate a thread
from another thread, assuming that the other thread has the handle of the
thread I want to terminate.

Thanks in advance,
regards,
Shivas


From: Shweta Dubey
Reply To: NT Developers Interest List
Sent: Thursday, May 11, 2000 11:33 PM
To: NT Developers Interest List
Cc: xxxxx@lists.osr.com
Subject: [ntdev] RE: Which EntryPoint to use ?

May be I do not understand exactly what you need, and also have never
worked
on W2K, but here is my idea. I would start a driver thread
PsCreateSystemThread(), and let it do all the stuff. Now there is no need
to
“trigger” any thing. You may also consider creating more than one thread,
and blah blah…

Shweta.

Hello,

To test my Win2K Bus Driver, I need my dummy Function Driver (based on the
DDK Toaster Function Driver sample) to continuously write some known
values
to the memory-mapped Register Space of each of the “toaster” devices
periodically (maybe after a few milli-seconds interval or so). I want the
Function Driver to keep doing this indefinitely i.e. until it is
unloaded.

Which entry-point or routine can I do this in, since there is nothing to
trigger this (i.e. no user application or anything) ?

Any ideas how things like these are accomplished ?

Thanks much in advance!

Puja


You are currently subscribed to ntdev as: xxxxx@techie.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)


FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup


You are currently subscribed to ntdev as: xxxxx@Satyam.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Hello,

You can use TerminateThread function. However use of
this should be avoided as far as possible, since it
does not give DLL notifications, does not clean up the
initial stack etc.

If the thread your are trying to terminate enters
altertable wait state periodically then you may try
the QueueUserAPC function. Your APC function can then
call ExitThread function.

-Prasad

— Shiva_Shankar wrote:
> Hi All,
> Can anybody please tell me is there anyway by which
> I can terminate a thread
> from another thread, assuming that the other thread
> has the handle of the
> thread I want to terminate.
>
> Thanks in advance,
> regards,
> Shivas
>
> > ----------
> > From: Shweta Dubey
> > Reply To: NT Developers Interest List
> > Sent: Thursday, May 11, 2000 11:33 PM
> > To: NT Developers Interest List
> > Cc: xxxxx@lists.osr.com
> > Subject: [ntdev] RE: Which EntryPoint to use ?
> >
> > May be I do not understand exactly what you need,
> and also have never
> > worked
> > on W2K, but here is my idea. I would start a
> driver thread
> > PsCreateSystemThread(), and let it do all the
> stuff. Now there is no need
> > to
> > “trigger” any thing. You may also consider
> creating more than one thread,
> > and blah blah…
> >
> > Shweta.
> >
> > Hello,
> >
> > To test my Win2K Bus Driver, I need my dummy
> Function Driver (based on the
> > DDK Toaster Function Driver sample) to
> continuously write some known
> > values
> > to the memory-mapped Register Space of each of the
> “toaster” devices
> > periodically (maybe after a few milli-seconds
> interval or so). I want the
> > Function Driver to keep doing this indefinitely
> i.e. until it is
> > unloaded.
> >
> > Which entry-point or routine can I do this in,
> since there is nothing to
> > trigger this (i.e. no user application or
> anything) ?
> >
> > Any ideas how things like these are accomplished ?
> >
> > Thanks much in advance!
> >
> > Puja
> >
> > —
> > You are currently subscribed to ntdev as:
> xxxxx@techie.com
> > To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
> >
> > ______________________________________________
> > FREE Personalized Email at Mail.com
> > Sign up at http://www.mail.com/?sr=signup
> >
> >
> > —
> > You are currently subscribed to ntdev as:
> xxxxx@Satyam.com
> > To unsubscribe send a blank email to
> $subst(‘Email.Unsub’)
> >
>

=====
Prasad S. Dabak
Director of Engineering, Windows NT/2000 Division
Cybermedia Software Private Limited
http://www.cybermedia.co.in
Co-author of the book “Undocumented Windows NT”
ISBN 0764545698

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/