C U T B H P N

Lecture #10 - Out-of-Process COM Components

COM style IPC

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:

In this lecture we discuss Out-of-Process COM Components.

  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. What is expected for first "Technology" presentation?
  6. Implementing In-Proc Component with ATL

    ATL Project #1 Helper Demo
    Implement simple COM In-Proc component using ATL and two clients, one C# and one C++. This will demonstrate how you use ATL wizards and what the results look like. The demo includes a demonstration of connection points.

    Implementation and Build Instructions are included as comments in the source code for component (IDL) and both clients.
  7. RESTful Web Services

  8. Out-of-Process COM Components

    OutProc Presentation

    OutProc Class Diagram, OutProc Sequence Diagram
    OutProc ST Structure Chart, OutProc MT Structure Chart

    IDL Demo - Interfac
    We looked at this before. It's here as a reminder that all the interface method parameters were being marshalled between the client and component processes.

    Raw C++ Out-of-Process Single-Threaded Apartment Component
    We will go through this code carefully so you see the structure of an out-of-proc COM component.

    Raw C++ Out-of-Process Multi-Threaded Apartment Component
    We will make a quick comparison of this with the previous code so you see the differences between ST and MT code.

    ATL Out-of-Process Single-Threaded Apartment Component
    This is the ATL-based version of the OutProcST project.

    OutProc with console
    Out-of-Process components have no visible interface unless you add one. This demonstrates how to add a console.

    OutProc with dialog
    Out-of-Process components have no visible interface unless you add one. This demonstrates how to add a dialog.

CST strip