title: C++ program works on XP SP2 only after installing Visual Studio
body: <p>I have a C++ program. It's quite simple - shows an image (splash screen) and launches another application, then closes when that other application is started. Actually, this one: <a href="http://www.olsonsoft.com/blogs/stefanolson/post/A-better-WPF-splash-screen.aspx" rel="nofollow">http://www.olsonsoft.com/blogs/stefanolson/post/A-better-WPF-splash-screen.aspx</a> with very minor changes (my splash screen image and my program is launched instead of the sample one).</p>
  
  <p>It works good on my Windows 7 developer machine. Also it works on another (virtual) machine with Windows XP SP2 and Visual Studio 2008 installed. But it doesn't work on just the same virtual Windows XP SP2 machine without Visual Studio. It shows an error: "Entry point memmove_s could not be located in the dynamic link library msvcrt.dll".</p>
  
  <p>I have found that a problem possible is in WindowsCodec DLL (no such DLL in clear XP SP2 installation, but it is in Windows/system32 folder of XP SP2 with Visual Studio) so I copied it to the application folder on the clear system. After that the program partially works (launches another application after start) but didn't show the splash screen image.</p>
  
  <p>Installation of Microsoft Visual C++ Redistributable Package (both 2008 and 2010) didn't help.</p>
  
  <p>I've found a recommendation to use static linking in Visual Studio (<strong>Multi Threaded (/MT)</strong> option in project properties -> C/C++ -> Code Generation), but it also didn't help.</p>
  
  <p>Also I have tried DependencyWalker but cannot find any differences in dependencies for both test systems.</p>
  
  <p>Anyone have any ideas why this could happen? I'm completely new in C++, hope this is something obvious that I just don't know...</p>