如何从mono中的c++中获得某个类中所有方法的列表
How can I get a list of all methods in a certain class from c++ in mono?
我已经使用加载了程序集"monoass.dll"
mono_domain_assembly_open(domain, "C:/monoass.dll");
然后我用找到了名为"MainClass"的类
mono_class_from_name(mono_assembly_get_image(ass), "monoass", "MainClass"); // where "monoass" is the name of namespace
那么我需要在"MainClass"类中查找所有方法作为MonoMethod**
数组。我该怎么做?
Mono版本为:Mono-3.23
其他问题:
1) 如何将MonoMethod
的名称、参数和返回值输出到控制台?是否有mono_method_to_string(MonoMethod*方法)函数?
2) 如何获取程序集中的所有名称空间(并将每个名称打印到控制台),然后为每个名称空间获取名称空间中所有类的数组?
您可以获得以下所有方法:
void* iter = NULL;
MonoMethod* method;
while(method = mono_class_get_methods(mono_class, &iter))
{
cout << mono_method_full_name(method, 1);
}
相关文章:
- 如何将成员函数作为参数传递并在派生对象上执行方法列表
- 我的类中有方法的指针数组,但我不能调用我的方法.代码如下
- 使用 clang 获取类中的方法列表
- 使用doxygen分别提取类的公共方法列表
- 如何处理一个子类有方法,而另一个没有方法的子类?
- 用于在C++代码库中检索函数和方法列表的工具
- 有方法的类,我不明白类的外观
- 在 C# 中是否有用于列表的方法<T>,例如在 C++ 中为矢量<T>调整大小
- 是否有方法为模板参数指定所需的定义
- 如何使用带有clang绑定的python获取C++头中的方法列表
- 是否有方法将相对库路径添加到可执行文件以避免设置LD_library_path
- 是否有方法将所有赋值运算符(+=、*=等)转发为隐式使用重写的直接赋值运算符(=)
- 使用android NativeActivity的方法列表
- 是否有方法使用vector的内容作为键和自定义值来初始化unordered_map ?
- 在调用main函数之前,是否有方法解析命令行选项?
- 显示条件有问题?(列表中的对象)
- 在c++中是否有方法对成员变量(类)进行后期初始化?
- 是否有方法为任何指针类型定义转换操作符
- 是否有方法为窗口窗体中的特定按钮挂钩鼠标事件
- c++的前向声明,里面有一个列表