【发布时间】:2011-02-15 21:53:40
【问题描述】:
我有一个 COM 对象的实例......它是这样创建的:
Type type = TypeDelegator.GetTypeFromProgID("Broker.Application");
Object application = Activator.CreateInstance(type);
当我尝试调用一个方法时:
type.GetMethod("RefreshAll").Invoke(application, null);
-> type.GetMethod("RefreshAll") 返回null。
当我尝试使用type.GetMethods() 获取所有方法时,只有这些方法:
- GetLifetimeService
- 初始化LifetimeService
- CreateObjRef
- ToString
- 等于
- GetHashCode
- 获取类型
RefreshAll 方法在哪里?我该如何调用它?
【问题讨论】:
标签: c# reflection com