Exposing dynamic properties of a com object using Reflection  
Author Message
zoomer





PostPosted: Common Language Runtime, Exposing dynamic properties of a com object using Reflection Top

Hi All,

Could any one suggest how expose the dynamic properties which are exposed by the com object at runtime using the Reflection. As per my knowledge the com object will show the dynamic proeprties using the IDispatch and itypeinfo. If any one have ideas to expose the dynamic properties using the reflection please suggest me.

Thanks.




.NET Development12  
 
 
nobugz





PostPosted: Common Language Runtime, Exposing dynamic properties of a com object using Reflection Top

Do you mean late-bound properties That's not possible, neither through reflection or through the native methods of IDispatch. A COM client would use IDispatch::GetIDsOfNames() to check if a named method or property exists and IDispatch::Invoke() to call it. That's the wrong way around for what you want to do.


 
 
zoomer





PostPosted: Common Language Runtime, Exposing dynamic properties of a com object using Reflection Top

Thanks for your reply (Great help to me). I mean to display the properties using late-bound only. My requirement is as follows:

I have to display the properties of two com objects, which are having some dynamic properties. I am able to display the static properties which are exposed by the com using Reflection. Is there any way to expose the dynamic properties of com using reflection. If there is no way to display the dynamic properties, Can u please suggest how to display the dynamic properties of com object through using the ITypeInfo and IDispatch interfaces. I am a biginner to the com environment. Please give in-detail to use these two interfaces to display the dynamic properties.

Thanks in advance.