DLL search order during loading
%windir%/system32folder and another copy in the same directory as your application, when
foo.dllis referenced from that application, the version co-located with the application is always loaded.
This MSDN article talks in more detail about DLL search order.
For managed code dependencies, the Global Assembly Cache always prevails; the local assembly in application directory will not be picked up if there is an existing (or newer with policy) copy in the GAC.