How to examine Thread location programatically

  • Thread starter Thread starter Howard Weiss
  • Start date Start date
H

Howard Weiss

I can fetch a pointer to my current thread as follows

Thread *pThread = Thread::CurrentThread;

How do I cast this to something that I can then use to display the object
address e.g. IntPtr(pThread) or something similar?

Howard Weiss
 
Hi Howard,
I can fetch a pointer to my current thread as follows

Thread *pThread = Thread::CurrentThread;

How do I cast this to something that I can then use to display the object
address e.g. IntPtr(pThread) or something similar?

The address of what object, exactly? The thread object itself? That's just
another reference type, which can move around in memory as needed.
 
Back
Top