Additional Resources for Component Development

There are a number of tools available to help you develop components that run in IIS. Microsoft? Visual Interdev? provides an excellent environment for inserting your components into ASP pages. In addition, the Active Template Library will help you get started in creating COM components.

COM components samples are included in the CD and download versions of the IIS Software Developer Kit (SDK). You can download the IIS SDK from Platform SDK Update. You can view the SDK (but not sample source code or header files) at MSDN Online.

COM Concepts

COM defines a set of principles to achieve three goals: encapsulation, polymorphism, and inheritance. In addition, COM provides a structure that facilitates distribution and avoids the problems associated with reusing components.

As an IIS component developer, you need to understand some basic COM concepts. Microsoft provides many resources that describe COM. The topics below present some of the major concepts that you will need to master, along with references to resources so that you can learn more.

COM architecture has been thoroughly documented both in Microsoft publications and by third parties. Three books that give an excellent summary are:

  • Rogerson, Dale, Inside COM. City, ST: Microsoft Press,1997.

  • Chappell, David, Understanding ActiveX and OLE.City, ST: Microsoft Press,1996.

  • Grimes, Richard, Alex Stockton, Julian Templeman, George V. Reilly, Beginning ATL COM Programming. City, ST: Wrox Press,1998.

In addition, COM is thoroughly documented in the Microsoft Developer Network Library. Some good sources for general descriptions of COM are:

  • "Component Object Model Specification," Chapters 1 and 2 (MSDN Library, Specifications)

  • "The Rules of the Component Object Model" (MSDN Library, Technical Articles)

  • "The Distributed Component Object Model: A Business Overview" (MSDN Library, Backgrounders)

COM References

COM+ provides you with an extensive set of services, many of which can be used from ASP applications without first having to create a COM component. For more information on how to configure these services on the COM+ side or how to use them in Visual Studio applications, please view the following topics in the COM+ software developer kit (SDK) or online at COM+ (Component Services) or COM+ Programmer's Reference:

  • COM+ Services without Components: This topic contains conceptual information about writing code that can use component services without the need to create COM+ components.

  • CoCreateActivity: This method creates an activity to do synchronous or asynchronous batch work that can use COM+ services without needing to create a COM+ component.

  • CoEnterServiceDomain, CoLeaveServiceDomain: These methods are used in pairs to surround code that can then use COM+ services. This eliminates the need to create a COM+ component for the sole purpose of using a COM+ service.

  • CServiceConfig: This class is used to specify and configure the services that are active in the service domain that you enter when calling CoCreateActivity or CoEnterServiceDomain.

ms524918.alert_caution(en-us,VS.90).gifImportant Note:

Batch Logon is required for COM+ server-activated application identities. COM+ will add this automatically when you enter a new account for the identity of a COM+ application using the UI. Batch Logon gives your application the ability to execute code across servers, but does not allow the account to logon interactively to home server.

Interfaces and Objects

The COM Library provides a standard set of interfaces that you can use to develop components. If you find that these interfaces do not meet your exact requirements, you can create your own interfaces. Microsoft has published guidelines to assist you in designing COM interfaces and objects. Two good sources for information on this area are:

  • "Designing COM Interfaces" ( Object Services)

  • "Component Object Model Specification," Chapter 3 (MSDN Library, Specifications)