windows - Official way to get the Thread Information/Environment Block (TIB/TEB) -


in windows, it's long been common, if undocumented, knowledge thread information block (tib) of current thread can found @ fs:0. works on intel cpus, fs register exists in first place. wanna tib on arm-based windows system (windows phone , maybe windows rt). there api that, please?

edit: want thread stack base crash reporting purposes.

information tib/teb: http://www.microsoft.com/msj/archive/s2ce.aspx

the macro ntcurrentteb() available in winnt.h supported architectures, including arm (windows rt):

#if defined(_m_arm) && !defined(__midl) && !defined(_m_cee_pure)  __forceinline struct _teb * ntcurrentteb (     void     ) {     return (struct _teb *)(ulong_ptr)_movefromcoprocessor(cp15_tpidrurw); } 

Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo