Server Flavors: In-Process and Out-Of-Process

As defined in the last section, a server in general is some piece of code that structures some object in such a way that COM implementor locator services can run that code and have it create objects. The section below, The COM Library, expands on the specific responsibilities of COM in this sense.

Any specific server can be implemented in one of a number of flavors depending on the structure of the code module and its relationship to the client process that will be using it. A server is either in-process which means its code executes in the same process space as the client, or out-of-process which means it runs in another process on the same computer or in another process on a remote computer. These three types of servers are called in-process, local, and remote, as defined below:

Note that the same words in-process, local, and remote are used in this specification as a qualifier for the word object where emphasis is on the object more than the server.

Object implementors choose the type of server based on the requirements of implementation and deployment. COM is designed to handle all situations from those that require the deployment of many small, lightweight in-process objects (like controls, but conceivably even smaller) up to those that require deployment of a huge central corporate database server. Furthermore, COM does so in a transparent fashion, with what is called location transparency, the topic of the next section.