无法定位程序输入点??0AdbInterfaceObject@@QAE@PBG@Z

adb.exe运行时出错,提示“无法找到入口”,无法定位程序输入点??0AdbInterfaceObject@@QAE@PBG@Z于动态链接库AdbWinApi.DLL上, 用Depends查看该DLL,发现有个类似的函数名??0AdbInterfaceObject@@QAE@PB_W@Z,

通过Visual Studio和Windows SDK自带的工具undname查看这两个函数名,看到:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>undname ??0AdbInterfaceObject@@QAE@PB_W@Z

Microsoft (R) C++ Name Undecorator

Copyright (C) Microsoft Corporation. All rights reserved.

Undecoration of :- "??0AdbInterfaceObject@@QAE@PB_W@Z"

is :- "public: __thiscall AdbInterfaceObject::AdbInterfaceObject(wchar_t const *)"

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>undname ??0AdbInterfaceObject@@QAE@PBG@Z

Microsoft (R) C++ Name Undecorator

Copyright (C) Microsoft Corporation. All rights reserved.

Undecoration of :- "??0AdbInterfaceObject@@QAE@PBG@Z"

is :- "public: __thiscall AdbInterfaceObject::AdbInterfaceObject(unsigned short const *)"

可以看到两处参数类型不同,代码里确实为wchar_t const *,那如何将wchar_t const*转换为我们的目标,unsigned short const *呢?在项目设置的C/C++, Language, "Treat wchar_t as Built-in type"该为“No (/Zc:wchar_t-)”即可.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容