C U T B H P N

Lecture #9 - Active Template Library (ATL)

Web Resources:

Linux Tutorials eclipse Code Project SysInternals Best SysInternals Tools Dr. Dobb's Journal Windows Forms COM at MSDN IDL Language base MIDL types OLE data types IDL attributes MIDL data types MIDL Language Reference

Content:

This lecture introduces Interface Definition Language (IDL). You've seen some of this already, so here we concentrate on representing a variety of types used in COM development.
  1. Syllabus
    Describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Project #1, Project1HelpS19
  3. Project #1 Prototype
    This demo has a client, a using component, and a used component. The client creates both used and using components, then passes a pointer to used to the using to set up that communication. This structure would work fine for Project #1, where the used component is FileMgr and the using component is the TextSearch component. This was supposed to be a simple demonstration of how to use the ATL wizards. Unfortunately they are broken in Visual Studio 2017. To do the demonstration, I installed VS 2015 to carry out the demo. I then loaded that project into Visual Studio 2017 to execute and demonstrate the communication patterns between client, used, and using components.
  4. You will find in the CSE775/Code/Project1HelpS19, a demonstration of FileSystem, a package of file, path, and directory operations implemented with classes:
    • Block and File
    • FileInfo
    • Path
    • Directory
    I modeled the design of these after the excellent System.IO classes of the same names in the .Net library. There are versions for both Windows and Linux.
  5. Final Projects
    Final Presentations Schedule, xlsx
  6. References:

    COM and ATL 3.0
    ATL Internals, Second Edition
    Essential IDL, Interface Design for COM
  7. Building COM Components
  8. Previous Lectures:

    In-Proc Components Class Diagram Structure Chart Activation Diagram Virtual Function Pointer Table
    In-Proc Component code

    IDL Presentation
    Discusses the types most frequently used with COM.

    Interfaces
    Shows how to pass most common types of data through COM interfaces, e.g., basic types, strings, pointers, and arrays.

    Oleautomation types

    C++ Interfaces Client:

    IDL Links

  9. Out of Process COM Components

  10. ATL Library:

    ATL Structure - a simple simulation with native C++, ATL Structure - pdf
    This demo shows how the ATL Framework works in simple terms.
    ATL Wizard Help
    This link takes you to a quick explaination of how to use the ATL wizard. Usage changed between VS 15.2 and VS15.3 and the MSDN docs are out-of-date.
    ATLInprocEx1
    Converting the "raw C++" solution to an ATL solution.
    ATL_FileHandler_SafeArray Project
    Uses SafeArrays - will be helpful for Project #1
    Connectable Objects, pptx,
    Introduction to Connection Points.
    ATLProject1_Helper
    Demonstrates building a simple component with connection point callbacks and both C++ and C# clients.
    ATL Presentation, pptx
    ATL class hierarchy
    ATL helper classes, ATL synchronization classes
    ATL ActiveX Control Architecture
    ATL windows classes,
  11. Web API - REST

CST strip