none
can't register file - MFC40.dll

    Question

  • I have a custom application developed in VB6. When i try to install it in Windows 7 RC1 version, i am getting the error "An error occurred while registering the file C:\Windows\System32\MFC40.DLL" . MFC40.DLL is used in the previous versions including Vista to create profiles for multiple users in the computer.

    Please let me know what is causing the error and how can i fix it?
    Tuesday, September 01, 2009 3:14 PM

Answers

  • I am hearing the same thing about Windows 7 when my program's setup tries to register the following file:

    File16=1,,MFC40.DL_,MFC40.DLL,$(WinSysPath),$(DLLSelfRegister),$(Shared),4/23/1999,933888,4.1.0.6140


    A Microsoft Support page says,

    Both Microsoft Office 7.0 and Microsoft Office 97 install the following versions of the Mfc40.dll and Msvcrt40.dll files:
       Mfc40.dll       Size: 924,432 bytes   Version: 4.1.6139
       Msvcrt40.dll    Size: 326,656 bytes   Version: 4.10.6038
    Any idea why Microsoft is using a version that is one number less than what has been publicly available since 1999?

    There was no error reported for this line,

    File12=1,,msvcrt40.dl_,msvcrt40.dll,$(WinSysPath),,$(Shared),6/8/2000,344064,4.22.0.0

    Regards,

    John Halloran
    • Proposed as answer by John_Halloran Sunday, September 13, 2009 3:59 AM
    • Marked as answer by Andy Song Monday, September 28, 2009 4:15 AM
    Thursday, September 10, 2009 9:00 PM
  • I have more information on the Version 7 computer that is giving the error message.  "I am 64 bit so the mfc40.dll is in the SysWoW64 folder".  The error comes from the old VB setup trying to register the mfc40.dll in the system32 folder, whereas this is not the latest version of mfc40.dll on the 64-bit computer.  My friend recommends to switch to the .net msi for installation.

    Regards,

    John Halloran
    • Proposed as answer by John_Halloran Sunday, September 13, 2009 4:05 AM
    • Marked as answer by Andy Song Monday, September 28, 2009 4:15 AM
    Sunday, September 13, 2009 4:04 AM
  • Greetings John,

    This link might be helpful, http://support.microsoft.com/kb/160750

    Regards,
    Harish
    Monday, September 14, 2009 6:01 PM
    Moderator

All replies

  • Hello,

    might help this link? Explanation of Regsvr32 usage and error messages

    Regards.
    If it was helpful, please vote! ¡Si te ayudó, por favor vota!
    W7 RTM x64 running along with Office 2010 x64 TP
    Tuesday, September 01, 2009 5:25 PM
  • HI Markme99,

    Could you please try to register the file manually?

    Regsvr32 MFC40.dll

    According to Support Statement for Visual Basic 6.0 on Windows Vista, Windows Server 2008 and Windows 7, this dll file should be supported.

    In addtion, does the application can be installed in Compatibility Mode?

    Thanks.
    Thursday, September 03, 2009 3:21 AM
  • I tried registering it manually but i am getting the same error when i install the application again.

    Thanks.
    Thursday, September 03, 2009 9:25 AM
  • How did you register?
    Regsvr32 MFC40.dll as a command line?

    Suggestion:
    type "cmd" (without the quote marks) in the startmenu.
    The first result will be cmd.exe.
    Right click, and select Run as Administrator.
    Type Regsvr32 MFC40.dll
    type exit in order to close the command box

    This should work.
    Regards

    Rem
    Thursday, September 03, 2009 10:36 AM
  • I tried registering it manually but i am getting the same error when i install the application again.

    Thanks.

    Did you use an elevated command prompt?

    Regards
    If it was helpful, please vote! · · ¡Si te ayudó, por favor vota!
    W7 RTM x64 running along with Office 2010 x64 TP
    Thursday, September 03, 2009 1:17 PM
  •  

    I do not have any problems with manual registration. I register by directly entering Regsvr32 MFC40.dll in run. But even after manual registration the application is showing the same error message.

    Monday, September 07, 2009 9:26 AM
  • Hi Markme99,

    Can you run the program in Compatibilty Mode?

    Thanks.
    Tuesday, September 08, 2009 10:35 AM
  • I am hearing the same thing about Windows 7 when my program's setup tries to register the following file:

    File16=1,,MFC40.DL_,MFC40.DLL,$(WinSysPath),$(DLLSelfRegister),$(Shared),4/23/1999,933888,4.1.0.6140


    A Microsoft Support page says,

    Both Microsoft Office 7.0 and Microsoft Office 97 install the following versions of the Mfc40.dll and Msvcrt40.dll files:
       Mfc40.dll       Size: 924,432 bytes   Version: 4.1.6139
       Msvcrt40.dll    Size: 326,656 bytes   Version: 4.10.6038
    Any idea why Microsoft is using a version that is one number less than what has been publicly available since 1999?

    There was no error reported for this line,

    File12=1,,msvcrt40.dl_,msvcrt40.dll,$(WinSysPath),,$(Shared),6/8/2000,344064,4.22.0.0

    Regards,

    John Halloran
    • Proposed as answer by John_Halloran Sunday, September 13, 2009 3:59 AM
    • Marked as answer by Andy Song Monday, September 28, 2009 4:15 AM
    Thursday, September 10, 2009 9:00 PM
  • I have more information on the Version 7 computer that is giving the error message.  "I am 64 bit so the mfc40.dll is in the SysWoW64 folder".  The error comes from the old VB setup trying to register the mfc40.dll in the system32 folder, whereas this is not the latest version of mfc40.dll on the 64-bit computer.  My friend recommends to switch to the .net msi for installation.

    Regards,

    John Halloran
    • Proposed as answer by John_Halloran Sunday, September 13, 2009 4:05 AM
    • Marked as answer by Andy Song Monday, September 28, 2009 4:15 AM
    Sunday, September 13, 2009 4:04 AM
  • Greetings John,

    This link might be helpful, http://support.microsoft.com/kb/160750

    Regards,
    Harish
    Monday, September 14, 2009 6:01 PM
    Moderator
  • Could someone kindly indicate a procedure for Win 7 X64  operating system to install an older

    program that installs OK in windows XP machines but on my Win 7 X64 machine I get the message 

    "An error occurred while registering the file C:WindowsSystem32\MFC40.DLL."

    Can someone indicate procedure and a registry cleaner to use to clean up the registry.

    Thank you

    Sunday, March 06, 2011 3:41 AM