Registering a DLL Using a WiX Installer RRS feed

  • Question

  • I am currently trying to get a COM Application I built using Visual Studio 2015 C# language. I wish to get the application to be used in Excel VBA. Currently, my installer of choice is WiX, my C# code has classes and interfaces and upon building the program, I get the .tlb file which when I reference from Excel VBA, it works on the host computer while the .tlb lies in the debug directory of my project. 

    When I install it to a different computer, and reference the .tlb file, I keep getting this error "Run time error '429': Active X component cannot create object".

    I have extensively read articles on how to register the COM library file. When I use Regasm.exe, the file gets registered successfully. however I still get the same error. When I try using regsvr32.exe I get the error "The Module "___.dll" was loaded but the entry-point DLLRegisterServer was not found.

    A quick snippet of my code looks like this below

    namespace ECOM


        [ComVisible(true), Guid("21573AA5-CF49-44D0-8B95-17Z9466CF812")]



         public class EAPI: Iapi


    public EAPI()


                  private string name;

      public string Name


    get{ return name;}

    set{ name = value;}



        [ComVisible(true), Guid("A158C9F25-1DBD-4D2B-B8B7-0B87CB11EBD8")]


        public interface Iapi


    string  Name {get; set; }



    The WiX installer creates an MSI, which I believe registers my components, however when I search for the GUID in the regedit, I can't find them by that, they're registered under different GUIDs. I can add the .tlb file after installation, it's already listed in my references guide after running the Regasm.exe command. I can see the objects in my object browser. My VBA code looks like this below

    Sub Expose ECOMObjects()

             Dim eapi As ECOM.EAPI

              Set eapi = new ECOM.EAPI()

    End Sub

    When my code reaches the Set eapi part. I get the error about it not being a set object. However, on my host machine, it all works fine. 

    Assistance will be greatly appreciated.


    • Moved by CoolDadTx Thursday, June 1, 2017 6:27 PM Third party product
    Thursday, June 1, 2017 4:09 PM

All replies