The Problem
At work, we recently upgraded to Visual C++ 2005 Service Pack 1 (SP1). At the same time, our application stopped working for some users.
Everybody that had SP1 was able to run the application. Some people *without* SP1 were also able to run the application.
My system (not SP1) could not run the application built by the newly upgraded SP1 build machines, so I tried to figure out why. I used
Dependency Walker to find out why my application would not load.
Dependency Walker showed that the C runtime library (msvcr80.dll) could not be found. I noticed the full path of where the application was trying to get msvcr80.dll was:
C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_
8.0.50727.
762_none_24c8a196583ff03b\msvcr80.dll
I searched my system and I *did* have msvcr80.dll in my \windows folder, but not in the path the application was using.
I had not seen a path like that before for a DLL. I had no idea why the application was looking there instead of in \Windows\system32 like it normally would.
I tried copying msvcr80.dll locally to the application folder and refreshed Dependency Walker. That had no effect...the application could not find msvcr80.dll.
That used be the failsafe way to make an application see a DLL...put it in the same directory as the application. Something was very different now.