I have an app that works fine as Win32 but fails with the subject message (The application was unable to start correctly 0xc000007b) if running the x64
or ARM64
version, both release and debug builds.
I tried using the latest release (2.2.6000) of both the win32 and x64 versions of Dependency Walker, on the x64
version, but they both just hang; After a while I give up and click the X to close and it crashes and goes away.
How do I figure out the problem without being able to use a tool like Dependency Walker?
This is what the log output in VS2022 has when trying to run the x64 version:
'theapp.exe' (Win32): Loaded 'D:\theapp\x64\Debug\theapp.exe'. Symbols loaded.
'theapp.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbol loading disabled by Include/Exclude setting.
'theapp.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbol loading disabled by Include/Exclude setting.
'theapp.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbol loading disabled by Include/Exclude setting.
'theapp.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbol loading disabled by Include/Exclude setting.
'theapp.exe' (Win32): Loaded 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.4355_none_a865f0c28672571c\comctl32.dll'. Symbol loading disabled by Include/Exclude setting.
'theapp.exe' (Win32): Unloaded 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.4355_none_a865f0c28672571c\comctl32.dll'
'theapp.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Symbol loading disabled by Include/Exclude setting.
The thread 0x8854 has exited with code 3221225595 (0xc000007b).
The program '[0x86F0] theapp.exe' has exited with code 3221225595 (0xc000007b).
TIA!!
This issue was caused by including the wrong manifest for the x64/ARM64 application. It was pulling in:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
When it should have been:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="amd64"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>