ActiveX and .NET
-
Hello, 1. when adding an ActiveX on a .NET WinForm one or more dlls will be created and added to project. can somebody please explain what are these dlls and what do they do? 2. If there is some version of an ActiveX on a system and my app uses another version (newer or older) of the same ActiveX, what happens if I install and register my version on that system for my app? will some sort of conflict occur?? thank you
-
Hello, 1. when adding an ActiveX on a .NET WinForm one or more dlls will be created and added to project. can somebody please explain what are these dlls and what do they do? 2. If there is some version of an ActiveX on a system and my app uses another version (newer or older) of the same ActiveX, what happens if I install and register my version on that system for my app? will some sort of conflict occur?? thank you
Hi, From what I have seen, the DLLs created are the generated interop assemblies used to access the COM object your project uuses. It looks like .NET adds a (arguably) nice wrapper object over COM in order to marshall the calls between the managed code and the component in use. Not all questions answered, sorry. Regards, Joe
-
Hello, 1. when adding an ActiveX on a .NET WinForm one or more dlls will be created and added to project. can somebody please explain what are these dlls and what do they do? 2. If there is some version of an ActiveX on a system and my app uses another version (newer or older) of the same ActiveX, what happens if I install and register my version on that system for my app? will some sort of conflict occur?? thank you
- These are called interop assemblies. Interop assemblies are the bridge between the .NET world and the unmanaged world. As you can figure out, interop assemblies forward back and forth COM method calls. Dropping an ActiveX control onto a form is like using the aximp.exe tool from the command line. It imports the type library and then creates one or more dll files, usually 2 with ActiveX components (and only one for a simple "non-visual" COM component). 2) Since the interop assemblies only forward method calls, including the component creation steps, versioning is not worse nor better. The component is eventually instantiated based on its clsid, that's why your .NET code will always try to create that component, not a more recent one.