Com Components With .net

The article below shows the use of COM Reusable objects with .NET framework. COM interaction with .Net framework is in the form of assemblies. COM model is developed by Microsoft where application can get access to data from COM objects. Assemblies are comprised of resources which tell the CLR regarding the implementation code. In order to access com component into .Net Framework it needs to be added as a reference for any particular solution. Asp.net framework has a tab panel where COM components could be browsed and added to any project. When any COM component is added to .Net project it creates an Interop assembly in BIN folder of the project solution. Here Interop assembly is a 3rd party generated assembly which can be coded in any language. The Interop assembly for added COM component holds metadata which the CLR would use to call the methods from COM object. An example of adding COM component to be used in .Net Project can be Ionic.zip.dll or itextsharp.dll. The project needs to use the namespace in code behind for any particular added component to the project. Thus based on that one can access the methods or variables present inside component. There are many other examples to demonstrate the COM reusability. Once the COM components are added to .Net Framework then the methods in it can be accessed. The .Net framework also provides a way to view the variables or methods being coded into COM component using de-assembler. The task of de-assembler is to de assemble the COM object and thus show the variables and methods being used in it. Access to .Net de-assembler can be achieved by going to visual studio from all programs and then selecting windows sdk tools where one can find the cmd for .net. Move to parent directory and write ildasm. An ILDASM window pops up where one can select the COM component from File menu. Upon selection of COM object the de-assembler shows a break down structure of methods or variables being used in COM component. The Interop assemblies related to COM are automatically generated by visual studio thus enabling inter operation between .net and com. 

Facebook
Twitter
Pinterest