Click to return to the Component Development home page    
Web Workshop  |  Component Development

COM Tutorial Samples


Overview

Using Samples
Using
Samples
Lesson List
Lesson
List
First Lesson
First
Lesson

Updated: December 4, 1997

About This Update

This update has seven new samples covering:
* How to implement persistence in COM objects using the IPersist* interfaces.
* How to implement a shared single COM object accessed over DCOM by multiple clients. DCOM security is covered.



Welcome to this Web-based tutorial for the COM Tutorial Samples. From this overview page you can:

* Jump to read the tutorial lessons for the various tutorial code samples
* Download a compressed, self-extracting file containing the complete source for tutorial code samples
* Submit suggestions for improving the samples

This tutorial sample series is directed to serve advanced programmers who are using their proficiency in C++ Win32 programming to develop or modify software using COM (Component Object Model) technology. These samples show how to program components at the foundation level of COM. Neither MFC nor ATL is used in the samples.

If you are developing Internet Web applications with ActiveX controls and an integrated development environment like Microsoft Developer Studio, then you have the benefit of tools and abstractions that hide most of the technical detail covered in this series. The series exposes much of the infastructure that is now being increasingly hidden by MFC (Microsoft Foundation Classes) and ATL (Active Template Library). This series can help when you need to drop below the convenient abstractions in MFC or ATL to perform COM-compliant modifications. Of course, it can also help if you are working directly at this foundation level of COM programming to develop the highest performance professional applications.

These source code samples are the same as those currently found as branch \MSSDK\SAMPLES\COM\TUTSAMP of the installed Microsoft Platform SDK.

The samples branch consists of directories organized in a graduated sequence of tutorial lessons. The numbered order of lessons is the sequence we recommend that you follow in the tutorial. Each lesson illustrates a major feature of COM technology. Most lessons build on the ones that came earlier in the sequence.

Each code sample has an associated description of the sample's external operation and a narrative code tour of the internal construction (based on the specific goal of the tutorial lesson). This tutorial narrative resides in a [lesson].ASP Web page file -- where [lesson] is the name of the lesson/code sample. There is one of these narrative HTML files for each tutorial code sample. All of these HTML files are located in the main directory of the tutorial samples branch. The complete tutorial is thus made up of many HTML files located in the parent directory of all the sample directories. This single parent directory is the main tutorial directory. Additional details on the internal mechanisms of each sample can be found in code comments in each source file located in the sample's directory.

The tutorial HTML files for the tutorial samples are linked together into a Web that can be viewed with a Web browser. The tutorial is aimed at revealing how to program the major features of COM and the internal behavior of the sample components. While this can serve as an inductive means to appreciate COM architectural theory, this tutorial complements other more comprehensive works that cover the full conceptual breadth of COM, ActiveX, and OLE technology. Some recommended works are:

After installing the complete sample set, you can start browsing this tutorial by executing the TUTORIAL.EXE command in the main tutorial directory. You must have a Web browser installed for TUTORIAL.EXE to work. The Web browser must have a file association with the .ASP file extension. If you are reading this Web page on the World Wide Web then you can download the complete sample set to obtain the source code for the samples that accompany the tutorial as well as copies of the Web pages that comprise the tutorial.

Click a link below:

* List of Lessons -- table of contents for the tutorial lessons.
* Using the Samples -- useful information about building the code samples, extracting individual code samples, and coding style conventions.
* Download -- downloadable, self-extracting file containing the complete set of code samples with HTML copies of the tutorial Web pages.
* Suggestions -- submit suggestions or comments to Microsoft on this tutorial sample series.



Back to topBack to top

Did you find this material useful? Gripes? Compliments? Suggestions for other articles? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.