VB6 and C# interface inheritance

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Roy Pereira

    VB6 and C# interface inheritance

    I have an application that is composed of a set
    of "Content" dlls and a viewer application. The viewer
    calls a standard set of functions that are present in all
    the dlls. I maintain this by making my contnent dlls
    implement an interface created in vb6. The viewer
    application is bound to this interface. This way, I am
    able to add Content without redeploying the dlls (I just
    have to add the new dlls). I want to write new content
    for this application in C#, but I don't want to rewrite
    the existing content dlls. I have two questions:
    1. Can I inherit and implement the same vb6 interface
    from C#? How?
    2. If I write a new interface in C#, is there anyway for
    v6 developers to inherit from this interface? How?
    Thanks for any help....
  • SR

    #2
    VB6 and C# interface inheritance

    Hi
    1. Can I inherit and implement the same vb6 interface
    from C#? How?
    You can do that without any problems. You just need to
    use COM Interop and import the interface in your .Net
    project(If you are using VS.Net then Add Reference->COM
    Tab-> Select the COM Library). This will create .Net
    wrappers for the COM Components. Then you can use them
    just as you would use .Net interfaces


    2. If I write a new interface in C#, is there anyway for
    v6 developers to inherit from this interface? How?
    This again is no problem coz of InterOp. You can use the
    tlbexp command line tool to export your .Net assemblies to
    Com as COM Wrappers. This is the reverse of 1. mentioned
    above. Once you use the export you wil get COM DLLs
    (wrappers to be precise and you can reference them in your
    VB6 projects)

    hth

    regards,

    sr
    Thanks for any help....


    regards,

    sr

    [color=blue]
    >-----Original Message-----
    >I have an application that is composed of a set
    >of "Content" dlls and a viewer application. The viewer
    >calls a standard set of functions that are present in all
    >the dlls. I maintain this by making my contnent dlls
    >implement an interface created in vb6. The viewer
    >application is bound to this interface. This way, I am
    >able to add Content without redeploying the dlls (I just
    >have to add the new dlls). I want to write new content
    >for this application in C#, but I don't want to rewrite
    >the existing content dlls. I have two questions:
    >1. Can I inherit and implement the same vb6 interface
    >from C#? How?
    >2. If I write a new interface in C#, is there anyway for
    >v6 developers to inherit from this interface? How?
    >Thanks for any help....
    >.
    >[/color]

    Comment

    • Roy Pereira

      #3
      VB6 and C# interface inheritance

      [color=blue]
      >-----Original Message-----
      >I have an application that is composed of a set
      >of "Content" dlls and a viewer application. The viewer
      >calls a standard set of functions that are present in all
      >the dlls. I maintain this by making my contnent dlls
      >implement an interface created in vb6. The viewer
      >application is bound to this interface. This way, I am
      >able to add Content without redeploying the dlls (I just
      >have to add the new dlls). I want to write new content
      >for this application in C#, but I don't want to rewrite
      >the existing content dlls. I have two questions:
      >1. Can I inherit and implement the same vb6 interface
      >from C#? How?
      >2. If I write a new interface in C#, is there anyway for
      >v6 developers to inherit from this interface? How?
      >Thanks for any help....
      >.
      >[/color]
      Thanks,
      I managed to create a .net interface and it is exposed
      through COM. However, I have run into another issue. I
      have created a .net class that implements the interface,
      and I want to expose this class to COM. However, I can't
      declare the implemented interface methods as public. How
      can I expose the methods in my class so they can be called
      from a COM client? The docs I have read say that the
      public keyword cannot be used for interfaces even in the
      implementation. They also say that for COM to create the
      CCW, only public methods are exposed. Please advise.
      Thanks.

      Comment

      • Peter Huang [MSFT]

        #4
        RE: VB6 and C# interface inheritance

        Hi Roy,

        1. Did you mean that you declare a interface in .NET and implement it in
        NET and then exposed it to COM?
        using System;
        using System.Runtime. InteropServices ;
        namespace ComTest
        {
        public interface IGMD
        {
        string Draw(string strcfgxml);
        }
        public class TestEquip:IGMD
        {
        public string Draw(string strcfgxml)
        {
        string blah = "Hello";
        return blah;
        }
        }
        }
        If I compile the code listed above, and regasm it, I can access it from a
        VB client or a .NET client.
        Regasm ComTest.dll /tlb:ComTest.tlb

        [VB Client][Make a reference to the ComTest.tlb
        Private Sub Command1_Click( )
        Dim o As ComTest.IGMD
        Set o = New ComTest.TestEqu ip
        MsgBox o.Draw("")
        End Sub

        Here is a link about exposed exposing .NET Framework Components to COM.

        l/cpconexposingne tframeworkcompo nentstocom.asp


        2.The code you mention in your code.
        public class TestEquip:IGMD
        {
        string IIApp.IGMD.Draw (string xmlcfg)
        {
        string blah = "Hello";
        return blah;
        }
        }

        It is "Explicit Interface Member Implementation" , which can not have a
        public or private access modifier. Here is a link about "Explicit Interface
        Member Implementation"

        /vclrfcsharpspec _13_4_1.asp


        3.
        [ClassInterfaceA ttributClassInt erfaceType.Auto Dual),ComVisibl eAttribute(true
        )]
        Yes, usually ComVisibleAttri bute is not needed. From your last post you can
        not access the method of the interface, so I hope you can declare it
        explicitly to narrow down the issue more quickly.

        Please feel free to let me know if you have further question related.

        Regards,
        Peter Huang
        Microsoft Online Partner Support
        Get Secure! www.microsoft.com/security

        --------------------[color=blue]
        >Content-Class: urn:content-classes:message
        >From: "Roy Pereira" <roy.pereira@si emens.com>
        >Sender: "Roy Pereira" <roy.pereira@si emens.com>
        >References: <01c201c365aa$c 4f40d00$a301280 a@phx.gbl>[/color]
        <0d7e01c3664f$0 cb3def0$a301280 a@phx.gbl>
        <ll6fVgyZDHA.21 16@cpmsftngxa06 .phx.gbl>[color=blue]
        >Subject: RE: VB6 and C# interface inheritance
        >Date: Wed, 20 Aug 2003 07:53:07 -0700
        >Lines: 174
        >Message-ID: <0e1201c3672a$c 489abf0$a501280 a@phx.gbl>
        >MIME-Version: 1.0
        >Content-Type: text/plain;
        > charset="iso-8859-1"
        >Content-Transfer-Encoding: 7bit
        >X-Newsreader: Microsoft CDO for Windows 2000
        >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
        >Thread-Index: AcNnKsSHMOKlTTx rSTOGFC88GFDkHg ==
        >Newsgroups: microsoft.publi c.dotnet.genera l
        >Path: cpmsftngxa06.ph x.gbl
        >Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.genera l:105183
        >NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
        >X-Tomcat-NG: microsoft.publi c.dotnet.genera l
        >
        >Thanks...
        > But my problem is a little different. I have the
        >following interface I created in .NET and also registered
        >for use in COM.
        >public interface IGMD
        > {
        > string Draw(string strcfgxml);
        > }
        >This function draw is inherited by either a VB6 client or
        >another C# client in the form of a dll. .NET client
        >example:
        >[ClassInterface( ClassInterfaceT ype.AutoDual)]
        >public class TestEquip:IGMD
        >{
        > string IIApp.IGMD.Draw (string xmlcfg)
        > {
        > string blah = "Hello";
        > return blah;
        > }
        >}
        >This dll is the one I want to expose to COM as well.
        >However, I cannot use the public keyword for this function
        >as I get the following error:-Compiler Error CS0106.
        >I did a little more research into this, and found that I
        >can create a redundant function with the same method
        >signature and expose that one as public (interface
        >mapping). e.g.
        >public string Draw(string xmlcfg)
        > {
        > string blah = "Hello Again";
        > return blah;
        > }
        >When I compile this and register it, I am able to call
        >this function and it returns "Hello", not "Hello again"
        >which means the interface method, not the public method is
        >called. This solution is acceptable, but is it good
        >design? Do I need to interface map all the funtions I am
        >doing interface inheritance on? Please advise...Thanks .
        >Also, what does the
        >[ClassInterfaceA ttributClassInt erfaceType.Auto Dual),ComVisi
        >bleAttribute(t rue)]
        >do as opposed to just using
        >[ClassInterfaceA ttributClassInt erfaceType.Auto Dual)]?
        >[color=green]
        >>-----Original Message-----
        >>Hi Roy,
        >>
        >>You may try the Interop Attributes :[/color]
        >ClassInterface Attribute and[color=green]
        >>ComVisibleAtt ribute .
        >>Here is my code.
        >>using System;
        >>using System.Runtime. InteropServices ;
        >>namespace ClassLibrary2
        >>{
        >>
        >>[ClassInterfaceA ttribute[/color]
        >(ClassInterfac eType.AutoDual) ,ComVisibleAttr ibute(tr[color=green]
        >>ue)]
        >> public class CCLookup : TestComInt.ILoo kup
        >> {
        >> public CCLookup()
        >> {
        >> ;
        >> }
        >> public object GetByEmail(stri ng strEmail)
        >> {
        >> return "email";
        >> }
        >> public object GetByID(int lngID)
        >> {
        >> return "id";
        >> }
        >> }
        >>}
        >>
        >>Then you can use the tool regasm to exports the tlb file.
        >>regasm ClassLibrary2.d ll /tlb:ClassLibrar y2.tlb
        >>
        >>Now you can use the ClassLibrary2.d ll as a common COM[/color]
        >object when you make[color=green]
        >>reference to the ClassLibrary2.t lb.
        >>[NOTE: you may need to copy the ClassLibrary2.d ll and
        >>Interop.TestC omInt.dll to same directory as the your[/color]
        >client exe lies.][color=green]
        >>[TestComInt.dll is a COM whose interface was implemented[/color]
        >by you in[color=green]
        >>ClassLibrary2 .dll]
        >>
        >>
        >>Please have a try and let me know if this does the job[/color]
        >for you.[color=green]
        >>
        >>
        >>Regards,
        >>Peter Huang
        >>Microsoft Online Partner Support
        >>Get Secure! www.microsoft.com/security
        >>This posting is provided "as is" with no warranties and[/color]
        >confers no rights.[color=green]
        >>
        >>--------------------[color=darkred]
        >>>Content-Class: urn:content-classes:message
        >>>From: "Roy Pereira" <roy.pereira@si emens.com>
        >>>Sender: "Roy Pereira" <roy.pereira@si emens.com>
        >>>References : <01c201c365aa$c 4f40d00$a301280 a@phx.gbl>
        >>>Subject: VB6 and C# interface inheritance
        >>>Date: Tue, 19 Aug 2003 05:40:19 -0700
        >>>Lines: 31
        >>>Message-ID: <0d7e01c3664f$0 cb3def0$a301280 a@phx.gbl>
        >>>MIME-Version: 1.0
        >>>Content-Type: text/plain;
        >>> charset="iso-8859-1"
        >>>Content-Transfer-Encoding: 7bit
        >>>X-Newsreader: Microsoft CDO for Windows 2000
        >>>Thread-Index: AcNmTwyz+iIFLEc RTcaO+CtymcMS/A==
        >>>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
        >>>Newsgroups : microsoft.publi c.dotnet.genera l
        >>>Path: cpmsftngxa06.ph x.gbl
        >>>Xref: cpmsftngxa06.ph x.gbl[/color][/color]
        >microsoft.publ ic.dotnet.gener al:104996[color=green][color=darkred]
        >>>NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
        >>>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
        >>>
        >>>
        >>>>-----Original Message-----
        >>>>I have an application that is composed of a set
        >>>>of "Content" dlls and a viewer application. The viewer
        >>>>calls a standard set of functions that are present in[/color][/color]
        >all[color=green][color=darkred]
        >>>>the dlls. I maintain this by making my contnent dlls
        >>>>implement an interface created in vb6. The viewer
        >>>>applicati on is bound to this interface. This way, I am
        >>>>able to add Content without redeploying the dlls (I[/color][/color]
        >just[color=green][color=darkred]
        >>>>have to add the new dlls). I want to write new content
        >>>>for this application in C#, but I don't want to rewrite
        >>>>the existing content dlls. I have two questions:
        >>>>1. Can I inherit and implement the same vb6 interface
        >>>>from C#? How?
        >>>>2. If I write a new interface in C#, is there anyway[/color][/color]
        >for[color=green][color=darkred]
        >>>>v6 developers to inherit from this interface? How?
        >>>>Thanks for any help....
        >>>>.
        >>>>
        >>>Thanks,
        >>> I managed to create a .net interface and it is exposed
        >>>through COM. However, I have run into another issue. I
        >>>have created a .net class that implements the interface,
        >>>and I want to expose this class to COM. However, I[/color][/color]
        >can't[color=green][color=darkred]
        >>>declare the implemented interface methods as public.[/color][/color]
        >How[color=green][color=darkred]
        >>>can I expose the methods in my class so they can be[/color][/color]
        >called[color=green][color=darkred]
        >>>from a COM client? The docs I have read say that the
        >>>public keyword cannot be used for interfaces even in the
        >>>implementati on. They also say that for COM to create[/color][/color]
        >the[color=green][color=darkred]
        >>>CCW, only public methods are exposed. Please advise.
        >>>Thanks.
        >>>[/color]
        >>
        >>
        >>Regards,
        >>Peter Huang
        >>Microsoft Online Partner Support
        >>Get Secure! www.microsoft.com/security
        >>This posting is provided "as is" with no warranties and[/color]
        >confers no rights.[color=green]
        >>
        >>.
        >>[/color]
        >[/color]


        Regards,
        Peter Huang
        Microsoft Online Partner Support
        Get Secure! www.microsoft.com/security
        This posting is provided "as is" with no warranties and confers no rights.

        Comment

        • Roy Pereira

          #5
          RE: VB6 and C# interface inheritance

          Thank you!! The key was I was not grasping the difference
          between Explicit Interface inheritance and implicit
          interface inheritance. I come from a vb6 background and
          was assuming that explicit was the only way to go. Thanks
          again...[color=blue]
          >-----Original Message-----
          >Hi Roy,
          >
          >1. Did you mean that you declare a interface in .NET and[/color]
          implement it in[color=blue]
          >.NET and then exposed it to COM?
          >using System;
          >using System.Runtime. InteropServices ;
          >namespace ComTest
          >{
          > public interface IGMD
          > {
          > string Draw(string strcfgxml);
          > }
          > public class TestEquip:IGMD
          > {
          > public string Draw(string strcfgxml)
          > {
          > string blah = "Hello";
          > return blah;
          > }
          > }
          >}
          >If I compile the code listed above, and regasm it, I can[/color]
          access it from a[color=blue]
          >VB client or a .NET client.
          >Regasm ComTest.dll /tlb:ComTest.tlb
          >
          >[VB Client][Make a reference to the ComTest.tlb
          >Private Sub Command1_Click( )
          >Dim o As ComTest.IGMD
          >Set o = New ComTest.TestEqu ip
          >MsgBox o.Draw("")
          >End Sub
          >
          >Here is a link about exposed exposing .NET Framework[/color]
          Components to COM.[color=blue]
          >http://msdn.microsoft.com/library/default.asp?[/color]
          url=/library/en-us/cpguide/htm[color=blue]
          >l/cpconexposingne tframeworkcompo nentstocom.asp
          >
          >
          >2.The code you mention in your code.
          >public class TestEquip:IGMD
          >{
          > string IIApp.IGMD.Draw (string xmlcfg)
          > {
          > string blah = "Hello";
          > return blah;
          > }
          >}
          >
          >It is "Explicit Interface Member Implementation" , which[/color]
          can not have a[color=blue]
          >public or private access modifier. Here is a link[/color]
          about "Explicit Interface[color=blue]
          >Member Implementation"
          >http://msdn.microsoft.com/library/default.asp?[/color]
          url=/library/en-us/csspec/html[color=blue]
          >/vclrfcsharpspec _13_4_1.asp
          >
          >
          >3.
          >[/color]
          [ClassInterfaceA ttributClassInt erfaceType.Auto Dual),ComVisi
          bleAttribute(tr ue[color=blue]
          >)]
          >Yes, usually ComVisibleAttri bute is not needed. From your[/color]
          last post you can[color=blue]
          >not access the method of the interface, so I hope you[/color]
          can declare it[color=blue]
          >explicitly to narrow down the issue more quickly.
          >
          >Please feel free to let me know if you have further[/color]
          question related.[color=blue]
          >
          >Regards,
          >Peter Huang
          >Microsoft Online Partner Support
          >Get Secure! www.microsoft.com/security
          >
          >--------------------[color=green]
          >>Content-Class: urn:content-classes:message
          >>From: "Roy Pereira" <roy.pereira@si emens.com>
          >>Sender: "Roy Pereira" <roy.pereira@si emens.com>
          >>References: <01c201c365aa$c 4f40d00$a301280 a@phx.gbl>[/color]
          ><0d7e01c3664f$ 0cb3def0$a30128 0a@phx.gbl>
          ><ll6fVgyZDHA.2 116@cpmsftngxa0 6.phx.gbl>[color=green]
          >>Subject: RE: VB6 and C# interface inheritance
          >>Date: Wed, 20 Aug 2003 07:53:07 -0700
          >>Lines: 174
          >>Message-ID: <0e1201c3672a$c 489abf0$a501280 a@phx.gbl>
          >>MIME-Version: 1.0
          >>Content-Type: text/plain;
          >> charset="iso-8859-1"
          >>Content-Transfer-Encoding: 7bit
          >>X-Newsreader: Microsoft CDO for Windows 2000
          >>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
          >>Thread-Index: AcNnKsSHMOKlTTx rSTOGFC88GFDkHg ==
          >>Newsgroups: microsoft.publi c.dotnet.genera l
          >>Path: cpmsftngxa06.ph x.gbl
          >>Xref: cpmsftngxa06.ph x.gbl[/color][/color]
          microsoft.publi c.dotnet.genera l:105183[color=blue][color=green]
          >>NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
          >>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
          >>
          >>Thanks...
          >> But my problem is a little different. I have the
          >>following interface I created in .NET and also[/color][/color]
          registered[color=blue][color=green]
          >>for use in COM.
          >>public interface IGMD
          >> {
          >> string Draw(string strcfgxml);
          >> }
          >>This function draw is inherited by either a VB6 client[/color][/color]
          or[color=blue][color=green]
          >>another C# client in the form of a dll. .NET client
          >>example:
          >>[ClassInterface( ClassInterfaceT ype.AutoDual)]
          >>public class TestEquip:IGMD
          >>{
          >> string IIApp.IGMD.Draw (string xmlcfg)
          >> {
          >> string blah = "Hello";
          >> return blah;
          >> }
          >>}
          >>This dll is the one I want to expose to COM as well.
          >>However, I cannot use the public keyword for this[/color][/color]
          function[color=blue][color=green]
          >>as I get the following error:-Compiler Error CS0106.
          >>I did a little more research into this, and found that I
          >>can create a redundant function with the same method
          >>signature and expose that one as public (interface
          >>mapping). e.g.
          >>public string Draw(string xmlcfg)
          >> {
          >> string blah = "Hello Again";
          >> return blah;
          >> }
          >>When I compile this and register it, I am able to call
          >>this function and it returns "Hello", not "Hello again"
          >>which means the interface method, not the public method[/color][/color]
          is[color=blue][color=green]
          >>called. This solution is acceptable, but is it good
          >>design? Do I need to interface map all the funtions I[/color][/color]
          am[color=blue][color=green]
          >>doing interface inheritance on? Please advise...Thanks .
          >>Also, what does the
          >>[/color][/color]
          [ClassInterfaceA ttributClassInt erfaceType.Auto Dual),ComVisi[color=blue][color=green]
          >>bleAttribute( true)]
          >>do as opposed to just using
          >>[ClassInterfaceA ttributClassInt erfaceType.Auto Dual)]?
          >>[color=darkred]
          >>>-----Original Message-----
          >>>Hi Roy,
          >>>
          >>>You may try the Interop Attributes :[/color]
          >>ClassInterfac eAttribute and[color=darkred]
          >>>ComVisibleAt tribute .
          >>>Here is my code.
          >>>using System;
          >>>using System.Runtime. InteropServices ;
          >>>namespace ClassLibrary2
          >>>{
          >>>
          >>>[ClassInterfaceA ttribute[/color]
          >>(ClassInterfa ceType.AutoDual ),ComVisibleAtt ribute(tr[color=darkred]
          >>>ue)]
          >>> public class CCLookup : TestComInt.ILoo kup
          >>> {
          >>> public CCLookup()
          >>> {
          >>> ;
          >>> }
          >>> public object GetByEmail(stri ng strEmail)
          >>> {
          >>> return "email";
          >>> }
          >>> public object GetByID(int lngID)
          >>> {
          >>> return "id";
          >>> }
          >>> }
          >>>}
          >>>
          >>>Then you can use the tool regasm to exports the tlb[/color][/color][/color]
          file.[color=blue][color=green][color=darkred]
          >>>regasm ClassLibrary2.d ll /tlb:ClassLibrar y2.tlb
          >>>
          >>>Now you can use the ClassLibrary2.d ll as a common COM[/color]
          >>object when you make[color=darkred]
          >>>reference to the ClassLibrary2.t lb.
          >>>[NOTE: you may need to copy the ClassLibrary2.d ll and
          >>>Interop.Test ComInt.dll to same directory as the your[/color]
          >>client exe lies.][color=darkred]
          >>>[TestComInt.dll is a COM whose interface was[/color][/color][/color]
          implemented[color=blue][color=green]
          >>by you in[color=darkred]
          >>>ClassLibrary 2.dll]
          >>>
          >>>
          >>>Please have a try and let me know if this does the job[/color]
          >>for you.[color=darkred]
          >>>
          >>>
          >>>Regards,
          >>>Peter Huang
          >>>Microsoft Online Partner Support
          >>>Get Secure! www.microsoft.com/security
          >>>This posting is provided "as is" with no warranties and[/color]
          >>confers no rights.[color=darkred]
          >>>
          >>>--------------------
          >>>>Content-Class: urn:content-classes:message
          >>>>From: "Roy Pereira" <roy.pereira@si emens.com>
          >>>>Sender: "Roy Pereira" <roy.pereira@si emens.com>
          >>>>Reference s: <01c201c365aa$c 4f40d00$a301280 a@phx.gbl>
          >>>>Subject: VB6 and C# interface inheritance
          >>>>Date: Tue, 19 Aug 2003 05:40:19 -0700
          >>>>Lines: 31
          >>>>Message-ID: <0d7e01c3664f$0 cb3def0$a301280 a@phx.gbl>
          >>>>MIME-Version: 1.0
          >>>>Content-Type: text/plain;
          >>>> charset="iso-8859-1"
          >>>>Content-Transfer-Encoding: 7bit
          >>>>X-Newsreader: Microsoft CDO for Windows 2000
          >>>>Thread-Index: AcNmTwyz+iIFLEc RTcaO+CtymcMS/A==
          >>>>X-MimeOLE: Produced By Microsoft MimeOLE[/color][/color][/color]
          V5.50.4910.0300[color=blue][color=green][color=darkred]
          >>>>Newsgroup s: microsoft.publi c.dotnet.genera l
          >>>>Path: cpmsftngxa06.ph x.gbl
          >>>>Xref: cpmsftngxa06.ph x.gbl[/color]
          >>microsoft.pub lic.dotnet.gene ral:104996[color=darkred]
          >>>>NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
          >>>>X-Tomcat-NG: microsoft.publi c.dotnet.genera l
          >>>>
          >>>>
          >>>>>-----Original Message-----
          >>>>>I have an application that is composed of a set
          >>>>>of "Content" dlls and a viewer application. The[/color][/color][/color]
          viewer[color=blue][color=green][color=darkred]
          >>>>>calls a standard set of functions that are present in[/color]
          >>all[color=darkred]
          >>>>>the dlls. I maintain this by making my contnent dlls
          >>>>>implemen t an interface created in vb6. The viewer
          >>>>>applicatio n is bound to this interface. This way, I[/color][/color][/color]
          am[color=blue][color=green][color=darkred]
          >>>>>able to add Content without redeploying the dlls (I[/color]
          >>just[color=darkred]
          >>>>>have to add the new dlls). I want to write new[/color][/color][/color]
          content[color=blue][color=green][color=darkred]
          >>>>>for this application in C#, but I don't want to[/color][/color][/color]
          rewrite[color=blue][color=green][color=darkred]
          >>>>>the existing content dlls. I have two questions:
          >>>>>1. Can I inherit and implement the same vb6[/color][/color][/color]
          interface[color=blue][color=green][color=darkred]
          >>>>>from C#? How?
          >>>>>2. If I write a new interface in C#, is there anyway[/color]
          >>for[color=darkred]
          >>>>>v6 developers to inherit from this interface? How?
          >>>>>Thanks for any help....
          >>>>>.
          >>>>>
          >>>>Thanks,
          >>>> I managed to create a .net interface and it is[/color][/color][/color]
          exposed[color=blue][color=green][color=darkred]
          >>>>through COM. However, I have run into another issue.[/color][/color][/color]
          I[color=blue][color=green][color=darkred]
          >>>>have created a .net class that implements the[/color][/color][/color]
          interface,[color=blue][color=green][color=darkred]
          >>>>and I want to expose this class to COM. However, I[/color]
          >>can't[color=darkred]
          >>>>declare the implemented interface methods as public.[/color]
          >>How[color=darkred]
          >>>>can I expose the methods in my class so they can be[/color]
          >>called[color=darkred]
          >>>>from a COM client? The docs I have read say that the
          >>>>public keyword cannot be used for interfaces even in[/color][/color][/color]
          the[color=blue][color=green][color=darkred]
          >>>>implementat ion. They also say that for COM to create[/color]
          >>the[color=darkred]
          >>>>CCW, only public methods are exposed. Please advise.
          >>>>Thanks.
          >>>>
          >>>
          >>>
          >>>Regards,
          >>>Peter Huang
          >>>Microsoft Online Partner Support
          >>>Get Secure! www.microsoft.com/security
          >>>This posting is provided "as is" with no warranties and[/color]
          >>confers no rights.[color=darkred]
          >>>
          >>>.
          >>>[/color]
          >>[/color]
          >
          >
          >Regards,
          >Peter Huang
          >Microsoft Online Partner Support
          >Get Secure! www.microsoft.com/security
          >This posting is provided "as is" with no warranties and[/color]
          confers no rights.[color=blue]
          >
          >.
          >[/color]

          Comment

          Working...