views:

486

answers:

2

I open my application by WinDebug, and see the following information, But some of dll is using path : C:\WINDOWS\WinSxS\x86_Microsoft.VC80.MFC_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_3bf8fa05. Does it mean when I deploy this application on other PC, if the path do not contain the dll, the application will failed to initialize? I am writing the application using vs2005, how can I modify the application to use a certain dll contained in the application's path?

ModLoad: 77d10000 77d9f000   C:\WINDOWS\system32\USER32.dll
ModLoad: 77ef0000 77f38000   C:\WINDOWS\system32\GDI32.dll
ModLoad: 782e0000 783ef000   C:\WINDOWS\WinSxS\x86_Microsoft.VC80.MFC_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_3bf8fa05\MFC80U.DLL
ModLoad: 78130000 781cb000   C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca\MSVCR80.dll
ModLoad: 77be0000 77c38000   C:\WINDOWS\system32\msvcrt.dll
ModLoad: 77f40000 77fb6000   C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 77da0000 77e49000   C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 77e50000 77ee2000   C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fc0000 77fd1000   C:\WINDOWS\system32\Secur32.dll
ModLoad: 762f0000 762f5000   C:\WINDOWS\system32\MSIMG32.dll
ModLoad: 7d590000 7dd83000   C:\WINDOWS\system32\SHELL32.dll
ModLoad: 76990000 76acd000   C:\WINDOWS\system32\ole32.dll
ModLoad: 71a20000 71a37000   C:\WINDOWS\system32\WS2_32.dll
ModLoad: 71a10000 71a18000   C:\WINDOWS\system32\WS2HELP.dll
ModLoad: 7c420000 7c4a7000   C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_b80fa8ca\MSVCP80.dll
ModLoad: 4ec50000 4edf6000   C:\WINDOWS\WinSxS\x86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.2600.5581_x-ww_dfbc4fc4\gdiplus.dll
A: 

I suggest you read about Side-by-side Assemblies.

Assaf Lavie
A: 

Does it mean when I deploy this application on other PC, if the path do not contain the dll, the application will failed to initialize?

Yes, it will fail. You can use Microsoft Visual C++ 2005 Redistributable Package to setup runtime libraries at the target machine. Or link your application to runtime libraries statically (it will not depend on runtime dlls).

Sergius