Using Visual C++ COM Object in Visual C#

  • Thread starter Thread starter Mihaly
  • Start date Start date
M

Mihaly

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:\AgendaServer\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
 
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

What makes you think that?

to do
a tlbimp work correctly (if i try to convert directly i
take "TlbImp error: The input
file 'C:\AgendaServer\AgenObj.dll' is not a valid type
library").

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



Mattias
 
Yes i have the typelib but, what can i do to use that
visual c++ com object in my c# application?
 
Yes i have the typelib but, what can i do to use that
visual c++ com object in my c# application?

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



Mattias
 
Back
Top