Forum > Operating Systems

what is Erro Code 0xc000007b ?

(1/3) > >>

senglit:
Hi all,

I wrote a application on win7/32bit system. It works well. Then I copied the source files to a win7/64bit system and compiled it to run. But after it's smooth compling and linking, the application did not run. A dialog showed to say "Application can not run (0xc000007b), please click "ok" to close it".

I checked the project configuration and the "Target OS", "Target CPU Familiy" are both "Default". And I can see a folder named "lib\x86-64-win64" was created automatically under my source file folder. Everything looks normal, but the application didn't run, even when I double click the generated .exe file.

How to solve this problem?

Roy

Thaddy:
Usually this means you should run the application with elevated rights, e.g. administrator. At least that's where I encountered it the most.
Plz report back if that works. In such a case you can add a manifest resource to your application with the requested rights, so you don't need to run it as administrator explicitly.

There are more causes, though:

1. This error occurs due to lack of some system or program files that include DDL files.
2. It also occurs when the file could be damaged, to run the application or the software that can’t start correctly.
3. At the same time, it may also happen due to virus infection, registry errors, etc.
4. There are chances to see this type of errors 0xc000007b error while you are not running the software as administrator.
5. Outdated Microsoft .NET Framework or Microsoft Visual C++ is one of the reasons to cause this type of error.
6. Even when you migrate from Windows 7 to Windows 8, 8.1 or Windows 10, then you see this error when launching the old applications.
7. However, there is also another reason that may cause this Error Code 0xc000007b that include interrupted installation of updates, the incorrect shutdown of the computer, as well as deletion of the program directly from the installation folder.
8. Wrong dll version, although that usually comes with a more descriptive error.
9. Sometimes by this error codes effect may differ from one app to other and hence, it may block access to apps like Skype, Messenger, Microsoft Office package and even any game.

senglit:
It seems not related to the administrator right, but something related to a 32bit dll file I used in the application. I do not have a 64 bit version or the source file of that dll file (writen in C language). Any solution?

Thaddy:
I edited my answer above to describe all possible causes.
Note you can not use a 32 bit dll with 64 bit applications (without thunking, that is), but I expect you already understood that.
OTOH this  "lib\x86-64-win64"  suggests you compiled for 64 bit.  You should compile for 32 bit. (Isn't it  "lib\x86_64-win64" ? note the underscore)

440bx:

--- Quote from: senglit on July 30, 2019, 07:40:58 am ---It seems not related to the administrator right, but something related to a 32bit dll file I used in the application. I do not have a 64 bit version or the source file of that dll file (writen in C language). Any solution?

--- End quote ---

From MSDN

--- Quote ---0xC000007B

STATUS_INVALID_IMAGE_FORMAT

{Bad Image} %hs is either not designed to run on Windows or it contains an error. Try installing the program again using the original installation media or contact your system administrator or the software vendor for support.

--- End quote ---
There is probably a setting incompatible with another one that causes the compiler to produce an executable the Windows loader will not load.

From the description you provided in your original post, the likely contradictory setting is the "Target Processor", change that to "default" as well, recompile and try again.

ETA:

Another possibility is that your 64bit program is trying to load a 32bit dll (the dll you mention is written in C), in that case, just make sure the dll being loaded matches the bitness of your executable.

Also, you are correct that, that error has nothing to do with elevated rights or administrator rights.

Navigation

[0] Message Index

[#] Next page

Go to full version