Virtual Developer Workshop: Containerized Development with Docker

Many developers like myself need to use both VC5 and VC6. This is not possible using a standard installation, given that the names of the MFC Debug DLLs are the same in both versions. I have seen several suggestions for how to do this. The Microsoft recommended solution is to use two different installations of the OS. I have also seen people suggest copying the MFC DLLs to the Debug output directory for your project. These solutions are less than ideal. What I will present here is a method that is fairly painless and does not waste a lot of disk space.

Start by creating 2 subdirectories - one for the VC5 DLLS and one for VC6. I created mine under the WINNT\SYSTEM32 subdirectory and I named them VC5-MFC and VC6-MFC.

Next, copy the DEBUG dlls for each version to the appropriate subdirectory. If you have already installed VC6, it will have overwritten the VC5 versions, so you will need to copy them from the VC5 CD. The files you need to copy (for each version) are:

  • MFC42D.DLL
  • MFC42D.PDB

Now, create batch files to copy the correct version of the DLLs to the WINNT\SYSTEM32 subdirectory. I put mine in the WINNT\SYSTEM directory and named them USEVC5.BAT and USEVC6.BAT. The USEVC5.BAT file would look like this:

@echo off
xcopy C:\winnt\system32\vc5-mfc\*.* c:\winnt\system32

The USEVC6.BAT file would look like this:

@echo off
xcopy C:\winnt\system32\vc6-mfc\*.* c:\winnt\system32

I created a shortcut on my desktop for each of these batch files so I could quickly run the appropriate batch file before launching a version of VC. I have been using this method for a couple of months (ever since VC6 shipped) and it works fine - no side effects or other strange behavior to report.

Procedure for applying service packs - When applying the VC 6 Service Pack 1, or any future service packs, be sure to run the USEVC6 batch file before applying the service pack. After the service pack has been applied, you need to copy the DEBUG dlls again from the WINNT\SYSTEM32 directory to the VC6-MFC directory.


  • runtime odbc

    Posted by Legacy on 03/06/2002 08:00am

    Originally posted by: m.sivasubramanian

    respected sir,
    now i am confusing to connect the oracle data base as like as back end,and vc++ as like a front end.
    this problem is starting from when i am using single document also,
    so please help to above the problem. i am very afraid this problem because my project is depending the database connection (hospital management) .could u possible please u will explain the runtime odbc with suitable example as possible .
    i will expect ur kind email
    thank u

  • question on vc5.0 and 6.0

    Posted by Legacy on 11/22/2001 08:00am

    Originally posted by: ywu

    I am working on a project previous built using vc5.0. Now my system only have vc6.0 installed and I need to modify one of the DLL in the project. Can I build the DLL in 6.0 and use it with the other 5.0-built DLLs and EXEs in the project?

  • HELP: Can't go from 6.0 to 5.0

    Posted by Legacy on 05/30/2000 07:00am

    Originally posted by: John Warren

    I have a problem. I wish to take the same c++ project from
    6.0 to 5.0 and from 5.0 to 6.0. I finally sucessfully got
    the debug version to run when I built the project in 6.0. However, I cannot get the debug version to run in 5.0 even when copying the dll and pdb files that were listed. I KNOW the vc5 and vc6 version are right and different. I have rebooted, rebuilt every thing, etc. HELP please with a procedure to go from 5.0 to 6.0, build and have no ordinal problems when running debug. Then do the same thing but go from 6.0 to 5.0.


  • I don't have much problems with VC 5 and 6 in my NT Workstation

    Posted by Legacy on 11/18/1999 08:00am

    Originally posted by: Luis Juli�n Dom�nguez P�rez

    I have an Intel Pentium MMX 200 64MB and NT 4 SP5 at work, and I have installed Visual C++5 Professional, and VC++ 6 Learn Edition, and work properly.

    They have 2 independent Folders, DevStudio(5) and Microsoft Visual Studio(6), and they appear to work well.

    I have at home VC++ 5, but I can't BuildExecute Default Debug configuration of certains proyects at work bringed from home(win95-VC5), even there is problem when translating from 5 to 6. They seem to be cases with no relation between them.

  • Thanks

    Posted by Legacy on 06/01/1999 07:00am

    Originally posted by: Teena

    Thanks for the suggestion. It worked for me and also
    saved me a lot of time.

  • Don't forget the UNICODE DLL's!!

    Posted by Legacy on 11/11/1998 08:00am

    Originally posted by: Alexander Keck

    If you don't like surprises don't forget for the UNICODE stuff!

    The following files must be added if you use UNICODE MFC:



  • VC5 and VC6 together

    Posted by Legacy on 11/07/1998 08:00am

    Originally posted by: Hans Wedemeyer

    Your suggestion sounds ok, but I have one question..

    This works, because the debug versions on the dll should be removed from
    memory after VC6 or VC5 are shut down.

    Why not include the startup of VC5 and VC6 in each batch file, that way
    it should be even more transparent !

    Do you ever have to reboot becasue a dll did not get removed from
    memory ?

    Another Question:-

    Just how did you install VC5 and VC6 ?

    I have a directory Devstudio/VC ( Currently for VC5 )

    and how do you change the environment variables ?

    Hans Wedemeyer

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date