Distributing C Runtime for Visual C++ .NET
I'm trying to distribute a C++ program and some OCX controls compiled using Visual Studio .NET, but I'm having problems distributing the Microsoft runtime libraries (MSVCR71.dll, MFC71.dll and MSVCP71.dll).
I found the following Microsoft article that says these files should be copied to the program directory and *not* into the system directory:
Microsoft Knowledge Base Article - 326922
INFO: Redistribution of the Shared C Runtime Component in Visual C++ .NET
So, I have copied my program, my OCX controls and the Microsoft runtime libraries into the install directory selected by the user.
My problem is that when I register my OCX controls using RegDLL they complain that the runtime libraries can not be found in the system PATH.
Is there a way to set the working directory to the install directory before using RegDLL to load the OCX and call DllRegisterServer?
Many Thanks,
Marcus