DLL Loading Question

Tech-Archive recommends: Fix windows errors by optimizing your registry



I'm trying to wrap my head around how DLLs are managed by the kernel. Let's
say we have an executable which loads 2 DLL's. The first DLL exports
function foo(), and the second DLL exports function bar(). Now, let's
assume foo() needs to call bar(), and uses LoadLibrary/GetProcAddress in its
code to do this. Would the bar() function be loaded in memory twice - one
for the main app, and the other for the first DLL, or is it only loaded once
and shared between the two?


.