none
System.Runtime.InteropServices.COMException (0x80040112)

    Question

  • Hi,

    I'm trying to Deploy an Application that I converted from VB6.0 to NET 2.0 using a Setup Project.

    When I tested in the developer PC it works well but when I installed in the Test PC I get this error.

    System.Runtime.InteropServices.COMException (0x80040112): Creating an instance of the COM component with CLSID {00000010-0000-0010-8000-00AA006D2EA4} from the IClassFactory failed due to the following error: 80040112.

    I think it is because of the DAO objects that I am using. I have a reference to the 'Microsoft DAO 2.5/3.51 Compatibility Library' in my project.

    My setup project added automatically this two dependencies:

    DAO2535.TBL

    Interop.DAO.dll

    I suppose I have to install the Library some how... not just this two dependencies. The question is how can I install the DAO functionality in the Test PC using my own Setup project and not installing the whole VB6.0

    or am I missing something else?

    Thanks for your help

    Thursday, March 22, 2007 4:29 PM

Answers

  • You need to install Microsoft Data Access Components (MDAC) which is available at the following link.

    http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&displaylang=en
    Monday, June 18, 2007 6:17 AM
  • I ran into the exact same issue. Worked fine on computers with Visual Studio installed, but not 'regular' computers. I tried everything I could to find what it was complaining about. Even Googling found others with the same issue, but no fixes that would work for DAO.

    I ended up rewriting the code to use ADO Classic instead of DAO. It's not too different.

    You may also want to check the Interop forum.

    Friday, December 14, 2007 2:45 PM

All replies

  • I have the same problem when i use the library DAO350.dll
    Tuesday, June 05, 2007 1:57 PM
  • You need to install Microsoft Data Access Components (MDAC) which is available at the following link.

    http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&displaylang=en
    Monday, June 18, 2007 6:17 AM
  • Hi,

      I am getting the similar error "Creating an instance of the COM component with CLSID {3B7C8860-D78F-101B-B9B5-04021C009402} from the IClassFactory failed due to the following error: 80040112." when i install and run an vb.net application using a VB 6.0 richtextlib component...


     Can you pl let me know if i am missing something


    Thanks
    Ravi
    Thursday, June 28, 2007 7:16 PM
  • I attempted downloading and installing the MDAC 2.8 software on my XP machine. I get a message that indicates that all the functionality is included in XP, so it will not continue w/ the install...and, yet, I'm getting this same error. Any suggestions?
    Monday, July 09, 2007 5:36 PM
  • By the way, I had the same problem.  In my case, a Twain OCX component which was part of my application was not getting properly registered upon installation.

     

    To fix this, I had to execute a regsvr32 ocxname.

    Friday, December 07, 2007 7:24 PM
  • I ran into the exact same issue. Worked fine on computers with Visual Studio installed, but not 'regular' computers. I tried everything I could to find what it was complaining about. Even Googling found others with the same issue, but no fixes that would work for DAO.

    I ended up rewriting the code to use ADO Classic instead of DAO. It's not too different.

    You may also want to check the Interop forum.

    Friday, December 14, 2007 2:45 PM
  • I'm getting the same exception but in a different situation. The COM call works for my user when called from the command line. When I wrap up the console application as a service (set to run as the same user id), I get the InteropServices error message about the IClassFactory failing with error: 80040112. The DLL I'm calling into is part of a network application that has to be run one the client once to work.

    Do services run under different account permissions?
    Tuesday, June 10, 2008 6:59 PM
  • I actually solved this. Right-click your solution name on the solution tree on the right of the IDE and select Properties. Click on the References tab on the left side of the window. Select your Microsoft DAO 3.6 object. In the Properties box at the lower right of the IDE, navigate to the CopyLocal option and set to true. After you reinstall on the clients, the DAO references should work fine. Worked for me!

    Tuesday, June 10, 2008 7:07 PM
  • Once installed, you can manage your services by right-clicking on My Computer > Manage > Services.  Double-click your service.

     

    Services can be run under any login; of course, the permissions of that login will determine if the service runs correctly or not.

     

    Ross

    Tuesday, June 10, 2008 7:07 PM
  • The same code runs fine as a windows command-line application for a particular user X. For the service, I set it to run as user X, but I get the Interop COM error:

    System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {F303B9E7-01F6-4075-B174-7D5F33BEEDE1} from the IClassFactory failed due to the following error: 80040112.

    The code is running as the same user, but failing as a service while succeeding when run from the command line.
    Tuesday, June 10, 2008 9:29 PM