Component Object Model

Slides:



Advertisements
Similar presentations
COM and.Net Components By Sam Nasr January 25,
Advertisements

Fundamentals of COM Mary Kirtland Program Manager COM Team Microsoft Corporation.
COM vs. CORBA.
Intro to COM What is it and how do I use it?. Objectives Teach the fundamentals of COM. Understand the reason for using it. Learn to make a simple in-process.
Introduction to the C# Programming Language for the VB Programmer.
Remote Procedure Calls. 2 Client/Server Paradigm Common model for structuring distributed computations A server is a program (or collection of programs)
COM: Microsoft's Component Object Model Andrew C. Hopkins CSCI 397C-16 Object Oriented Database Design and Management Professor Renee Renner.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
1 DirectX CIS 487/587 Bruce R. Maxim UM-Dearborn.
Intro to COM What is it and what can it do for me?
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
Introduction to .Net Framework
DBA Developer. Responsibilities  Designing Relational databases  Developing interface layer Environment Microsoft SQL Server,.NET SQL Layer: Stored.
Session 1 - Introduction and Data Access Layer
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
.NET Framework & C#.
Microsoft Visual Basic 2005: Reloaded Second Edition
 Internet providing backbone for applications  Use of several web sites and devices to provide one complete solution  Software as services  Quick software.
Webinar presented by Erick Polsky 10/2/2012. What is.Net? Combines… Language Independence Memory Management Database Access Class Libraries Operating.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Neal Stublen Class Objectives  Develop an understanding of the.NET Framework  Gain proficiency using Visual Studio  Begin learning.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 5: Threads Overview Multithreading Models Threading Issues Pthreads Solaris.
Multithreading Allows application to split itself into multiple “threads” of execution (“threads of execution”). OS support for creating threads, terminating.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
Threading Models in Visual Basic Language Student Name: Danyu Xu Student ID:98044.
Chapter 1: Creating ActiveX Clients By Noppadon Kamolvilassatian Dept. of Computer Engineering, Prince of Songkla University Source: Mastering Visual Basic.
COM/DCOM Implementation Basics of: Object creation and access Object Reuse Interface referencing.
COMCOM omponent bject odel After this presentation, you will: Be Able To: Conceptual understanding of COM How it works, What it’s used for Decode Acronyms.
Managed C++. Objectives Overview to Visual C++.NET Concepts and architecture Developing with Managed Extensions for C++ Use cases Managed C++, Visual.
A COM implementation of the KSpace A ‘Knowledge Space prototype’ by Santhosh CST
Bruce Armstrong TeamSybase
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Ni.com Understanding COM/ActiveX Jeff Paulter Staff Software Engineer Thurs Aug 17 10:15-11:30 a.m., 1:45-3:00 p.m. Ash (10A) Jeff Paulter Staff Software.
Introduction to COM and ActiveX Controls. What is an object? In the Fayad sense of the word.
Intro to dot Net Dr. John Abraham UTPA CSCI 3327.
GAM666 – Introduction To Game Programming ● DirectX is implemented as a collection of COM objects ● To use a DirectX program, the user must have the correct.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
1.
Microsoft .NET A platform that can be used for building and running windows and web applications such that the software is platform and device-independent.
C# and.NET. .NET Architecture  Compiling and running code that targets.NET  Advantages of Microsoft Intermediate Language (MSIL)  Value and Reference.
ASP.NET &.NET Environment. Overview Part of Microsoft’s.NET environment Used for Development of  Websites  Internet applications  Web Services & XML.
DEV394.NET Framework: Migrating To Managed Code Adam Nathan QA Lead Richard Lander Program Manager Microsoft Corporation.
Template Package  Presented by G.Nagaraju.  What is Template Package?  Why we use Template Package?  Where we use Template Package?  How we create.
Internet The internet is the largest computer network system in the world. It consists of many smaller networks connected together by a global public.
1 Chapter 5: Threads Overview Multithreading Models & Issues Read Chapter 5 pages
Automation Engr. Faisal ur Rehman CE-105T Spring 2007.
Lecture 1: The .NET Architecture
Introduction to Object-oriented Programming
Component Object Model(COM)
Component Object Model
Programming Paradigms
Native / Managed Interop
Out-of-Process Components
Jim Fawcett CSE775 – Distributed Objects Spring 2003
Module 1: Getting Started
Introduction to C# AKEEL AHMED.
Interpreter Style Examples
Microsoft Connect /1/2018 2:36 AM
Tonga Institute of Higher Education
Module 10: Implementing Managed Code in the Database
Remote Procedure Call Hank Levy 1.
Out-of-Process Components
Programming Paradigms
Remote Procedure Call Hank Levy 1.
DOT NET ARCHITECTURE (OR) DOT NET FRAME WORK ARCHITECTURE
Active Template Library
Lecture 7 ATL and Out-of-Process Components
Remote Procedure Call Hank Levy 1.
IS 135 Business Programming
CS Introduction to Operating Systems
Presentation transcript:

