Developing Windows Applications by Mykola Dudar

Helping Developers Build Applications for Windows using Visual Studio.

Applocal deployment of MFC localized resource DLLs

Applocal deployment of MFC localized resource DLLs

  • Comments 3

It was pointed out to me that it is not clear from Docs how to redistribute MFC localized DLLs with MFC application in application local folder. Again while doc team is updating docs, I have put together a quick sample.

 

If you have MFC application MyApplication.exe and you are going to redistribute VC++ libraries in application local folder per described in MSDN example, you may already now that you need to copy Microsoft.VC80.CRT and Microsoft.VC80.MFC folder from %VCINSTALLDIR%\redist\ into application local folder. On a target computer folder structure looks similar to the following:

 

\bin\

            myApplication.exe

            \Microsoft.VC80.CRT

\Microsoft.VC80.MFC

 

Now if you need to use MFC localized DLLs, you need to copy Microsoft.VC80.MFCLOC from %VCINSTALLDIR%\redist\ as a sub-folder of \Microsoft.VC80.MFC. In other words, new folder structure of your application on the target computer looks like,

 

\bin\

            myApplication.exe

            \Microsoft.VC80.CRT

\Microsoft.VC80.MFC

            \Microsoft.VC80.MFCLOC

 

In this way MFC localized strings are going to load just fine at runtime. 

Note:

Unfortunately, due to a bug in VS2005 (late regression that was identify to late to be fixed for RTM), you need to change version number in \ Microsoft.VC80.MFCLOC\Microsoft.VC80.MFCLOC.manifest from version="8.0.50727.42" to version= "8.0.50608.0". Otherwise OS loader refuses to load MFCLOC dlls. If you use MSMs or vcredist to redistribute MFCLOC assemblies, no action is need.

 

  • Hi,

    are you sure this works on Win2k, too (W2K, you still remember, do you?)

    :-)

    regards

    HoM

  • Hi,

    No, it does not work on Win2k. Overall redistribution of VC++ libraries in application's local folder for Win2k is not supported scenario, http://msdn2.microsoft.com/en-us/library/ms235316(VS.80).aspx.

    Thanks,

    Nikola

  • Hi,

    Hmmm, I work with a VC++ express / VC# express combo project (the main exe file is generated using VC# express) and i ran into problems when I tried this solution.

    With using the Microsoft.VC80.CRT directory in the application directory to store the dll's the program fails to initialize the dll's generated through VC++ express when run on a client without without VC++ SP1 (or the redistributable). But if I stick the dll's from the Microsoft.VC80.CRT directory and manifest in the application directory itself without the sub folder everything works like a charm.

    The project doesn't use the MFC dll's.

    Any ideas why this might be the case?

Page 1 of 1 (3 items)