The version of Regsvr32.exe must match the 32-/64-bitness of the dll you’re trying to register. The 64-bit regsvr32 cannot load a 32-bit dll, and vice versa.
You may need explicitly call the 32-bit version of regsrv32 located in %systemroot%SysWoW64regsvr32.exe.
From http://support.microsoft.com/kb/249873
Regsvr32.exe is included with Microsoft Internet Explorer 3.0 or later versions, Windows 95 OEM Service Release 2 (OSR2) or later versions, and Windows NT 4.0 Service Pack 5 (SP5) or later versions. Regsvr32.exe is installed in the System (Windows Me/Windows 98/Windows 95) or System32 (Windows NT/Windows XP/Windows Vista/Windows 7) folder.
Note On a 64-bit version of a Windows operating system, there are two versions of the Regsv32.exe file:
- The 64-bit version is %systemroot%System32regsvr32.exe.
- The 32-bit version is %systemroot%SysWoW64regsvr32.exe.
Regsvr32.exe usage
RegSvr32.exe has the following command-line options:
Regsvr32 [/u] [/n] [/i[:cmdline]] dllname
/u — Unregister server
/i — Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall
/n — do not call DllRegisterServer; this option must be used with /i
/s – Silent; display no message boxes (added with Windows XP and Windows Vista)
When you use Regsvr32.exe, it attempts to load the component and call its DLLSelfRegister function. If this attempt is successful, Regsvr32.exe displays a dialog box that indicates success. If the attempt is unsuccessful, Regsvr32.exe returns an error message. This may include a Win32 error code. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
193625 WinInet error codes (12001 through 12156)
0xc000007b is one of many well-known runtime error codes. You can check out other error codes and their more user friendly descriptions here:
Link
Someone may correct or elaborate on this point but if we see code 0xc000007b, we are being told that a binary we tried use is either corrupt or not intended to be run in our process. That description is intended to be vague because this error code can cover a large number of situations. I would argue that there are no one-size-fits-all solutions to this problem but I will share ideas on how to track down the root cause of this issue. The root cause could vary from user to user and a case-by-case solution will be needed.
Why am I seeing this code?
The short answer is that I won’t know until I get more info from you. Often times, this error code is caused by a 64-bit process trying to use a 32-bit dll or vice versa. In our case, the 64-bit Launcher is probably trying to load a .dll that it wasn’t meant to run with. The problem is that this isn’t the only situation that could cause this error code. It could be a subtle problem with any of the binaries used/referenced. I’m not clear on all the ways users can get into this state but usually it has to do with dependencies that are corrupt, modified, incorrectly installed, or that have been tampered with. I’ll be sure to update my answer if/when I find out more.
How can I pinpoint the problem?
Some users have had luck uninstalling and then reinstalling some of the well-known dependencies(directx, VCRedist, etc). This is a hit or miss solution because we can’t be sure which of those dependencies, if any, is causing the problem without investigating further. This is a valid approach to the problem and you may get lucky but if you want to know more about the root cause of this problem we’ll need some tools:
Dependency Walker 2.2 x64
is a very useful tool for troubleshooting system errors related to loading and executing modules and we’ll use it here to see what module is causing our 0xc000007b error. There are many ways of using dependency walker to pinpoint the problem and you could experiment with the tool(be sure to check out the depends.chm documentation that is packaged with it). Note: If you are having difficulty viewing the documentation, you may need to Unblock it in the properties (right click depends.chm -> Properties -> General Tab -> Unblock). Below I run you through an example of using Dependency Walker on my Unreal Engine Launcher.
Using Dependency Walker
Here I intend to give you an overview of one of the ways you could use Dependency Walker to pinpoint the module that is causing issues. I had to tamper with one of my System Dlls to artificially reproduce the problem so your log files will be different but you’ll be generating and reading the logs in a similar way on your computer.
-
Download Dependency Walker 2.2 x64 from here:
Link
-
Extract
depends22_x64.zip
to
C:DWalker
- Open a command window as administrator (Start Menu -> type “cmd” in the search box and right click on cmd.exe and select Run as Administrator)
- Enter the following command to switch to the folder we extracted Dependency Walker to: cd C:DWalker
-
Enter the following command to have the tool generate logs while running Unreal Engine Launcher(Note: I have my Unreal engine installed to the default location, you would replace c:Program FilesUnreal Engine in the command below with your install location):
depends.exe /c /f:1 /pb /pp:1 /pg:1 /ot:Log.txt "c:Program FilesUnreal EngineLauncherEngineBinariesWin64UnrealEngineLauncher.exe"
- This will run Unreal Engine Launcher and you’ll see the familiar 0xc000007b error message. Click OK to dismiss it as usual.
- You should now have a Log.txt file in the C:DWalker folder. In the next section I’ll go over what to look for in this log to pinpoint the problem module.
Reading Dependency Walker Logs
If you followed the steps above, you should have a Log.txt file in your c:DWalker folder. Open the log in a text editor and have a look. If you are anything like me, and seeing one of these logs for the first time, the contents of the log may make your head spin. Use the points below as a guide when searching for errors. I’ll update this section whenever I find a different fail case. Note: Don’t get hung up on every little warning/error you spot in the log, Dependency Walker may generate many warnings and errors for an application but most of these will be harmless and can be ignored. If you feel comfortable doing so, I would encourage you to share your log so that we can spot any common issues and hopefully find a way to get them fixed up in future releases.
Search the log for the strings in bold:
-
Error: Modules with different CPU types were found
. This means the 64 bit process was given a 32 bit module. To pinpoint the module having the problem, look through the list of DLLs before the error appeared and find the one with the [ E ]. Here is an example of my xinput dll having issues loading:
[ E ] c:windowssystem32XINPUT1_3.DLL
-
Error: At least one file was not a 32-bit or 64-bit Windows module
. This means a DLL is probably corrupt. To pinpoint the module having the problem, look through the list of DLLs before the error appeared and find the one with the [ ! ]. Here is an example of my xinput dll which is corrupt:
[ ! ] c:windowssystem32XINPUT1_3.DLL
-
At least one module was corrupted or unrecognizable to Dependency Walker, but still appeared to be a Windows module
. This means a module was invalid. To pinpoint the module(s) having the problem, look through the list of DLLs before the warning appeared and find any with [ ! ] or [ !6]. Here is an example of a module that has this issue:
[ !6] c:windowssystem32D3DCOMPILER_43.DLL
What do I do once I pinpoint the problem?
First we’ll need to pinpoint the product the DLL is associated with and try to reinstall/repair that product. In my case, above, XINPUT1_3.dll is part of DirectX so I would download DirectX from a trusted Microsoft site and reinstall it. If the same issue shows up in the logs after I do that I would get more aggressive with my reinstall: I would backup my copy of the .dll, delete the original, try to reinstall again, and check to make sure a new copy of the dll was put in place. Note: Some people suggest to download DLLs from various websites but I want to caution you about this: I would personally never never never never… never use an untrusted site to download .dlls from. In other words,
do not use untrusted sites to download DLLs
.
- Remove From My Forums
-
Question
-
I’m trying to run an upgraded (VB6 to VB.NET) application which uses methods available in WINSOCK.DLL in Windowssystem32 file.
Though this .dll is present on my machine, it shows the following error:
«The application or DLL C:WINDOWSsystem32WINSOCK.DLL is not a valid Windows image. Please check this against your installation diskette.
Please suggest how to solve this error.
Is it ok to copy winsock.dll from someone else’s pc or download it from internet.
All replies
-
I tried registering using RegSvr32 as follows:
RegSvr32 C:windowssystem32winsock.dll
But it displayed the following error:
C:windowssystem32winsock.dll is not an executable file and no registration helper is registered for this file type.
Is there anyother way?
-
I was checking the dependencies of WINSOCK.DLL. It shows an error:
No PE signature found. This appears to be a 16-bit Windows module. At least one file was not 32-bit or 64-bit Windows module.
How can I get a current version of WINSOCK.DLL. I’m worknig on VS .NET 2003
-
The
32-bit version of Winsock is ws2_32.dll. It is however unlikely
that your VB6 program used Winsock.dll, VB6 generates 32-bit programs,
Winsock.dll is a 16-bit DLL. Mswinsck.ocx is the ActiveX
component for the VB6 Winsock control… -
I didnot find this on my machine. But the error says its looking for winsock.dll
-
What about those that wish to run the program but do not have mswinsock.ocx, is there a module that i could place in there?
I’m a little new to this visual Basic stuff, so I’m sorry if this is a «noob question»
8 hours ago, lauri1526 said:
I’m stuck with this problem
Really? This problem relates to an old issue when the SimConnect.dll file was required to be installed. This has not been required for at least 3 months, so this is certaibly not your issue.
8 hours ago, lauri1526 said:
At least one file was not a 32-bit or 64-bit Windows module.» I found out that the wrong file is MSFSWITHFSUIPC7.BAT. How can I fix that?
Its a batch file, of course its not either 32 or 64 bit, but works on both systems (although FSUIPC7 is obviously 64 bit).
Sorry, but I have no idea what your problem is. I suggest you at least read the provided documentation (Installation and Registration guide + the README.txt) and if you are still having issues then check the forums and post again giving details of your issue.
8 hours ago, lauri1526 said:
My registeration key is not working either.
Did you use exactly the same details as provided by SimMarket? Did you click the Register button? If so, what did the pop-up say when you did this? If not, do that.
I am closing this topic.
John