使用托管 VC 执行类似反射的操作关于非托管 C++
我有一个托管 VC++,我想在非托管 C++ 上执行诸如 Type::GetMembers()
和 PropertyInfo::GetValue()
之类的操作。
我读了一些关于 非托管反射 API 的内容,但我不确定如果我走在正确的道路上。
谢谢。
I have a managed VC++ where I would like to do things like Type::GetMembers()
and PropertyInfo::GetValue()
on unmanaged C++.
I read a little about the Unmanaged Reflection API but I'm not sure if I'm on the right path.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你正在寻找完全错误的地方。
本机调试器是执行这些操作的最常用工具,必要的元数据存储在调试数据库(对于 Visual C++ 为 .pdb 文件)中。
本机调试 API 有大量文档记录。
例如,
SymGetTypeInfo
(以及较新的SymGetTypeInfoEx
) 提供对大致相当于在System.Type
中找到的信息的访问,包括基类、成员、 ETC。You're looking in completely the wrong place.
A native debugger is the most common tool that performs these operations, the necessary metadata is stored in the debug database (.pdb file for Visual C++).
The native debugging APIs are extensively documented.
For example,
SymGetTypeInfo
(and the newerSymGetTypeInfoEx
) gives access to information roughly equivalent to that found inSystem.Type
, including base classes, members, etc.