使用托管 VC 执行类似反射的操作关于非托管 C++

发布于 2025-01-08 15:50:15 字数 257 浏览 1 评论 0原文

我有一个托管 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜巴黎 2025-01-15 15:50:15

你正在寻找完全错误的地方。

本机调试器是执行这些操作的最常用工具,必要的元数据存储在调试数据库(对于 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 newer SymGetTypeInfoEx) gives access to information roughly equivalent to that found in System.Type, including base classes, members, etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文