Ra.
Ra.

Reputation: 2519

Turning an ActiveX component into a .NET component

I have an ActiveX component with no user interface that was created with C++ / Visual Studio 6.

Now I need to create a .NET component reusing the code. How do I go for this? Can I just wrap or embed the ActiveX inside a .NET component?

Upvotes: 2

Views: 154

Answers (1)

Hans Passant
Hans Passant

Reputation: 942338

.NET already supports these, nothing special is needed. All it needs is the type library for the component, it should be embedded in the DLL when you created it with VS6. In a .NET project, use Project + Add Reference, Browse tab and select the DLL. That automatically generates the interop library. Use Object Browser to verify that everything is there.

Upvotes: 2

Related Questions