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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top