Application hangs on startup with error 0xc0000142 on NTDLL.DLL 
Author Message
 Application hangs on startup with error 0xc0000142 on NTDLL.DLL

Hi,

I've just finished porting a huge graphics Win16 app to Win32 (pure API
programming, no MFC).
The app EXE is some 3MB in size and requires 7 Win32 DLLs also ported to
Win32.
Whenever I try to start the application normally or within the de{*filter*} I
get the following error:
Application XXXXXX failed to initialize. Error code is 0xc0000142...
The MSVC de{*filter*} doesn't even have a chance to trap the first command in my
WinMain function.
The only thing that it shows is that an unhandled exception occurs in
NTDLL.DLL and it finally opens a disassembly and a call stack window which
shows that the 3rd call to NTDLL.DLL is causing the exception.
Any chance to figure out what the hell is going on?

TIA

Dimitris



Mon, 21 Jul 2003 04:22:13 GMT  
 Application hangs on startup with error 0xc0000142 on NTDLL.DLL
Greets,

    The particular exception you are seeing means that one of your DLLs
failed to initialize for some reason or another.  The only thing I can think
of offhand is to run the application in the de{*filter*} and watch the output
window to see which DLLs are being mapped into your processes address space.
When the exception occurs, note the DLLs that have been successfully loaded.
At this point, you can narrow down which DLL is the culprit (I am going to
assume one of your seven DLLs that you have ported) and then launch them in
a de{*filter*} with the client application as the executable for the debug
session.  Place the breakpoint on your DllMain() and see if there is
something going awry.  It is possible that you are calling an API function
with invalid parameters somewhere when your DLL is being initialized,
however, it is difficult to determine without more information.

Regards,

Joe


Quote:
> Hi,

> I've just finished porting a huge graphics Win16 app to Win32 (pure API
> programming, no MFC).
> The app EXE is some 3MB in size and requires 7 Win32 DLLs also ported to
> Win32.
> Whenever I try to start the application normally or within the de{*filter*} I
> get the following error:
> Application XXXXXX failed to initialize. Error code is 0xc0000142...
> The MSVC de{*filter*} doesn't even have a chance to trap the first command in
my
> WinMain function.
> The only thing that it shows is that an unhandled exception occurs in
> NTDLL.DLL and it finally opens a disassembly and a call stack window which
> shows that the 3rd call to NTDLL.DLL is causing the exception.
> Any chance to figure out what the hell is going on?

> TIA

> Dimitris



Mon, 21 Jul 2003 04:41:28 GMT  
 Application hangs on startup with error 0xc0000142 on NTDLL.DLL
Dear Joe,

you are right; two of my 32-bit DLLs were actually wrapping two 16-bit DLLs
and one of them (16-bit) was attempting to load KERNEL.DLL and GDI.DLL (the
16-bit kernel and gdi of Win 3.x) and of course it was failing. I managed to
figure that out by ignoring the 1st exception of NTDLL and continuing
execution which showed the offending 16-bit DLL. Thank you for responding.

Dimitris


Quote:
> Greets,

>     The particular exception you are seeing means that one of your DLLs
> failed to initialize for some reason or another.  The only thing I can
think
> of offhand is to run the application in the de{*filter*} and watch the output
> window to see which DLLs are being mapped into your processes address
space.
> When the exception occurs, note the DLLs that have been successfully
loaded.
> At this point, you can narrow down which DLL is the culprit (I am going to
> assume one of your seven DLLs that you have ported) and then launch them
in
> a de{*filter*} with the client application as the executable for the debug
> session.  Place the breakpoint on your DllMain() and see if there is
> something going awry.  It is possible that you are calling an API function
> with invalid parameters somewhere when your DLL is being initialized,
> however, it is difficult to determine without more information.

> Regards,

> Joe



> > Hi,

> > I've just finished porting a huge graphics Win16 app to Win32 (pure API
> > programming, no MFC).
> > The app EXE is some 3MB in size and requires 7 Win32 DLLs also ported to
> > Win32.
> > Whenever I try to start the application normally or within the de{*filter*}
I
> > get the following error:
> > Application XXXXXX failed to initialize. Error code is 0xc0000142...
> > The MSVC de{*filter*} doesn't even have a chance to trap the first command
in
> my
> > WinMain function.
> > The only thing that it shows is that an unhandled exception occurs in
> > NTDLL.DLL and it finally opens a disassembly and a call stack window
which
> > shows that the 3rd call to NTDLL.DLL is causing the exception.
> > Any chance to figure out what the hell is going on?

> > TIA

> > Dimitris



Mon, 21 Jul 2003 05:57:04 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Suddenly getting "NTDLL.DLL 0xC0000142 DLL Initialization Failed message?

2. NT Memory error (In NTDLL.DLL - can't read memory at FFFFFFF8)

3. usercode breakpoint error, ntdll.dll

4. NTDLL.dll system error problem...

5. NTDLL.dll exception error problem...

6. TMPGEnc Error message with ntdll.dll

7. usercode breakpoint error, ntdll.dll

8. NTDLL.dll error

9. Crash in NTDLL on startup

10. NTDLL.DLL error

11. usercode breakpoint error, ntdll.dll

12. msdev.exe application error on startup

 

 
Powered by phpBB® Forum Software