Call : (+91) 968636 4243
Mail : info@EncartaLabs.com
EncartaLabs

Component Object Models (COM) Programming

( Duration: 7 Days )

The Component Object Model (COM) training course will provide an overview of both COM in general and the capabilities and tools provided with c#/c++. This course thoroughly introduces the component object model (COM) and explains its standard capabilities and uses. In addition, the relative advantages and disadvantages of the COM are discussed in detail.

By attending Component Object Model workshop, delegates will learn to:

  • Define Object Orientation
  • List the object-oriented features in Visual Basic
  • Insert a class module
  • Define properties for a class
  • Create a client application using COM component
  • List the steps involved in creating COM components
  • Implement a COM component using a class module
  • Create call-back procedures
  • Manage components
  • Register COM components
  • Configure DCOM components

This Component Object Model class is suitable for Application Developers and Authors who plan, design and implement distributed applications.

COURSE AGENDA

1

Introduction to COM

  • Issues surrounding software development that the Component Object Model attempts to address
  • The problems that confront component software developers today
  • Attempted solutions to traditional component software development
  • The drawbacks of various solutions to component software development
  • The solutions that COM provides for component software development problems
2

Creating a COM Object

  • Creating a simple COM object
  • Writing code that creates and uses a simple COM object
  • Explain the laws for publishing interfaces in COM
  • Explain the concept of immutability in relation to interfaces
  • Describe the purpose of the IUnknown interface
  • List and describe the three methods of the IUnknown interface
  • Derive a C++ class from an interface and implement all required methods
  • Create a class factory for a COM object
  • Register a COM object
  • Explain reference counting and its implications
  • Explain, generate, and use a globally unique identifier (GUID)
  • Explain the difference between a COM object and a COM object server
3

Creating a Client of a COM Object

  • Object Fundamentals of COM
  • Creating a COM object client using C++
  • Registering a COM object
  • Creating a client of a COM object
  • Write code to initialize and uninitialize COM services
  • Write code that creates and uses a simple COM object
  • Write a COM client in Visual Basic
  • Explain CLSIDs, ProgIDs, their use in the registry, and how COM system services and client applications use them
  • Write code for the WinMain function of a simple COM object
  • Coding the WinMain function for an out-of-process COM object server
  • Explain how COM uses strings
  • Impliment reference counting in the COM object
  • Write code to enable the client to lock the COM object server in memory
  • Add code to the registry functions for COM to support self-registration
4

Techniques to implement COM objects with multiple interfaces

  • Adding an interface to an object by using multiple inheritances
  • Modifying IUnknown::QueryInterface to reflect added interfaces
  • Calling Query Interface in a client application to obtain additional interfaces
  • Use multiple inheritance to add a second interface manually to a simple COM object
  • Add code for a second interface to the Query Interface method
  • Create a client that will use a COM object that has multiple interfaces
  • Explain the VTBL layout of a COM object that supports multiple inheritance
5

Out of process Server

6

Component Reusability

  • Containment
  • Aggregation
7

Introduction to the Active Template Library

  • Structure, primary features, and basic use of the Active Template Library in creating COM components
  • using the Visual C++ extensions to create a client of a COM object
  • Using ATL COM AppWizard to create the shell for a COM object
  • Using ATL Object Wizard to add a simple COM object to the ATL project
  • Manually adding existing interfaces to the COM object server
  • Using C++ extensions and smart pointers to create a COM object client application
  • Use ATL COM AppWizard to create a COM object server
  • Use ATL Object Wizard to add a simple COM object with a custom interface to an ATL COM project
  • Use Visual C++ extensions to facilitate writing a COM client application
  • Manually add an interface to an ATL COM project
  • Describe the following items in an ATL COM project: COM map, Object map, CComModule, CComObjectRoot, and CcomCoClass
8

Creating an ActiveX Control

  • Creating an ActiveX control using ATL
  • Basic parts of ATL used to make an ActiveX control work, such as the message map and the On Paint method
  • Different property types, such as ambient properties and stock properties
  • creating a property page
  • Creating an ActiveX control with ATL Object Wizard
  • Adding a custom property, custom method, and custom event
  • Create a control with ATL
    • Modify the OnDraw method to draw graphical output for a control
    • Create a property page
    • Creating ActiveX Control and using in Browser
9

Object Reuse in COM

  • Reusing objects in COM through containment and aggregation
  • Differences between inheritance and aggregation
  • Differences between implementation inheritance and interface inheritance
  • Reuse through COM containment
  • Reuse through COM aggregation
  • creating an aggregated object using ATL
  • Using ATL to create a COM object that can be aggregated
  • Using ATL to create a COM object that aggregates another COM object
    • Explain the difference between implementation inheritance and interface inheritance
    • Explain the difference between COM containment and COM aggregation
    • Create an aggregated object with ATL
10

Automation

  • Creating COM components that support automation
  • Using IDispatch to implement automation
  • Dispinterfaces
  • Early and late binding
  • Interface Definition Language (IDL) basics
  • Using OLE/COM Object Viewer to locate and browse type libraries
  • Defining properties and methods in IDL for a dispinterface
  • using the MIDL compiler to compile IDL into type libraries
    • Add properties and methods to a COM object
    • Identify which data types can be passed with automation
    • Create a type library
11

Dual Interfaces

  • Improving efficiency of automation interfaces by turning them into dual interfaces
  • Creating an ActiveX technology component that supports automation using the ATL wizards
    • Explain the difference between dispinterfaces, custom interfaces, and dual interfaces
    • Define a dual interface, with its properties and methods, in Interface Definition Language
    • Explain the benefits and limitations of dual interfaces
    • Create a dual interface with the ATL
  • Using ATL classes to add events to a COM object and to an MFC client of the COM object
  • Creating a COM object that fires an event
  • Creating a client that receives an event fired by a COM object
    • Add event firing to an ATL-generated COM object
    • Add an event-handling interface to a MFC-built COM client
    • Explain how events work in COM from a server and client perspective
12

Custom Interfaces

  • Creating and marshaling custom interfaces
  • Creating a proxy/stub dynamic-link library (DLL) to marshal a custom interface
  • How the standard marshaling architecture works in COM
  • Creating a custom interface with ATL
  • Creating a proxy/stub DLL for a custom interface
  • Using the default allocator in COM to allocate and free memory dynamically
  • Writing IDL syntax to pass arrays efficiently
    • Explain why custom interfaces are necessary
    • Create a custom interface in ATL that works across process boundaries
    • Describe the process used by a proxy/ stub DLL to marshal data types
    • Explain why marshaling creates memory management and distribution issues
    • Create a proxy/stub DLL using ATL

Encarta Labs Advantage

  • One Stop Corporate Training Solution Providers for over 6,000 various courses on a variety of subjects
  • All courses are delivered by Industry Veterans
  • Get jumpstarted from newbie to production ready in a matter of few days
  • Trained more than 50,000 Corporate executives across the Globe
  • All our trainings are conducted in workshop mode with more focus on hands-on sessions

View our other course offerings by visiting https://www.encartalabs.com/course-catalogue-all.php

Contact us for delivering this course as a public/open-house workshop/online training for a group of 10+ candidates.

Top
Notice
X