Runtime error (loading dll) by win32 applications on x64 system at 0K compilation

I originally developed the win32 application for win7 32bits, with VC9.0. I recently upgraded to win7 64 bit and tried to create + run the previous application.

The line works fine (win32 application), but at runtime I get the error message "[...] exited with code -1073741701 (0xc000007b)."

I think these are the results of loading a 64-bit version of the [alleged] 32-bit dll.

Specific dependencies for this project: SDL.lib SDLmain.lib SDL_ttf.lib opengl32.lib glu32.lib wininet.lib

SDL and SDL_ttf are only in the 32-bit version. I guess Visual Studio is smart enough to extract opengl and glu lib files in \ syswow64 when I request a win32 application.

Could this be due to wininet? Or did I make a mistake?

Thank,

+5
source share
1 answer

It seems you are loading a 64-bit DLL into a 32-bit process or vice versa. Here, as I would like to track a corrupted DLL.

The first step will be the launch dumpbin.exe (VS use the command line to get it on the PATH) in the executable file, to ensure that the expected architecture: dumpbin.exe /headers foo.exe. In the output of the file header, you should see the "machine" value "x86" or "x64". In the optional header, you should see the magic "PE32" (for x86) or "PE32 +" (for x64).

, www.dependencywalker.com, (x86 x64) . , , .

, - .

+8

All Articles