Suppose you have a method that takes these parameters:
 
void Method( Foo f, Foo[] f_array ) {}
 
If you use Reflection to look at the parameter types, you'll see that there are 
actually TWO different types reported. You can see the values by looking at 
ParameterInfo.ParameterType.TypeHandle.Value. 
 
After looking at the Rotor sources, I can see that TypeHandle.Value maps to a 
TypeHandle runtime structure. This is the same value that you will get from the 
Profiling API during ClassLoadStarted/Finished events. I'm working a lot with the 
profiling API these days.
 
Unfortunately, the profiling API will only report the ClassID for the Foo type, not 
the Foo[] "pseudo-type". For a variety of reasons, I'd really like to be able to get 
the Foo[] "pseudo-type" TypeHandle from the unmanaged code space. Is there a 
reasonable way of getting at the TypeHandle values from UNMANAGED code? 
 
Thanks
-John
http://www.iunknown.com
 


Reply via email to