cant i unload a driver b4 terminating the system threads it created?

Hi Guys,

I am creating a system thread in the driver entry routine. and want this
thread to be terminated when i unload the driver. So i have a global boolean
which when set to true the system thread will terminate itself. but the
problem is after the unload routine finishes system goes blue :(… stack at
the time when BSOD occur is

F09E25D1
PsSetCreateThreadNotifyRoutine + 00AA
KiUnexpectedInterrupt + 0180

why does it happen so… cant i unload a driver b4 terminating its system
threads?

ta ta,
Arun


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Wait on the thread’s pointer to catch the moment it will exit. The only
reliable way.
Also your BOOLEAN must be declared as “volatile”, don’t forget this.

Max

----- Original Message -----
From: “Arun kumar Sundaram”
To: “NT Developers Interest List”
Sent: Wednesday, August 22, 2001 7:35 AM
Subject: [ntdev] cant i unload a driver b4 terminating the system threads it
created?

> Hi Guys,
>
> I am creating a system thread in the driver entry routine. and want
this
> thread to be terminated when i unload the driver. So i have a global
boolean
> which when set to true the system thread will terminate itself. but the
> problem is after the unload routine finishes system goes blue :(… stack
at
> the time when BSOD occur is
>
> F09E25D1
> PsSetCreateThreadNotifyRoutine + 00AA
> KiUnexpectedInterrupt + 0180
>
> why does it happen so… cant i unload a driver b4 terminating its system
> threads?
>
> ta ta,
> Arun
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com