The most straightforward way to begin understanding COM is to look at it from the perspective of a client application. Ultimately, the goal of
COM programming is to make useful objects available to client applications. Once you understand the client, then understanding servers
becomes significantly easier. Keeping clients and servers straight can be confusing; and COM tends to make the picture more complex when
you are first learning the details. Therefore, let's start with the simplest definition: A COM client is a program that uses COM to call methods on
a COM server. A straightforward example of this client/server relationship would be a User Interface application (the client) that calls methods
on another application (the server). If the User Interface application calls those methods using COM, then the user Interface application is, by
definition, a COM client.
We are belaboring this point for good reason - the distinction between COM servers and clients can get (and often is) much more complex.
Many times, the application client will be a COM server, and the application's server will be a COM client. It's quite common for an application
to be both a COM client and server. In this chapter, we will keep the distinction as simple as possible and deal with a pure COM client.
0 comments:
Post a Comment