views:

536

answers:

1

Hello everybody, 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

+1  A: 

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.

antreality
Off course I reviewed all the MSDN info on threading API in Windows CE. The reason that I need access to TEB is that the dll that I was trying to port does some stuff with the TEB. Basically, I took code from WINE's implementation of dbghelp.dll and wanted to port it to Windows CE (Microsoft doesn't provide CE port of the dll). The dll allows to access debug symbols, get runtime call stack etc, which would be nice to have it in Windows CE apps as well.
pps