New to coding and while I was working on c++ console application, all of a sudden I was unable to open the application for debugging. It simply pops up and says "The application was unable to start correctly (0xc0000142)." No error/warning codes on visual studio either. Spent the last hour trying various different solutions I've read on forums and such. Fully updated windows, updated nvidia drivers, changed values in regedit, checked firewall, etc. Only thing left I can think of is to run sfc and possibly have to reinstall windows (which I don't want to do). In the output on visual studio after closing the pop up, it shows that this is due to a 'DLL Initialization' failure.
'tetris.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
'tetris.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'tetris.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'tetris.exe' (Win32): Unloaded 'C:\Windows\System32\KernelBase.dll'
'tetris.exe' (Win32): Unloaded 'C:\Windows\System32\kernel32.dll'
The thread 0x3678 has exited with code -1073741502 (0xc0000142).
The program '[7708] tetris.exe' has exited with code -1073741502 (0xc0000142) 'DLL Initialization Failed'.
It shows my application successfully loading kernal32.dll and KernalBase.dll, but ntdll.dll is loading but not showing that its unloaded. Not totally sure if that's related though. Any help is much appreciated!
Error 0xC0000142
is STATUS_DLL_INIT_FAILED
which probably comes from a missing dependency DLL or a missing function export in a dependency (for example from having an unexpected DLL version that doesn't export the expected function).
eventvwr.exe
) for any loader messages which may tell you the dependency that was missing or failed to load.DLL
and process name matching your EXE filename to see what DLL files are being loaded or attempted to be loaded and look for the last NAME NOT FOUND
chain not ending in a SUCCESS
.User contributions licensed under CC BY-SA 3.0