this is my first SO question! I would like to instantiate a COM object and cast it to IDispatchEx so that I can enumerate its members. Here is an example:
Type _COMType = System.Type.GetTypeFromProgID("Scripting.FileSystemObject"); var _COMObject = (IDispatchEx)Activator.CreateInstance(_COMType);
My IDispatchEx is identical to the one on this website (not my website), except that GetNextDispID and GetMemberName return an int (which I wish to use for HRESULT as described on MSDN).
The example above does not work. Is there any way to instantiate COM objects as you would from Active Scripting cast to the IDispatchEx interface?
Thanks for any and all help/suggestions!