export of COM object to C++?

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

    export of COM object to C++?

    Here's my situation: I have a .NET (C#) dll (COM 1) which contains a
    reference to another COM library (COM 2). I also have a C++ program which
    accesses COM 1 via Interop. I want to include a routine in the interface to
    COM 1 which accesses an interface defined in COM 2. How do I do this?? I
    have done something similar in the case where my COM 1 was written in C++ by
    aggregating the interface to access the interface of COM 2.


  • Richard Burte

    #2
    Re: export of COM object to C++?

    I suggest you modify .NET DLL COM 1 to include a new interface that refers
    to COM 2 and use that from C++ dll.

    Cheers
    Richard

    "Trokey" <matt_troke@hot mail.com> wrote in message
    news:bmmaas$omj gi$1@ID-203151.news.uni-berlin.de...[color=blue]
    > Here's my situation: I have a .NET (C#) dll (COM 1) which contains a
    > reference to another COM library (COM 2). I also have a C++ program which
    > accesses COM 1 via Interop. I want to include a routine in the interface[/color]
    to[color=blue]
    > COM 1 which accesses an interface defined in COM 2. How do I do this?? I
    > have done something similar in the case where my COM 1 was written in C++[/color]
    by[color=blue]
    > aggregating the interface to access the interface of COM 2.
    >
    >[/color]


    Comment

    • Trokey

      #3
      Re: export of COM object to C++?

      What do you mean by "refers to"? I already tried putting a routine in an
      existing interface (ICOM1IF) which returns an object of type COM2.ObjectA.
      On the C++ side, this translates to a return type of ObjectAPtr, which is
      unusable and generates compile errors (ICOM1IF::Objec tAPtr : missing
      storage-class or type specifiers).

      "Richard Burte" <rburte@online. microsoft.com> wrote in message
      news:uNY7MKAlDH A.1800@TK2MSFTN GP10.phx.gbl...[color=blue]
      > I suggest you modify .NET DLL COM 1 to include a new interface that refers
      > to COM 2 and use that from C++ dll.
      >
      > Cheers
      > Richard
      >
      > "Trokey" <matt_troke@hot mail.com> wrote in message
      > news:bmmaas$omj gi$1@ID-203151.news.uni-berlin.de...[color=green]
      > > Here's my situation: I have a .NET (C#) dll (COM 1) which contains a
      > > reference to another COM library (COM 2). I also have a C++ program[/color][/color]
      which[color=blue][color=green]
      > > accesses COM 1 via Interop. I want to include a routine in the interface[/color]
      > to[color=green]
      > > COM 1 which accesses an interface defined in COM 2. How do I do this?? I
      > > have done something similar in the case where my COM 1 was written in[/color][/color]
      C++[color=blue]
      > by[color=green]
      > > aggregating the interface to access the interface of COM 2.
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...