64 bit application unable to start correctly 0xc00007b
问题描述
从win32程序迁移到64位时出现0xc00007b错误,从window应用程序日志无法发现问题。
后来经过x64dbg调试发现在加载comctl32.dll的时候异常,搜索关键字comctl32.dll 0xC000007B果然是这个问题
[incorrect-comctl32-dll-is-loaded-after-porting-a-project-from-win32-to-x64-platf]
解决办法
下面是链接,由于需要启用Visual Style,所以可以用下面的办法解决
https://social.msdn.microsoft.com/Forums/vstudio/en-US/4a66116a-cc03-4e1c-8344-d1ed26007692/win-7-x64-vc9-native-application-trying-to-load-32-bit-comctl-dll?forum=vcgeneral
问题分析
问题出在这里
<dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency>
修正为
<dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" /> </dependentAssembly> </dependency>