Re: AfxLoadLibrary fails, GetLastError returns 14001



I have now been able to duplicate the problem on another machine, one
that I have more access to.

I GetLastError() returns 14001 when I try to use LoadLibrary,
AfxLoadLibrary, or LoadLibraryEx.

The .dll file is in the same directory as the executable, and I've
verified that that directory is the current working directory.

I double-checked and loaded the .dll file into depends.exe on the
machine that fails to load the .dll, and it doesn't show any missing
dependencies.

On Mar 16, 9:10 pm, mr.porteiro.h...@xxxxxxxxx wrote:
On Mar 15, 4:23 pm, "David Ching" <d...@xxxxxxxxxxxxxxxxxxxxxx> wrote:



"Giovanni Dicanio" <giovanniDOTdica...@xxxxxxxxxxxxxxxxx> wrote in message

news:OcSzCTWpJHA.6064@xxxxxxxxxxxxxxxxxxxxxxx

<mr.porteiro.h...@xxxxxxxxx> ha scritto nel messaggio
news:88c7d73e-3143-4fbb-b15b-ed36410a29f8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have one user's system whereAfxLoadLibraryconsistently fails.
GetLastError() returns 14001, the message for which is an unhelpful
"This application has failed to start because the application
configuration is incorrect. Reinstalling the application may fix this
problem."

I've verified that the .dll file is there.

I get the same results from LoadLibraryEx().

What might be causing this?

I suspect a manifest problem...

Yes, it sounds like a manifest problem. The error message is the one you
get on startup if a DLL can't be found, so it sounds like this is happening
to a DLL except it is delayed until it is tried to be loaded withAfxLoadLibrary. I would load the .dll into Depends.exe (download the app
called Dependency Walker) and see if it finds any dependent DLL's not
installed properly.

-- David

Yes, a missing dependency was my first thought. I tried loading it
in depends.exe, and it doesn't show anything missing.



.



Relevant Pages

  • Re: Unable to load DLL - The file is there
    ... | What DLL should I be missing? ... I just found an header that allows the DLL to work in Windows XP ... | Willy Denoyette wrote: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Unable to load DLL - The file is there
    ... Tried with an wireless USB adapter and a wireless ... Iniside the DLL, even before it begins mainof WrapiTest.cpp, it ... | What DLL should I be missing? ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Loadgen - error registering MSMQTransmitter.dll
    ... Some missing dependencies, most likely this DLL depends on some other DLLs ... the Dependency Walker tool and see which DLLs you are missing. ... Loadgen - error registering MSMQTransmitter.dll ...
    (microsoft.public.biztalk.general)
  • Re: distributing an application
    ... > Run the Dependency check to check what you are missing. ... > dll in the developing machine than the one in the deployment machine. ...
    (microsoft.public.platformsdk.security)
  • Re: distributing an application
    ... > Run the Dependency check to check what you are missing. ... > dll in the developing machine than the one in the deployment machine. ...
    (microsoft.public.vc.atl)

Loading