Using Visual C++ COM Object in Visual C#

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
 
M

Mattias Sjögren

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
 
G

Guest

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

Mattias Sjögren

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top