给出以下导出的名称示例:
0x00cf ?GetI@PyIDispatch@@SAPAUIDispatch@@PAU_object@@@Z
0x0119 ?ParseTypeInformation@PythonOleArgHelper@@QAEHPAU_object@@@Z
0x014f ?PyObject_FromSTGMEDIUM@@YAPAVPySTGMEDIUM@@PAUtagSTGMEDIUM@@@Z
方法GetI、ParseTypeInformation、PyObject_FromSTGMEDIUM的方法参数是什么?
当前的解决方法是跳过解析参数,但是我有如下所示的无信息间隙:)
PyObject_FromSTGMEDIUM(...)
ParseTypeInformation(...)
GetI(...)
引用资料:
- http://theory.uwinnipeg.ca/localfiles/infofiles/gcc/gxxint_15.html#SEC20
- http://sourcery.mentor.com/public/cxx-abi/abi.html
- http://www.kegel.com/mangle.html
- http://www.unixwiz.net/techtips/win32-callconv.html#decor
- http://www.int0x80.gr/papers/name_mangling.pdf
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/