Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DLL Initialization failed

DLL Initialization failed

Scheduled Pinned Locked Moved C / C++ / MFC
help
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Parthiban
    wrote on last edited by
    #1

    I am getting an exception while start running my project. i am included some 6 dll's and each dll is working and verified. The error message shows, "The application failed to initialize properly (0xc0000142). Click on OK to terminate the application" "Unhandled exception in LFATE.exe (NTDLL.DLL): )xc0000142: DLL Initialization Failed"

    S S 2 Replies Last reply
    0
    • P Parthiban

      I am getting an exception while start running my project. i am included some 6 dll's and each dll is working and verified. The error message shows, "The application failed to initialize properly (0xc0000142). Click on OK to terminate the application" "Unhandled exception in LFATE.exe (NTDLL.DLL): )xc0000142: DLL Initialization Failed"

      S Offline
      S Offline
      shadrach_india
      wrote on last edited by
      #2

      Dll might be corrupted

      1 Reply Last reply
      0
      • P Parthiban

        I am getting an exception while start running my project. i am included some 6 dll's and each dll is working and verified. The error message shows, "The application failed to initialize properly (0xc0000142). Click on OK to terminate the application" "Unhandled exception in LFATE.exe (NTDLL.DLL): )xc0000142: DLL Initialization Failed"

        S Offline
        S Offline
        Stephen Hewitt
        wrote on last edited by
        #3

        I would guess DLLMain is returning FALSE in response to the DLL_PROCESS_ATTACH notification and you're statically linking to the DLL.

        Steve

        P 1 Reply Last reply
        0
        • S Stephen Hewitt

          I would guess DLLMain is returning FALSE in response to the DLL_PROCESS_ATTACH notification and you're statically linking to the DLL.

          Steve

          P Offline
          P Offline
          Parthiban
          wrote on last edited by
          #4

          I am linking 10 dlls statically. how can i figure out?

          S 1 Reply Last reply
          0
          • P Parthiban

            I am linking 10 dlls statically. how can i figure out?

            S Offline
            S Offline
            Stephen Hewitt
            wrote on last edited by
            #5

            Just run the app in a debugger and watch the output. I made a test app to reproduce the problem and here's the output MSVC6 produced:

            Loaded 'ntdll.dll', no matching symbolic information found.
            Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
            Loaded symbols for 'C:\Projects\Scratch\StaticLinkProblem\Debug\ProblemDLL.dll'
            First-chance exception in StaticLinkProblem.exe (NTDLL.DLL): 0xC0000142: DLL Initialization Failed.

            The line in question is "Loaded symbols for 'C:\Projects\Scratch\StaticLinkProblem\Debug\ProblemDLL.dll'"; the last DLL load reported before the problem occured.

            Steve

            P 1 Reply Last reply
            0
            • S Stephen Hewitt

              Just run the app in a debugger and watch the output. I made a test app to reproduce the problem and here's the output MSVC6 produced:

              Loaded 'ntdll.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
              Loaded symbols for 'C:\Projects\Scratch\StaticLinkProblem\Debug\ProblemDLL.dll'
              First-chance exception in StaticLinkProblem.exe (NTDLL.DLL): 0xC0000142: DLL Initialization Failed.

              The line in question is "Loaded symbols for 'C:\Projects\Scratch\StaticLinkProblem\Debug\ProblemDLL.dll'"; the last DLL load reported before the problem occured.

              Steve

              P Offline
              P Offline
              Parthiban
              wrote on last edited by
              #6

              Thankx. But i am getting error message as follows...

              Loaded 'ntdll.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\hp34401_32.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\visa32.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\NiViSv32.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\msvcrt20.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\DP5022DLL.DLL', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\DP5301DLL.DLL', no matching symbolic information found.
              Loaded 'D:\DP PROJECTS\PEA0430_SEAKING_1\LFATE_APP_MODIFIED_KARTHI\LFATE_Modified ver-0.11_13_12_06_Karthi\Debug\DP5031DLL.DLL', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\DPCPCI4509DRV.DLL', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\DPcPCI4035.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\DPcPCI4140.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\DPcPCI4158Drv.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\DPcPCI4305.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\DPcPCI2709Drv.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\DPcPCI4341.dll', no matching symbolic information found.
              Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
              Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
              Loaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'
              Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.
              Loaded 'C:\WINDOWS\system32\oleaut32.dll', no matching symbolic information found.
              First-chance exception in LFATE.exe (NTDLL.DLL): 0xC0000142: DLL Initialization Failed.

              Whether can i concluded the probelm in

              C:\WINDOWS\system32\oleaut32.dll

              file. is this system dll? How can i solve it? Reg, Parthiban

              S 1 Reply Last reply
              0
              • P Parthiban

                Thankx. But i am getting error message as follows...

                Loaded 'ntdll.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\hp34401_32.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\visa32.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\NiViSv32.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\msvcrt20.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\DP5022DLL.DLL', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\DP5301DLL.DLL', no matching symbolic information found.
                Loaded 'D:\DP PROJECTS\PEA0430_SEAKING_1\LFATE_APP_MODIFIED_KARTHI\LFATE_Modified ver-0.11_13_12_06_Karthi\Debug\DP5031DLL.DLL', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\DPCPCI4509DRV.DLL', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\DPcPCI4035.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\DPcPCI4140.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\DPcPCI4158Drv.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\DPcPCI4305.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\DPcPCI2709Drv.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\DPcPCI4341.dll', no matching symbolic information found.
                Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
                Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
                Loaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'
                Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.
                Loaded 'C:\WINDOWS\system32\oleaut32.dll', no matching symbolic information found.
                First-chance exception in LFATE.exe (NTDLL.DLL): 0xC0000142: DLL Initialization Failed.

                Whether can i concluded the probelm in

                C:\WINDOWS\system32\oleaut32.dll

                file. is this system dll? How can i solve it? Reg, Parthiban

                S Offline
                S Offline
                Stephen Hewitt
                wrote on last edited by
                #7

                Try turning on "loader snaps". Follow these steps: 1. Download and install the latest version of WinDBG[^]. 2. Select “Start”->”All Programs”->”Debugging Tools for Windows”->”Global Flags”. 3. The “Global Flags” dialog appears. Select the “Image File” tab. 4. In the “Image: (TAB to refresh)” edit control enter your exe name with extension; not the full path, just the filename. 5. Press the “Tab” key. 6. Tick the “Show loader snaps” tick box. 7. Press the “Apply” button. 8. Run the application in a debugger. Here’s some sample output:

                Loaded 'ntdll.dll', no matching symbolic information found. Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found. Loaded symbols for 'C:\Projects\Scratch\StaticLinkProblem\Debug\ProblemDLL.dll' [9b4,f48] LDR: Real INIT LIST for process C:\Projects\Scratch\StaticLinkProblem\Debug\StaticLinkProblem.exe pid 2484 0x9b4 [9b4,f48] C:\Projects\Scratch\StaticLinkProblem\Debug\ProblemDLL.dll init routine 100011C0 [9b4,f48] LDR: ProblemDLL.dll loaded - Calling init routine at 100011C0 [9b4,f48] LDR: DLL_PROCESS_ATTACH for dll "C:\Projects\Scratch\StaticLinkProblem\Debug\ProblemDLL.dll" (InitRoutine: 100011C0) failed LDR: LdrpInitializeProcess - Failed running initialization routines; status c0000142 LDR: _LdrpInitialize - call to LdrpInitializeProcess() failed with ntstatus c0000142 First-chance exception in StaticLinkProblem.exe (NTDLL.DLL): 0xC0000142: DLL Initialization Failed.

                9. When done un-check the “Show loader snaps” tick box and press "OK". The line of interest is the following:

                [9b4,f48] LDR: DLL_PROCESS_ATTACH for dll "C:\Projects\Scratch\StaticLinkProblem\Debug\ProblemDLL.dll" (InitRoutine: 100011C0) failed

                Steve

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups