Using Visual C++ COM Object in Visual C#

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

    #1

    Using Visual C++ COM Object in Visual C#

    Hello, i'm trying to use a Visual C++ COM Object in my
    ASP .NET application, but i can't use that directly, i
    have to do a wrap, but i can't do it directly, first i
    have to convert the visual c++ dll in Visual Basic to do
    a tlbimp work correctly (if i try to convert directly i
    take "TlbImp error: The input
    file 'C:\AgendaServe r\AgenObj.dll' is not a valid type
    library").

    So my question is, what i have to do in visual basic with
    my visual c++ object to use in my Visual C# code?

    Really apreciate your time

    thanks
  • Mattias Sjögren

    #2
    Re: Using Visual C++ COM Object in Visual C#

    [color=blue]
    >Hello, i'm trying to use a Visual C++ COM Object in my
    >ASP .NET application, but i can't use that directly, i
    >have to do a wrap, but i can't do it directly, first i
    >have to convert the visual c++ dll in Visual Basic[/color]

    What makes you think that?

    [color=blue]
    >to do
    >a tlbimp work correctly (if i try to convert directly i
    >take "TlbImp error: The input
    >file 'C:\AgendaServe r\AgenObj.dll' is not a valid type
    >library").[/color]

    Do you have a typelib for your C++ COM library?



    Mattias

    --
    Mattias Sjögren [MVP] mattias @ mvps.org

    Please reply only to the newsgroup.

    Comment

    • Guest's Avatar

      #3
      Re: Using Visual C++ COM Object in Visual C#

      Yes i have the typelib but, what can i do to use that
      visual c++ com object in my c# application?
      [color=blue]
      >-----Original Message-----
      >[color=green]
      >>Hello, i'm trying to use a Visual C++ COM Object in my
      >>ASP .NET application, but i can't use that directly, i
      >>have to do a wrap, but i can't do it directly, first i
      >>have to convert the visual c++ dll in Visual Basic[/color]
      >
      >What makes you think that?
      >
      >[color=green]
      >>to do
      >>a tlbimp work correctly (if i try to convert directly i
      >>take "TlbImp error: The input
      >>file 'C:\AgendaServe r\AgenObj.dll' is not a valid type
      >>library").[/color]
      >
      >Do you have a typelib for your C++ COM library?
      >
      >
      >
      >Mattias
      >
      >--
      >Mattias Sjögren [MVP] mattias @ mvps.org
      >http://www.msjogren.net/dotnet/
      >Please reply only to the newsgroup.
      >.
      >[/color]

      Comment

      • Mattias Sjögren

        #4
        Re: Using Visual C++ COM Object in Visual C#

        [color=blue]
        >Yes i have the typelib but, what can i do to use that
        >visual c++ com object in my c# application?[/color]

        Run TlbImp on the typelib, and reference the generated interop
        assembly in your C# project.



        Mattias

        --
        Mattias Sjögren [MVP] mattias @ mvps.org

        Please reply only to the newsgroup.

        Comment

        Working...