I am trying to find out when a thread within my driver terminates. I am
trying to use KeWaitForSingleObject and pass a pointer a thread handle, but
when I make the call, the system crashes, Has anybody done this? Is there
another way of accopmlishing this?

Any help would be appriciated.
Thanks,
BJ

Re: KeWaitForSingleObject on Thread Termination by Nick

Nick
Tue Aug 05 17:28:21 CDT 2003

A pointer to a thread handle? You must pass a pointer to a thread OBJECT.

BenJ wrote:

> I am trying to find out when a thread within my driver terminates. I am
> trying to use KeWaitForSingleObject and pass a pointer a thread handle, but
> when I make the call, the system crashes, Has anybody done this? Is there
> another way of accopmlishing this?
>
> Any help would be appriciated.
> Thanks,
> BJ
>
>

--
- Nick Ryan (MVP for DDK)


Re: KeWaitForSingleObject on Thread Termination by Mark

Mark
Tue Aug 05 17:40:09 CDT 2003

On Tue, 5 Aug 2003 15:07:11 -0700, "BenJ" <BenJ@netvu.com> wrote:

>I am trying to find out when a thread within my driver terminates. I am
>trying to use KeWaitForSingleObject and pass a pointer a thread handle, but
>when I make the call, the system crashes, Has anybody done this? Is there
>another way of accopmlishing this?
>

You might consider passing a pointer to the thread object instead of a
pointer to a thread handle. See ObReferenceObjectByHandle.



=====================
Mark Roddy
Windows XP/2000/NT Consulting, Microsoft DDK MVP
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com
For Windows Device Driver Training: see www.azius.com

Re: KeWaitForSingleObject on Thread Termination by BenJ

BenJ
Tue Aug 05 18:03:46 CDT 2003

How do I get thread object

Thanks,
BJ
"Nick Ryan" <nryan@nryan.com> wrote in message
news:9cWXa.72641$Ho3.10445@sccrnsc03...
> A pointer to a thread handle? You must pass a pointer to a thread OBJECT.
>
> BenJ wrote:
>
> > I am trying to find out when a thread within my driver terminates. I am
> > trying to use KeWaitForSingleObject and pass a pointer a thread handle,
but
> > when I make the call, the system crashes, Has anybody done this? Is
there
> > another way of accopmlishing this?
> >
> > Any help would be appriciated.
> > Thanks,
> > BJ
> >
> >
>
> --
> - Nick Ryan (MVP for DDK)
>



Re: KeWaitForSingleObject on Thread Termination by Walter

Walter
Tue Aug 05 19:47:32 CDT 2003

BenJ wrote:
> How do I get thread object

All the mechanics of starting and stopping kernel threads are described
in ch. 14 of my WDM book.

--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com