Click here to Skip to main content
13,045,019 members (40,045 online)
Rate this:
Please Sign up or sign in to vote.
i have created com object(activex control) in C#, now i want to embed it into application.
is it possible?
Posted 12-Nov-13 16:41pm
Sergey Alexandrovich Kryukov 12-Nov-13 23:15pm
Why? why?!

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You can do it. And it makes no sense, whatsoever. There are no situations where it could be useful. You want to go a long way, contaminate your register with ActiveX registration, and all that just for nothing.

You need nothing to employ interoperation between assemblies written C# and VB.NET. Both will be .NET assemblies. And there are no any practical barriers between different .NET assemblies. It does not really matter in what language they are written. You simply create an assembly in one language. Create another assembly and add a reference to the first one. Since this moment, all the types and type members marked with public access specifier will become accessible from the referencing assembly, exactly as if they were defined in a single assembly. (Assemblies can also be loaded dynamically during runtime, but, for now, let's say this is an advanced topic.) That's all.

Now, if you don't know assemblies, which is the central point of .NET, references, namespace, and a lot more of the very basic stuff, you cannot really do .NET development. Start learning all that.

And do yourself a big favor: simply forget about COM and ActiveX while doing .NET development. Just forget it, at least for now. You may, as a remote possibility, need to use it for interoperation with non-.NET stuff, but this is not likely. You can always use native DLLs in .NET assemblies without COM/ActiveX. Doing the opposite is much harder, and even that can be done without COM/ActiveX. But you may have good chances to never need it.

Ron Beyer 12-Nov-13 23:33pm
5'd, with .NET its really easy to inter-operate with assemblies created in other .NET languages (because they all compile down to MSIL in the end). I'm sure the OP is thinking about the old days when you needed ActiveX or COM to communicate from something developed in C++ to something developed in VB6.
Sure. Thank you, Ron.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 12 Nov 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100