Subscribe to Newsletter

Print

Win32 Programming & COM Training Course


(This course is offered only on-demand to a private batch and can be customized as per the business requirements)

Objectives

At the end of WIN32 Programming & COM Training course, participants will impart a firm grasp of COM and Win32 applying the language effectively.

Duration - 9 Days

Prerequisites

  • It would be necessary that the participant have a prior exposure to some High Level programming viz BASIC, PASCAL and COBOL, C , C++, etc.
  • It would also be required that the participant has knowledge of programming and programming fundamentals

Syllabus

1. Introduction to Windows Messaging Architecture
  • Windows Operating system components
  • GDI, KERNEL, USER
  • Window creation process
2. Windows programming and SDK overview
  • WinMain function as entry point
  • WNDCLASSEX structure
  • Data types
  • Creating and displaying window using windows API functions
  • Message Loop
  • Using Windows Procedure to handle windows messages (Windows messages, CREATE, DESTROY, MOUSE EVENTS) Demo Application will be created with adding Menu to window and handling menu messages Using Device Context and also with understanding of concepts and creation of Child Windows with Understanding and using Message Crackers to handle windows messages
3. Processes & Thread
  • Process Basic: What is process? How Processes are managing in windows OS?
  • About Create Process function
  • Terminating a process
  • Child Processes
  • Thread basics
  • When to create a thread
  • Thread Attributes(Thread Stack, Thread context structure, ThreadExecution Times,Thread Scheduling, Thread Priority, How scheduling Happens) an understanding no demo
  • About Create Thread function
  • Terminating a thread
4. Fibers
  • Meaning
  • Implementation
5. Synchronization
  • Why Synchronization required?
  • Interlock
  • Critical Sections
  • Mutexes
  • Events
  • Semaphores
6. Dynamic Link Libraries
  • Overview on Win32 DLL
  • Creating a simple DLL & understanding the DLL
  • DLL Entry Points
7. IPC and Technologies used for IPC
  • Shared Memory (memory mapped object)
  • Named Pipe
  • WinSock
  • Mailslot
8. Introduction to COM
  • Software development issues addressed by Component Object Model
  • 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 provided by COM for component software development
  • Evolution of COM
9. 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
10. 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
  • Use of CLSIDs, ProgIDs COM system services and client
  • 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
11. Techniques to implement COM objects
  • Adding an interface to an object by using multiple inheritances
  • Modifying IUnknown::QueryInterface to reflect added interfaces
  • Calling QueryInterface() in a client to obtain additional interfaces
  • Use multiple inheritance to add a second interface manually
  • 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 in multiple inheritance
12. Out of Process Server
  • Creating Out Of Process Server
  • Creating Client
  • Generating Proxy/Stub Dynamic Link Libraries
13. Component Reusability implementing Containment
  • Meaning of Containment
  • Implementing a Containment in Inproc Server
  • Creating a Client
14. Component Reusability implementing Aggregation
  • Meaning of Aggregation
  • Implementing Aggregation in Inproc Server
  • Creating a Client
15. Introduction to the Active Template Library
  • Structure and primary features of the Active Template Library
  • 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 ATLproject
  • Manually adding existing interfaces to the COM object server
  • Use of C++ extensions and smart pointers to create a client
  • Use ATL COM AppWizard to create a COM object server
  • Use ATL Object Wizard to add
    • a simple COM object with a custom interface
  • Use Visual C++ extensions to facilitate writing a COM client application
  • Manually add an interface to an ATL COM project
  • Describe COM map, Object map, CComModule
  • Also describe CComObjectRoot, and CComCoClass
16. 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 and interface
    • inheritance
    • Explain the difference between COM containment and COM aggregation
    • Create an aggregated object with ATL
  • Improving efficiency of automation interface by using dual interfaces
  • Creating an ActiveX component that supports automation
    • using the ATL wizards
    • Explain the difference between dispinterfaces, custom and dual interfaces
    • Define a dual interface, with its properties and methods, in IDL
    • 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
  • 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
17. 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
18. Threading Models
  • COM threading models
  • How mixed threading models with in-process and out-of-process clients and servers can cause marshaling issues
  • Identify which threading model combinations are most efficient, and which are the least efficient
  • Identify which threads can be called from a client to a server with different threading model scenarios
    • Explain the differences between single-threaded applications, singlethreaded apartment models, and multithreaded apartment models
    • Explain how mixing threading models with in-process and out-ofprocess servers can cause marshaling issues
    • Identify the registry keys for threading models.