Component Object Model Requirement the code written in one language should be reused in the applications developed using other language. Solution is COM COM  it is a specification or a set of rules provided such that language interop can be achieved. Note in order to specify a code as a component it is manditory that the class definitions has to inherits IUNKNOWN interface. www.ppttopics.com

Methods in IUNKNOWN interface QueryInterface  it is used to maintain the address of all the member functions defined in the class definitions in a VARRAY table structure. AddRef  It is used to increment the reference counter value by 1 when ever the application uses the definitions of the form component. Release  when ever the application which uses the COM component definitions is closed in a normal procedure then Release Method is used to release the reference counter information. Note  if the reference counter value is equal to zero then the resources occupied by the COM component will be released. www.ppttopics.com

The processing of the component will be done here COM Types Com is of 2 types In Process COM [.dll]  Operating System Com Server Application In Process COM PMA The processing of the component will be done here www.ppttopics.com

IN Process COM When ever a COM type application uses the definitions of the inprocess COM then a request will be given to the COM server where the component will be identified based on its GUID and processing of the component will take place at the PMA [ Private Memory Area ] of the OS and the request will be given back to the application. Advantages  The performance of the application will be very fast. Limitations  Always a IN process component depends on a application the Component cant be used independently. As the processing of the component will be performed at the PMA of the operating system the resources of the OS will be blocked. www.ppttopics.com

OUT Process COM COM Server Application PMA Memory Block Operating System COM Server Application OUT Process COM .exe PMA Memory Block www.ppttopics.com

OUT Process COM (.exe) When ever a application uses the OUT process component then a request will be given to the COM server where COM is identified and the processing of the Component will be performed at a individual memory block and the response will be given to the application with the support of PMA. Advantages  OUT process components can be used within an application or it can be used independently. The resources of the O/S is not blocked. Disadvantages  the application which uses the OUT process components will be slow when compared to the applications which uses the in process components. www.ppttopics.com

Problem when COM component is used within the .net applications Operating System COM Server .Net Application COM Component A dot net application cant send a request directly to the COM Component or it cant send a request to the COM Server www.ppttopics.com

Solution to use COM in dot net applications The environment in which .net applications will be processed is managed environment. The environment in which COM components will be processed is unmanaged environment. UnManaged Env Managed Env COMMON LANGUAGE RUNTIME COM Marshalling COM Server Runtime Callable Wrapper COM Component Un Managed Code .Net Application .Net Interop COM Managed Code www.ppttopics.com

When ever the dot net application uses the definitions of the COM Component a request will be given to the CLR which uses the COM marshalling resource and identifies the application uses the definition of the COM Component and it defines a Runtime Callable Wrapper which sends a request to the Com Server where the Component is identified based on its GUID and the definitions of the COM component will be returned to the RCW and based on that definitions a relevant .net interop COM will be defined which will be used by the applications. www.ppttopics.com

Microsoft CDO for NTS 1.2 library [COM Component ] CDONTS { Collabarative Data objects for new Tech. Service } Usage  used to send / receive Mails Properties  From,To,Subject,Cc,Bcc,BodyFormat,MailFormat,Body See example. www.ppttopics.com

COM using dot net COM Server Com Type App UnManaged Env Managed Env COMMON LANGUAGE RUNTIME COM Callable Wrapper IUNKNOWN Interop Com IDISPATCH CLASS DEF .Net assembly [Class Defn’s] Com Type App www.ppttopics.com

When ever a COM type application uses the definitions of the When ever a COM type application uses the definitions of the .net assembly then a request will be given to the CLR from the COM Server where the CLR uses its COM collable Wrapper [CCW] resource to identify the .net assembly and to define the relevant interrop COM which will be registered in the COM Server and then the COM Type application uses the definitions of the Dot net assembly as if it is using a Com Component only. www.ppttopics.com

Steps to define a .net assembly to be used only by the COM type application Step 1:Select class library template. The main of the application if used in the .net environment will be considered as a name space and if used from the COM type application it will be considered as a project name. Step 2: open the solution explorer and select class1.cs file right click on it and click on d www.ppttopics.com