Thread: Distributing MFC Applications

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    5

    Distributing MFC Applications

    How would I go about distributing MFC applications? I would like to make an installer with a package and deploy project in VS.Net. I tried, but I dont know what DLLs to include and where to have it put them.

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Include at least these DLLs.

    mfc
    msvcr

    Kuphryn

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    My VC++7-release-compiled MFC app attempts to load these DLLs:
    APPHELP.DLL
    MSJET41.DLL
    MSJET42.DLL
    MSJET43.DLL
    MSJET44.DLL
    MSJET45.DLL
    MSJET46.DLL
    MSJET47.DLL
    MSJET48.DLL
    MSJET49.DLL
    KERNEL32.DLL
    USER32.DLL
    MPR.DLL
    ADVAPI32.DLL
    COMCTL32.DLL
    GDI32.DLL
    GDIPLUS.DLL
    MFC70.DLL
    MSVCP70.DLL
    MSVCR70.DLL
    MSVCRT.DLL
    NTDLL.DLL
    OLE32.DLL
    OLEACC.DLL
    OLEAUT32.DLL
    RPCRT4.DLL
    SHELL32.DLL
    SHLWAPI.DLL
    ACTIVEDS.DLL
    ADSLDPC.DLL
    CABINET.DLL
    COMDLG32.DLL
    CRYPT32.DLL
    DBGHELP.DLL
    DNSAPI.DLL
    IMAGEHLP.DLL
    LZ32.DLL
    MLANG.DLL
    MSASN1.DLL
    MSI.DLL
    NETAPI32.DLL
    NETRAP.DLL
    NTDSAPI.DLL
    ODBC32.DLL
    OLEDLG.DLL
    SAMLIB.DLL
    SECUR32.DLL
    SETUPAPI.DLL
    SFC.DLL
    SFCFILES.DLL
    TAPI32.DLL
    URLMON.DLL
    USERENV.DLL
    VERSION.DLL
    W32TOPL.DLL
    WININET.DLL
    WINMM.DLL
    WINSPOOL.DRV
    WINTRUST.DLL
    WLDAP32.DLL
    WS2_32.DLL
    WS2HELP.DLL
    WSOCK32.DLL
    CLBCATQ.DLL
    DAO360.DLL
    EXPSRV.DLL
    FILEBXH.DLL
    MFC70DEU.DLL
    MSJET40.DLL
    MSJTES40.DLL
    MSWSTR10.DLL
    NVDESK32.DLL
    VBAJET32.DLL
    OLEACCRC.DLL

    I don't know which are actually used, but those are all that are linked, delay-load linked and attempted to load at runtime.
    I also don't know which are present in a windows installation and which you have to redistribute.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    You can select a compiler option to statically link the MFC classes. If you do so, your .exe becomes very much bigger of course, but you then do not need to distribute and .dll's.

    This is often a better ploy since your customer may have more up to date .dll's than you and when you put yours on, you overwrite his and break some of his applications.

    I don't use MFC, so can't, off the top of my head, remember where the switch is, but it is definitely there in version 6 at least.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    In 7 too.

    The MFC dlls have different names in different versions, so they, at least, can't be overwritten.

    As for other DLLs, that's what the version resource is for...
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. First MFC app - Not listed in Task Manager Applications
    By Dino in forum Windows Programming
    Replies: 3
    Last Post: 03-08-2008, 11:06 AM
  2. A question about windows programming
    By Hussain Hani in forum Windows Programming
    Replies: 16
    Last Post: 05-23-2007, 07:38 AM
  3. Preprocessor Directives in MFC Applications
    By Caldus in forum Windows Programming
    Replies: 1
    Last Post: 07-17-2006, 12:33 PM
  4. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  5. Beginning MFC (Prosise) Part III - Now What? :: C++
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 03-03-2002, 06:58 PM