visual-c++ - 如何为损坏的修饰名称解码 Visual C++ 方法参数?

标签 visual-c++

给出以下导出的名称示例:

0x00cf ?GetI@PyIDispatch@@SAPAUIDispatch@@PAU_object@@@Z
0x0119 ?ParseTypeInformation@PythonOleArgHelper@@QAEHPAU_object@@@Z
0x014f ?PyObject_FromSTGMEDIUM@@YAPAVPySTGMEDIUM@@PAUtagSTGMEDIUM@@@Z

方法GetIParseTypeInformationPyObject_FromSTGMEDIUM的方法参数是什么?

当前的解决方法是跳过解析参数,但是我有如下所示的无信息间隙:)

PyObject_FromSTGMEDIUM(...)
ParseTypeInformation(...)
GetI(...)

引用资料:

stdcall has the form of _name@x and fastcall has the form of @name@x

解码参数的算法应该是什么样的? C# 中的示例会很棒。

约束:PInvoke 不可用。

请在 anwser 中提供上述示例的参数。 谢谢!

最佳答案

从 Visual Studio 命令提示符运行 undname.exe 实用程序。使用系统菜单中的编辑 + 粘贴命令可以避免键入名称。示例输出:

C:\temp>undname ?GetI@PyIDispatch@@SAPAUIDispatch@@PAU_object@@@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation. All rights reserved.

Undecoration of :- "?GetI@PyIDispatch@@SAPAUIDispatch@@PAU_object@@@Z"
is :- "public: static struct IDispatch * __cdecl PyIDispatch::GetI(struct _objec
t *)"

关于visual-c++ - 如何为损坏的修饰名称解码 Visual C++ 方法参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7658435/

相关文章:

c++ - 具有派生模板类和继承成员变量的语法难题

visual-c++ - 比较两个 double 的符号

c++ - 如何在 Microsoft Visual C++ 中导入 dllimport

c++ - 如何使用 WINAPI 和 C++ 提取可执行文件的文件描述?

c++ - 赋值语句截断字符

c++ - Visual C++/Visual Studio 设置。什么在调用 MSVCR120D.DLL

C++ Diamond 控制台输出问题

windows - 为什么 nvcc 找不到我的 Visual C++ 安装?

c++ - 如何删除 ATL COM C++ 中的方法

c++ - 开源 Visual Studio 项目分发噩梦