x86 application gives INVALID_IMAGE_FORMAT (0xc000007b) error on Windows 7 64 bit
-
Friday, May 13, 2011 10:46 AM
Hi
I have a 32 bit Delphi application which uses a 32 bit .NET application made in c/c++ to convert some files to its native format using .NET c# assemblies compiled with framework 3.5. I ported the .NET c\c++ application and c# 3.5 assemblies to framework 4.0. Now when I try to run the c/c++ application it gives the following message
The application was unable to start correctly (0xc000007b). Click OK to close the application.
please suggest a solution
Delphi Application
- Built using Delphi 7
- 32 bit
.NET application
- Framework 4.0
- Visual Studio 2010 ultimate
- Windows XP 32 bit SP3
- Target machine : Windows 7 64 bit clean install
Bimal
All Replies
-
Monday, May 16, 2011 2:18 AMModerator
This issue usually caused by loading an x86 (x64) dependency from a x64 (x86) executable, you can perform a profile with Dependency Walker, meanwhile, use fuslogvw.exe tool to log assembly binding failures.
Eric Yang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

- Marked As Answer by eryangModerator Friday, May 27, 2011 6:44 AM
-
Monday, May 16, 2011 8:43 AM
Hi Eryang
Thanks for the reply. I tried to log the assembly binding failures using fuslogvw but it is showing an empty list always. Below is the output from WinDBG
Here I get the message box showing the errorMicrosoft (R) Windows Debugger Version 6.12.0002.633 AMD64 Copyright (c) Microsoft Corporation. All rights reserved. CommandLine: "C:\Program Files (x86)\Autodesk\SSA 2012\Bin\SSA_STMServer.exe" Symbol search path is: *** Invalid *** **************************************************************************** * Symbol loading may be unreliable without a symbol search path. * * Use .symfix to have the debugger choose a symbol path. * * After setting your symbol path, use .reload to refresh symbol locations. * **************************************************************************** Executable search path is: ModLoad: 00000000`01390000 00000000`013c0000 SSA_STMServer.exe ModLoad: 00000000`77760000 00000000`7790c000 ntdll.dll ModLoad: 00000000`77940000 00000000`77ac0000 ntdll32.dll ModLoad: 00000000`75440000 00000000`7547f000 C:\Windows\SYSTEM32\wow64.dll ModLoad: 00000000`753e0000 00000000`7543c000 C:\Windows\SYSTEM32\wow64win.dll ModLoad: 00000000`753d0000 00000000`753d8000 C:\Windows\SYSTEM32\wow64cpu.dll (744.234): Break instruction exception - code 80000003 (first chance) *** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll - ntdll!CsrSetPriorityClass+0x40: 00000000`77810fb0 cc int 3 0:000> g ModLoad: 00000000`77540000 00000000`7765f000 WOW64_IMAGE_SECTION ModLoad: 00000000`757e0000 00000000`758e0000 WOW64_IMAGE_SECTION ModLoad: 00000000`77540000 00000000`7765f000 NOT_AN_IMAGE ModLoad: 00000000`77660000 00000000`7775a000 NOT_AN_IMAGE ModLoad: 00000000`75380000 00000000`753ca000 C:\Windows\SysWOW64\MSCOREE.DLL ModLoad: 00000000`757e0000 00000000`758e0000 C:\Windows\syswow64\KERNEL32.dll ModLoad: 00000000`774f0000 00000000`77536000 C:\Windows\syswow64\KERNELBASE.dll ModLoad: 00000000`75e10000 00000000`75e9f000 C:\Windows\syswow64\OLEAUT32.dll ModLoad: 00000000`75900000 00000000`75a5c000 C:\Windows\syswow64\ole32.dll ModLoad: 00000000`77180000 00000000`7722c000 C:\Windows\syswow64\msvcrt.dll ModLoad: 00000000`76fd0000 00000000`77060000 C:\Windows\syswow64\GDI32.dll ModLoad: 00000000`773f0000 00000000`774f0000 C:\Windows\syswow64\USER32.dll ModLoad: 00000000`75ea0000 00000000`75f40000 C:\Windows\syswow64\ADVAPI32.dll ModLoad: 00000000`757c0000 00000000`757d9000 C:\Windows\SysWOW64\sechost.dll ModLoad: 00000000`75510000 00000000`75600000 C:\Windows\syswow64\RPCRT4.dll ModLoad: 00000000`754b0000 00000000`75510000 C:\Windows\syswow64\SspiCli.dll ModLoad: 00000000`754a0000 00000000`754ac000 C:\Windows\syswow64\CRYPTBASE.dll ModLoad: 00000000`75600000 00000000`7560a000 C:\Windows\syswow64\LPK.dll ModLoad: 00000000`75720000 00000000`757bd000 C:\Windows\syswow64\USP10.dll ModLoad: 00000000`6e6f0000 00000000`6e7c1000 C:\Windows\SysWOW64\MSVCR100.dll ModLoad: 00000000`6e570000 00000000`6e641000 C:\Windows\SysWOW64\MSVCR100.dll
ntdll!ZwTerminateProcess+0xa: 00000000`777af97a c3 ret 0:000> g ^ No runnable debuggees error in 'g'Thanks
Bimal -
Sunday, May 22, 2011 9:07 AM
To let the 64x bit OS run the 32bit DLLs as needed, you should make sure that the application build platform is x86 and the platform target is x86.
To find those you should go to the application properties, and then at the build tab you'll find them.
To Create new platform with x86, you have to locate the platform combo box beside the "Start Debugging" or "Play" or "RUN" button, and select the "configuration manager" from it.
Hope this will help,
Regards,
Jimmy.
Wassouf- Marked As Answer by eryangModerator Friday, May 27, 2011 6:44 AM
- Unmarked As Answer by Bimal.Net Thursday, February 09, 2012 7:20 AM
- Marked As Answer by Bimal.Net Thursday, February 09, 2012 7:20 AM

