Visual Studio 2012 project targeting Windows XP using MFC

I recently purchased the source code from a VS2005 project that uses the MFC library. First, I upgraded the project to VS2012 and now I can build and run the software successfully on Windows 8. Then I wanted to deploy the software to a Windows XP machine.

I installed the Build Platform Toolkit on Windows XP (using the v110_xp option) and I installed Visual C ++ Redistributable for Visual Studio 2012 Update 1 on the target machine. When I run the software, nothing happens. Through some logging functions, I can determine that the call to LoadFrame (IDR_MAINFRAME) is throwing an exception in kernel32.dll. I can no longer debug LoadFrame as remote debugging on Windows XP is not available in VS2012.

Any ideas what could possibly go wrong? Is the Visual C ++ Redistributable Package the correct version to install on the target machine? What should I do next?

UPDATE

My project is already configured to use the 7.1 SDK and has the minimum required version set to 5.01 in the linker options.

If I use InstallShield to create an installer and include the MFC, CRT and ATL redistributables, the installer works and my program now works on Windows XP. My understanding of redistributables is that they just copy the corresponding DLL into the system32 folder (or equivalent)? It's right?

However, if I just copy the files, run vsredist_x86.exe or use Inno Setup to install software and dlls, my program no longer works.

+3


source to share


2 answers


Using a working InstallShield project and a broken Inno project, I was able to determine that the unregistered msxml4.dll was the real culprit. The error I was getting did not give a real clue to this result, but I got there eventually ...



regsvr32 msxml4.dll

      

+2


source


I believe you have read this blog . So you need to use the 7.1 SDK and you need to set the minimum required version to 5.01 in the linker options.



+2


source







All Articles