How to examine Thread location programatically

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
 
T

Tomas Restrepo \(MVP\)

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

Top