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:
Today we discuss Interface Definition Language (IDL) and COM types.
-
Syllabus
Describes topics to be covered,
reading material for you to digest before coming to class, and due dates
for the assigned projects.
-
Project #1, Project1HelpS19
Final Projects
-
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.
-
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.
-
Microsoft Component Object Model (COM):
-
COM Tools:
-
Building COM Components
Instructions and Fixes:
Building COM components is more complicated than building non-COM C++ projects. Find instructions here.
-
In-Process Components:
-
IDL and COM types
IDL Presentation,
pptx
These slides discuss how to describe the structure of a COM interface.
BSTRs - COM Strings,
SafeArrays - COM Arrays,
Variants - COM ObjectType
Oleautomation types
Interfac Project - an Out-Of-Proc Component
Shows how to pass most common types of data through COM interfaces, e.g., basic types,
strings, pointers, and arrays.
To build OutOfProc components you need to:
- compile the IDL file - right click on idl file in server explorer and select compile
-
register each of the proxyStub components (they are COM components) - build, then tools->Register Component
(assumes you've set regsvr32 in tools menu)
-
run the OutOfProc server - set as startup, build and run
OutOfProc servers register themselves with the ROT the first time you run them.
- run the client - set as startup, build and run
OutProc Components Presentations,
ppt
ATL Inproc_Ex1
Converting the "raw C++" solution to an ATL solution.
FileHandler Project
Uses SafeArrays - will be helpful for Project #1
-
Web API - REST