Sorry again … getting back from a sever sinus infection is tough 
I’m not sure it is allowed or not, but a sure approach is to take the
prototype from ntddk.h, as you did, and in your src file using extern you
should be able to link this function …
-pro
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Prokash Sinha
Sent: Thursday, September 23, 2004 9:17 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] PsGetCurrentThreadId - alternative for WDM?
Did not see the problem, as usual. You must be talking about the return
opaque ptr,
that might not be unique due to teb is mapping, not sure. But there are
other API.
Something might be wrong in your linking process. I know it links on win2k.
And it is
exported from ntoskrnl ( x nt!Ps* )
-pro
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Prokash Sinha
Sent: Thursday, September 23, 2004 9:07 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] PsGetCurrentThreadId - alternative for WDM?
If your worker thread is persistent thru-out the session, I dont see
problem.
-pro
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@tab.at
Sent: Thursday, September 23, 2004 8:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] PsGetCurrentThreadId - alternative for WDM?
I’m looking for a way to do something like:
if( current thread == my worker thread )
foo();
else
bar();
The driver I’m writing uses the WDM headers & libs, and
PsGetCurrentThreadId() doesn’t show up in the headers, nor does it link
when I copy the declaration from the w2k headers. Can I safely use the
result-value of KeGetCurrentThread() to test if it’s the same thread? Or
is there an even simpler way?
It’s mainly for testing/debugging and making the code better readable (by
putting things like “ASSERT( IsWorkerThread() );” or similar into
functions that may only be called from the worker-thread etc.).
Thanks,
Paul
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@garlic.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@garlic.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@garlic.com
To unsubscribe send a blank email to xxxxx@lists.osr.com