Skip to Main Content
COM & .NET Component Services
book

COM & .NET Component Services

by Juval Lowy
September 2001
Intermediate to advanced content levelIntermediate to advanced
384 pages
11h 59m
English
O'Reilly Media, Inc.
Content preview from COM & .NET Component Services

Hello COM+

The best way to become acquainted with the Component Services Explorer and basic COM+ terminology is to do a trivial example. This section walks you through the COM+ equivalent of the canonical “Hello World” program. You will build a COM+ application containing a COM component that displays a message box saying “Hello COM+”.

When developing your “Hello COM+” application, follow these steps:

  1. Create a classic COM component. All COM+ components start their life as classic COM components, developed with such tools as ATL, MFC, or Visual Basic 6.0.

  2. Create a new COM+ application to host the component.

  3. Add the component to the application.

  4. Write a client and test the component.

The rest of this chapter uses this “Hello COM+” example to demonstrate various COM+ features and capabilities. The example is also available as part of the source files provided with this book (see the Preface for information on how to access these files).

Building a COM Component

We will use ATL 7.0 to generate a classic COM component, although you can also do it in Visual Basic 6.0 with almost the same ease. Start a new ATL project in Visual Studio.NET and name it Hello. For simplicity, do not use Attributed project (deselect Attributed in the ATL Project Wizard under Application Settings). Also, do not select COM+ 1.0 support. This selection adds a few interfaces explained in subsequent chapters that are not relevant to this example. Bring up the Add Class dialog ATL and select the Simple ATL Object item. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Windows Server® 2008 Security Resource Kit

Windows Server® 2008 Security Resource Kit

Jesper M. Johansson

Publisher Resources

ISBN: 0596001037Supplemental ContentCatalog PageErrata