Anthony Appleyard wrote: > Of my current 3 Visual C++ 2008 (free download version) projects, I > just now ran one in debug mode, and after I exited the program, Visual > C++ listed in its debug output window a list of DLL loadings and > unloadings, with their pathnames, but all in C:\Windows\ and mostly in > C:\Windows\System32\ ; three of them were > > 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.6000.16386_none_87e0cb09378714f1\comctl32.dll' > 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll' > 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6000.16386_none_5d07289e07e1d100\comctl32.dll'
Notice the 'winsxs' in those DLLs. SxS comes from "side-by-side assemblies". This is Microsoft's solution to "DLL Hell". Not a very pretty solution, but it works...generally. IIRC, Windows XP and later (can't remember if 2000 with some Service Pack will as well but I'm pretty sure SxS is a XP feature) will load from SxS assemblies IF a manifest is included with the EXE. > Can I take this as meaning that my program does not need supplied > .DLL's to run? Or what? What do you mean by "supplied DLLs"? > Would my program run on someone's computer that has Windows 2000 or > Windows XL, or does it need Windows Vista? This depends highly on what APIs you are using within your program. At the bottom of every API call on MSDN Library is a list of OSes the API supports. If you are careful, you can potentially support every Windows OS back to Win95. Most people don't bother these days because XP is so prevalent. > Would it work if I merely put the required DLL's in the same folder > along with the program's .EXE file? Or what would have to be done? You can't legally distribute most Windows DLLs with the sole exception of redistributables. Even then, system DLLs belong in Windows\System32 and you shouldn't touch that directory with an installer unless you really know what you are doing. Additionally, copying, say, user32.dll to your application's directory won't load that version of user32.dll. The OS loader will still load the DLL from the system directory because user32.dll is both a critical system file AND it will likely already have been loaded by another program. To determine what DLLs your final (Release mode...not debug mode) EXE is going to depend on, use Dependency Walker (Depends). It will probably require at least msvcr90.dll...one of those redistributables I talked about earlier. Merry Christmas! -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
