Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6612407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:05:42+00:00 2026-05-25T20:05:42+00:00

My classes are as follows [ComVisible(True)][GUID(…)] public interface IMyComInterface { void DoThis(string[] params); }

  • 0

My classes are as follows

[ComVisible(True)][GUID(...)]
public interface IMyComInterface
{
   void DoThis(string[] params);
}

[ClassInterface(ClassInterfaceType.None)]
[GUID(...)]
public class MyComImplementation: MyNetClass,IMyComInterface
{
   public void DoThis(string[] params)
   {
      var netParams=params.ToList();
      base.DoThis(netParams);
   }
}

This works.

Now I want to add a second ComClass that inherits MyNetBaseClass but uses a filter:

[ClassInterface(ClassInterface.Type.None)
[GUID(...)]
public class MySecondComImplementation:MyNetClass,IMyComInterface
{
   public void DoThis(string[] params)
   {
      var netParams=params.Where(param=>param.Contains("x"));
      base.DoThis(netParams.ToList());
   }
}

Does this work, or do I have to define a second MyComInterface with an identical DoThis method? Or in other words: must every class that implements a COM-Visible interface have its own, unique COM-visible interface?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:05:43+00:00Added an answer on May 25, 2026 at 8:05 pm

    The example you show, is perfectly legal.
    The 2 classes will each have their own GUID. By registering the assembly, the necessary entries will be written in the registry.

    In your VB application, you’ll be able to do this. (Sorry, there can be syntax errors in the code below, I don’t have enough VB6 knowledge:) ).

    Dim a As IMyComInterface
    Dim b As IMyComInterface
    
    Set a = New MyComImplementation()
    Set b = New MySecondComImplementation()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My classes are as follows public interface A { public void doSomething(); } public
I have two classes as follows: public class Info { [XmlAttribute] public string language;
I have classes as follows namespace Coverage { public class ClassInfo { public string
Main model classes are as follows : public class UserAddressesForm { @NotEmpty private String
My two classes are as follows public class Client { public Guid Id {
New to FluentNHibernate =D I have a parent/children classes as follows: public class Parent
I have two classes Address and Employee as follows: public class Address { public
Classes that implement IEnumerable and provide a public void Add(/* args */) function can
I have two classes A and B as follows: public class A { private
I have an interface as follows: public interface ITestCase<T> where T : HtmlControl {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.