Automation Concepts

An Automation server is an application that makes some of its functionality available through COM. However, most Automation servers are quite different from other kinds of COM components , especially ActiveX controls and the small COM components that were covered in Chapter 8, "Writing COM Components in C++." Those components exist primarily to offer services to applications. They have no user interface, or they have an interface designed to be part of a larger whole.

Automation servers are generally large and complicated applications: Visual Studio .NET 2003 is an automation server and so are all the applications in the Office family. Their primary purpose is to be used interactively by a user, but some (often most) of the functionality is also available through macros or other applications that can then automate the use of the application.

The sample applications in this chapter are written as console applications to make them as simple as possible, and use Word 2003 as the automation server. You should be able to apply these concepts to other automation servers and leverage other people's code wherever possible. The Office applications are marvelous opportunities to save work, because Office is installed on almost every computer that runs Windows.

In this chapter, you will see two ways to spell-check some text, and even to get spelling suggestions from Word for the misspelled words. Users ask for this sort of functionality in their applications, and the effort involved in developing a dictionary and writing all the code to check various forms of the same word is prohibitive for most applications. Letting Word do the work is very appealing, and you'll see shortly, it's simple too.

Microsoft Visual C++. NET 2003 Kick Start
Microsoft Visual C++ .NET 2003 Kick Start
ISBN: 0672326000
EAN: 2147483647
Year: 2002
Pages: 141
Authors: Kate Gregory

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: