Can somebody help with the following error please?
'WidgetKeyboard.exe': Loaded 'C:\Windows\SysWOW64\wsock32.dll', Cannot find or open the PDB file
'WidgetKeyboard.exe': Loaded 'C:\Windows\SysWOW64\ws2_32.dll', Cannot find or open the PDB file
'WidgetKeyboard.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'WidgetKeyboard.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'WidgetKeyboard.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'WidgetKeyboard.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'WidgetKeyboard.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'WidgetKeyboard.exe': Loaded 'C:\Windows\SysWOW64\nsi.dll', Cannot find or open the PDB file
'WidgetKeyboard.exe': Loaded 'C:\Suneel\Keyboard\WidgetKeyboard\Debug glsdll md\iconv.dll', Binary was not built with debug information.
'WidgetKeyboard.exe': Loaded 'C:\Suneel\Keyboard\WidgetKeyboard\Debug glsdll md\zlib1.dll', Binary was not built with debug information.
The program '[6452] WidgetKeyboard.exe: Native' has exited with code -1073741701 (0xc000007b).
You don't give us much to start from. Apparently you are using DllImport
in .NET (I guessed that from the tag, correct me if I'm wrong).
0xc000007b
means STATUS_INVALID_IMAGE_FORMAT, and you are probably trying to load a 32-bit image into a 64 process or vice versa.
Usually, Windows tries to prevent that from ever happening. File system virtualization ensures that DLL loads from C:\Windows\system32 are redirected to C:\Windows\syswow64, and Registry virtualization ensures that COM servers are matched with the bit-ness of the COM client.
There's probably something that you did that bypasses these counter-measures. Maybe you copied DLLs to the same folder as your EXE. Or the resolution of the DLL path goes wrong, e.g. because you rely on the system's PATH environment variable or you used SetDllDirectory()
.
First of all, check that the bit-ness of your application matches the bitness of the DLL you are importing. If that fails, use SysInternals' ProcMon, which shows you what file it is trying to load.
That is an NTSTATUS
error code. Look it up here: https://msdn.microsoft.com/en-gb/library/cc704588.aspx
In your case 0xC000007B
is STATUS_INVALID_IMAGE_FORMAT
. Described like this:
{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.
Typically that means that the loader, when resolving load-time dependencies, is attempting to load a 64 bit DLL into a 32 bit process, or vice versa. The diagnostics you show suggest that your process is a 32 bit process. So you should look for the 64 bit DLL that the loader is attempting to load. Use the Dependency Walker tool in Profile mode to debug this.
User contributions licensed under CC BY-SA 3.0