Having issues adding new methods to C# .NET COM interop server

I created a C# .NET 6 COM interop DLL (registered by installer using REGSVR32) for a client of our application’s gRPC remoting interface that worked great in our previous releases of the product.

For our new software release, I need to add more methods to extend the interface. However, when I add the additional methods, it appears that the interface methods are getting mixed up, resulting in COM marshalling exceptions in gRPC. I’ve tried to debug the client COM object, but haven’t been successful getting it to debug it by attaching to the process.

Here is the original Interface definition:

    [ComVisible(true)]
    [Guid("9DAF4501-4AF6-43FF-95EF-C421CB43F1B8")]
    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    [System.Reflection.Obfuscation(Feature = "renaming", Exclude = true, ApplyToMembers = true)]
    public interface IWinCalClient5
    {
        [DispId(1501)]
        bool ViewerOpen();
        [DispId(1502)]
        bool ViewerMeasurement(bool IsCorrected, ref int[] PortList, string DataSetName, bool ReplaceExisting);
        [DispId(1503)]
        bool ViewerMeasurementStr(bool IsCorrected, string PortList, string DataSetName, bool ReplaceExisting);
        [DispId(1504)]
        bool ViewerMeasureAllPortsRaw(string DataSetName);
        [DispId(1505)]
        bool ViewerMeasureCorrected(string DataSetName);
        [DispId(1506)]
        bool ViewerLoadReport(string FullFileName);
        [DispId(1507)]
        bool ViewerListNames(out string[] DataItemNames);
        [DispId(1508)]
        bool ViewerGetDataItem(string DataItemName);
        [DispId(1509)]
        bool ViewerClose();
        [DispId(1510)]
        bool ViewerSave();
        [DispId(1511)]
        bool ViewerSaveAs(string NewReportName);
        [DispId(1512)]
        bool ViewerLoadData(string NewDataName);
        [DispId(1513)]
        bool ViewerSaveData(string FileName, bool Overwrite, int ComplexFormat);
        [DispId(1514)]
        bool ViewerGetStringDataItemValue(string DataItemName, out string Value);
        [DispId(1515)]
        bool ViewerGetIntDataItemValue(string DataItemName, out int Value);
        [DispId(1516)]
        bool ViewerGetBoolDataItemValue(string DataItemName, out bool Value);
        [DispId(1517)]
        bool ViewerGetRealDataItemValue(string DataItemName, out double Value);
        [DispId(1518)]
        bool ViewerSetStringDataItemValue(string DataItemName, string Value);
        [DispId(1519)]
        bool ViewerSetIntDataItemValue(string DataItemName, int Value);
        [DispId(1520)]
        bool ViewerSetBoolDataItemValue(string DataItemName, bool Value);
        [DispId(1521)]
        bool ViewerSetRealDataItemValue(string DataItemName, double Value);
        [DispId(1522)]
        bool ViewerGetComplexDataItemValue(string DataItemName, out double RealValue, out double ImaginaryValue);
        [DispId(1523)]
        bool ViewerSetComplexDataItemValue(string DataItemName, double RealValue, double ImaginaryValue);
    }

Here is the NEW Interface definition with the 3 new methods:

    [ComVisible(true)]
    [Guid("9DAF4501-4AF6-43FF-95EF-C421CB43F1B8")]
    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    [System.Reflection.Obfuscation(Feature = "renaming", Exclude = true, ApplyToMembers = true)]
    public interface IWinCalClient5
    {
        [DispId(1501)]
        bool ViewerOpen();
        [DispId(1502)]
        bool ViewerMeasurement(bool IsCorrected, ref int[] PortList, string DataSetName, bool ReplaceExisting);
        [DispId(1503)]
        bool ViewerMeasurementStr(bool IsCorrected, string PortList, string DataSetName, bool ReplaceExisting);
        [DispId(1504)]
        bool ViewerMeasureAllPortsRaw(string DataSetName);
        [DispId(1505)]
        bool ViewerMeasureCorrected(string DataSetName);
        [DispId(1506)]
        bool ViewerLoadReport(string FullFileName);
        [DispId(1507)]
        bool ViewerListNames(out string[] DataItemNames);
        [DispId(1508)]
        bool ViewerGetDataItem(string DataItemName);
        [DispId(1509)]
        bool ViewerClose();
        [DispId(1510)]
        bool ViewerSave();
        [DispId(1511)]
        bool ViewerSaveAs(string NewReportName);
        [DispId(1512)]
        bool ViewerLoadData(string NewDataName);
        [DispId(1513)]
        bool ViewerSaveData(string FileName, bool Overwrite, int ComplexFormat);
        [DispId(1514)]
        bool ViewerGetStringDataItemValue(string DataItemName, out string Value);
        [DispId(1515)]
        bool ViewerGetIntDataItemValue(string DataItemName, out int Value);
        [DispId(1516)]
        bool ViewerGetBoolDataItemValue(string DataItemName, out bool Value);
        [DispId(1517)]
        bool ViewerGetRealDataItemValue(string DataItemName, out double Value);
        [DispId(1518)]
        bool ViewerSetStringDataItemValue(string DataItemName, string Value);
        [DispId(1519)]
        bool ViewerSetIntDataItemValue(string DataItemName, int Value);
        [DispId(1520)]
        bool ViewerSetBoolDataItemValue(string DataItemName, bool Value);
        [DispId(1521)]
        bool ViewerSetRealDataItemValue(string DataItemName, double Value);
        [DispId(1522)]
        bool ViewerGetComplexDataItemValue(string DataItemName, out double RealValue, out double ImaginaryValue);
        [DispId(1523)]
        bool ViewerSetComplexDataItemValue(string DataItemName, double RealValue, double ImaginaryValue);
        [DispId(1524)]
        bool ViewerSetOnDemandPostProcessing(bool OnDemandPostProcessing);
        [DispId(1525)]
        bool ViewerGetOnDemandPostProcessing(out bool IsEnabled);
        [DispId(1526)]
        bool ViewerPerformPostProcessing();
}

I’m fairly certain that the issue is in the client .NET COM server because I noticed the issues, so backed out ONLY the COM interface additions and the client-server functionality worked fine.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật