Loading DLLs

Does Windows leave previously loaded DLLs, loaded? One thing I've noticed is that sometimes, if I have a program that loads a DLL with LoadLibrary(), then I recompile the library and overwrite the DLL file, and run the program again, the program crashes from inside the library. Has this happened to anyone else?
If the DLL was in use, it would be locked and you wouldn't be able to overwrite it.
Come on, do you take me for an idiot?
No. Have ever you managed to overwrite a Windows program while in use?
I don't see how that's relevant, but no, not that I remember.
What exactly triggers the "This application has failed to start because *.dll was not found." message? I'm building a project by linking everything statically, but some dependency is still trying to link to this DLL, even though at no point was any DLL generated. The strangest thing is that even though the DLL wasn't found, the program still runs.
Maybe you should ask on a Windows forum. I don't think any of us here know.
I was under the impression that when you use an import lib, the name of the corresponding dll is place in the exe file and when windows loads, it checks the exe file, loads any required dlls and makes the dll function
call fixups.
That's how I think it works, too, but here's the thing: the DLL's name doesn't appear anywhere in the .libs (yes, I searched using UCS-2). As far as I can tell, there's no reason for a DLL to be loaded.

Well, the generated .lib was giving me problems when I tried to dynamically link a different library, so since the DLL was going to be loaded anyway, I just built the library for dynamic link. Still, I don't understand how or why it was attempting to link to something it shouldn't know about.
Topic archived. No new replies allowed.