PsGetCurrentThread() question

Hi!

Here’s a follow-up question, which I did not find an
answer for in the NT-DDK:

PsGetCurrentThread - does it get the thread ID for the currently
executing thread, or does it return the thread ID of the CALLING
process (the one that issued the ReadFile() function).

In other words: Can I rely on this function to return
the TID of the calling thread?

thanks,

  • Barak

Barak Mandelovich Mercury Interactive ltd.
xxxxx@conduct.com 19 Shabazi st.
Tel: +972 3 539 9286 Yehud, 56100
Fax: +972 3 533 1617 Israel

PsGetCurrentThread() of the currently executing thread,
unless someone has placed a filter driver that defers I/O
above your driver, the thread that executes the dispatch
routine is the CALLING thread.

Don Burn

----- Original Message -----
From: “Barak Mandelovich”
To: “NT Developers Interest List”
Sent: Sunday, March 19, 2000 12:36 PM
Subject: [ntdev] PsGetCurrentThread() question

> Hi!
>
> Here’s a follow-up question, which I did not find an
> answer for in the NT-DDK:
>
> PsGetCurrentThread - does it get the thread ID for the currently
> executing thread, or does it return the thread ID of the CALLING
> process (the one that issued the ReadFile() function).
>
> In other words: Can I rely on this function to return
> the TID of the calling thread?
>
> thanks,
>
> - Barak
>
> –
> ----------------------------------------------------
> Barak Mandelovich Mercury Interactive ltd.
> xxxxx@conduct.com 19 Shabazi st.
> Tel: +972 3 539 9286 Yehud, 56100
> Fax: +972 3 533 1617 Israel
> ----------------------------------------------------