foreach(ProcessThread p in Process.GetCurrentProcess().Threads)
intPtr address = p.StartAddress;
and I want to compare this address to a method's address
which I have used to start a thread.
the question is how to get the address of a method in the format of int or intPtr?
vivek kulkarniPosted Aug 29, 2009, 7:56 AM
You can use delegates for reference pointing to methods.
Here is an explanation.
http://msdn.microsoft.com/en-us/library/ms173171(VS.80).aspx
A delegate is a type that references a method. Once a delegate is assigned a method, it behaves exactly like that method. The delegate method can be used like any other method, with parameters and a return value, as in this example:
Thank you,
Vivek