RE: PsCreateSystemThread in WDM Lower edge Ndis Drive r

At least according to Walter Oney, it does not work on (win)DOS/9x/Me as
KeWait will croak on the thread object. Instead he recommends using an
event, although an event based algorithm has a window where thread order
of execution can cause a crash. (Walter actually suggests using both,
but having a runtime switch that chooses the event on a (win)DOS
platform, which given that there is no real solution, is the best one
can do.) I suggest boycotting the obsolete (win)DOS platform.

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

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Anandhi Dhanabalan

  • CTD, Chennai.
    Sent: Friday, January 04, 2002 5:08 AM
    To: NT Developers Interest List
    Subject: [ntdev] RE: PsCreateSystemThread in WDM Lower edge Ndis Drive r

Hi Srinivasa,

Yup! i too heard that this method doesn’t work for 98 & ME.
I am yet to experiment these calls in those platforms :slight_smile:

Regards
Anandhi

-----Original Message-----
From: Srinivasa Rao Deevi [mailto:xxxxx@Microtune.com]
Sent: Thursday, January 03, 2002 10:55 PM
To: NT Developers Interest List
Subject: [ntdev] RE: PsCreateSystemThread in WDM Lower edge
Ndis Drive r

Is this method is good for windows 98 and Me also ? I
understand that this
method is useful for Windows 2000 and Windows XP . Even in
Walter oney’s
examples he skipped waiting for thread object using
KeWaitForSingleObject
for Windows 98 & Me.

Thanks
srinivas

-----Original Message-----
From: Anandhi Dhanabalan - CTD, Chennai.
[mailto:xxxxx@ctd.hcltech.com]
Sent: Thursday, January 03, 2002 4:59 AM
To: NT Developers Interest List
Subject: [ntdev] RE: PsCreateSystemThread in WDM Lower edge
Ndis Drive r

Thanx Mark! After using this approach to terminate threads
the pagefault
doesn’t occur.

Regards
Anandhi

> -----Original Message-----
> From: Mark Roddy [mailto:xxxxx@hollistech.com]
> Sent: Friday, December 28, 2001 9:27 PM
> To: NT Developers Interest List
> Subject: [ntdev] RE: PsCreateSystemThread in WDM Lower edge
> Ndis Driver
>
>
> Use ObReferenceObjectByHandle to obtain a referenced pointer to the
> thread object. Use KeWaitForSingleObject to wait for the
thread object
> to be signaled. This is the only safe way to terminate
> threads prior to
> unload.
>
> You must of course guarantee that your thread will not
terminate prior
> to the call to ObReferenceObjectByHandle. You must also use
> ObDereferenceObject after the call to KeWaitForSingleObject
> or else the
> thread object will be lost forever.
>
> =====================
> Mark Roddy
> WIndows XP/2000/NT Consulting
> Hollis Technology Solutions 603-321-1032
> www.hollistech.com
> xxxxx@hollistech.com
> For Windows Device Driver Training: see www.azius.com
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Anandhi
> Dhanabalan
> - CTD, Chennai.
> Sent: Friday, December 28, 2001 10:23 AM
> To: NT Developers Interest List
> Subject: [ntdev] PsCreateSystemThread in WDM Lower edge Ndis Driver
>
> Hi Devs,
>
> I am working on a Ndis Miniport Driver with WDM LowerEdge
for Virtual
> NIC .
>
> Now Staright to the problem…
> I spawn a thread using PsCreateSystemThread in my driver.
> When my Driver Unloads a pagefault occurs. From the Debug
msgs i could
> see
> that control goes out of my Unload Routine.
> I viewed the stack in softice which lists
ExReleaseResourceForThread.
>
> So my conclusion is that the Pagefault is b’coz the thread doesn’t
> terminate
> before my driver unloads. But i how do i ensure that the thread is
> terminated ?
>
> I tried using Event that will get set before i call
> PsTerminateSystemThread
> it didn’t help.
> I also had a look at the NdisUsb code of Elliyas Yakub and
tried using
> KeSetPriorityThread but it didn’t help (Infact this changes
> the priority
> from 8 to 16, i wonder if this will help in anyway)
>
> Can any one give any suggetions ?
>
> Thanx in advance
> Anandhi
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@ctd.hcltech.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


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


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


You are currently subscribed to ntdev as: xxxxx@hollistech.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