无法定位程序输入点??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-)”即可.

你可能感兴趣的:(无法定位程序输入点??0AdbInterfaceObject@@QAE@PBG@Z)