CSE775 - Distributed Objects
Lecture #17 - ActiveX Controls
Revised: 23 March 2008
Web Resources:
Code Project
Win32, COM, MFC
DevelopMentor
Windows Developer's Journal
Windows Forms
GotDotNet
C# Corner
IDL and WDSL
COM at MSDN
IDL Language
base MIDL types
OLE data types
IDL attributes
MIDL data types
MIDL Language Reference
conversion functions
Content:
This lecture reviews Automation and Connection Points, the infrastructure for COM events, and introduces ActiveX Controls.
-
Syllabus
Describes topics to be covered,
reading material for you to digest before coming to class, and due dates
for the assigned projects.
-
Project #2,
Project #3,
Project #4
-
Threads Help
Help with Win32 and C# threads and synchronization.
-
Automation Presentation
This presentation discusses the standard COM IDispatch interface.
-
Raw C++ Automation Project using IDispatch
Here, an automation server is build with ATL and its client is build in C++ without using MFC
or ATL. This too is somewhat complicated, although not as bad as the Connection Point example
below.
-
Connectable Objects
Introduction to Connection Points.
-
Raw C++ Connection Points Project
This project demonstrates how to build a Connection Point server and client in C++ with using
MFC or ATL. It also demonstrates why you don't want to do that.
You'll find notes on how to build in connection points using ATL in the
AxDemo notes below and the
associated AxDemo Implementation notes below.
-
ActiveX Controls Presentation
ActiveX controls have many duties to their containers and the user. A full control supports an
enormous number of interfaces
-
AxDemo notes
-
AxDemo Implementation
AxDemo client
-
C# and COM Interoperation
This project demonstrates a C# form using an ActiveX control, developed with C++, using ATL. Both
Connection Points and COM standard Error Handling are demonstrated.
C# Form-based programs can easily use simple COM objects in conventional Client/Server configurations.
However, if we want the Form to respond to COM events from the control, we require more than just adding Connection
Points to the component. In order to see the COM events in our Form's property view, we need to
construct a full ActiveX control.
-
Lecture #9 folder
Contains a page of links to
presentations and code discussed in this class. The Lecture folders will occasionally
hold physical files of interest as well. Usually, however, all the materials
of interest to the class are in the presentations
and code folders. The contents of these folders will grow
as you progress through the course.