none
Installation of MFC/CRT from web server?

    Question

  • ;INF file for MasterCtrl.OCX  
     
    [version]  
    ; version signature (same for both NT and Win95) do not remove  
    signature="$CHICAGO$" 
    AdvancedINF=2.0  
     
    [Add.Code]  
    MasterCtrl.ocx=MasterCtrl.ocx  
    Mfc42.dll=Mfc42.dll  
    msvcrt.dll=msvcrt.dll  
     
    [MasterCtrl.ocx]  
    file-win32-x86=thiscab 
    clsid={401B3153-B1A9-11D0-854D-00A024838FE2}  
    FileVersion=2008,4,1,0  
    RegisterServer=yes 
     
     
    ; dependent DLLs  
     
    [msvcrt.dll]  
    ; The hook only gets processed  
    ; if msvcrt.dll of the specified version is absent on client machine.  
    FileVersion=6,0,8168,0  
    hook=mfc42installer 
     
    [mfc42.dll]  
    FileVersion=6,0,8168,0  
    hook=mfc42installer 
     
    [mfc42installer]  
    file-win32-x86=http://activex.microsoft.com/controls/vc/mfc42.cab  
    run=%EXTRACT_DIR%\mfc42.exe  
     
     
     
    Hi,
     
    Our application consists of several ActiveX controls that run inside of IE and is hosted by an internal webserver. The initial website HTML page has code to load one ActiveX control and application code within that control attempts to download any updated controls. This is currently built in VS 6 and we are trying to migrate to VS 2005. My development platform is XP SP2 and I am using SP1 of VS 2005.

    Currenly, the application has an "inf" file for the main ActiveX control that lists the mfc42.dll and msvcrt.dll as dependencies and handles those by running the mfc42.exe installer found at the microsoft website.

    Is there a similar mechanism for the VC 8 and MFC 8 equivalents? The INF file looks like the attached. I can change the mfc42.dll and msvcrt.dll to the newer mfc80.dll and msvcr80.dll, but not sure if there is a HTTP link to get the installer for those available? I suppose, worst case, I could deploy the redist exe to our local webserver and reference that instead of a public one from Microsoft?

    Tips, hints, suggestions, all welcome.

    Thanks,
    Bill
    • Edited by Bill Beacom Friday, August 29, 2008 5:33 PM Code block was a bit wrong
    Friday, August 29, 2008 5:31 PM

Answers

  • Bill Beacom said:

    Tips, hints, suggestions, all welcome.

    Thanks,
    Bill

    My suggestion is very simple: Statically link. If you remove all dependencies entirely you don't even need an INF file. Just download the OCX file directly.

    Yes, the control becomes big, but that's because MFC is a poor choice as a framework for a downloadable ActiveX control in the first place. ATL is superior in this regard.
    • Proposed as answer by Neil Tippett Friday, August 29, 2008 10:29 PM
    • Marked as answer by Yan-Fei Wei Saturday, August 30, 2008 7:09 AM
    Friday, August 29, 2008 7:00 PM