Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows CE internals, TEB (Thread Environment Block)

I'm not sure if it's a good place to ask such a question. I'm trying to port some low level library (dbghelp) to wince and I need access to some api that aren't available on wince. I need to access TEB (Thread Environment Block). There are a couple of API's available on PC that do that, but there is no such thing on WinCE. One of them is called NTQueryThreadInformation or something like that, and the other one is NtCurrentTEB which returns pointer to TEB for the current thread. Any pointers on that?.. thanks

like image 571
pps Avatar asked Jun 05 '26 08:06

pps


1 Answers

You can find available CE5 Process and Thread Functions here.

Even though no direct equivalent for TEB in WinCE, I have seen TlsGetValue, TlsSetValue, etc for thread local storage, which may be similar to "TEB.TlsSlots". CeGetThreadQuantum, GetThreadTimes, GetThreadPriority and GetThreadContext can also give certain information about the thread.

For myself, I've never used them before since my programming needs usually were satisfied with CreateThread, Suspend/ResumeThread, ThreadProc and Set/GetThreadPriority.

like image 173
noel aye Avatar answered Jun 07 '26 23:06

noel aye



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!