Results 1 to 7 of 7

Thread: Interop COM dll issue

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    Europe
    Posts
    289

    Interop COM dll issue

    Hi

    I am trying to use a COM dll referenced from a vb.net project. Everything works fine when I reference the interop inside the IDE but when I publish the file in bin folder on my server I get:

    Retrieving the COM class factory for component with CLSID {A440BD76-CFE1-4D46-AB1F-15F238437A3D} failed due to the following error: 80040154.

    Please note I can't register the original dll with regsvr as the server is with a hosting provider and I thought the point of interops was to be able to use old COM dlls without having to register them

    Com file is a MS file, not ours.

    Would be grateful for any hep as this is really blocking us.
    Last edited by MikeGarvin; Aug 25th, 2010 at 05:04 AM.

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Interop COM dll issue

    No, Interop DLLs are not intended to allow you to use COM components without registering them. If you want to use a COM component then it needs to be registered, plain and simple. The point of an Interop library is to provide a translation layer between your managed application and the unmanaged COM component so that you don't have to write the complicated interop code yourself every time. You talk .NET to the Interop library and it talks COM to the COM component. In order for the COM component to be usable, it still needs to be registered.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Interop COM dll issue

    I've had a similar error once when I deployed my application to a 64-bit computer. Maybe you need to change the targeting CPU from AnyCPU to x86. Without knowing anything about the COM object I can't really give you a better answer. But you *do* need to register the COM component.

  4. #4
    PowerPoster
    Join Date
    Mar 2002
    Location
    UK
    Posts
    4,780

    Re: Interop COM dll issue

    If your hosting server can run your apps, can you not just regsvr32 it yourself on app start. If they provide hosting for .net apps, you could ask them to register it for you.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Interop COM dll issue

    I don't know much about COM as I've never done any COM development. I am aware of the concept of registration-free COM though. A search turned up this, which could be of interest to you.

    http://msdn.microsoft.com/en-us/library/ms973913.aspx
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    Europe
    Posts
    289

    Re: Interop COM dll issue

    Hi

    The dll is capicom.dll.

    Thanks to all for your excellent help.

    Mike

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    Europe
    Posts
    289

    Re: Interop COM dll issue

    Hi

    The hosting cpy has just installed capicom but I still get the same error. Do u know if I have to build the interop from the actual same file as the one they used and if it has to be copied in the bin folder?

    Many thanks,

    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width