# COM Clients and Servers

A critical part of COM is how clients and servers interact. A COM server is any object that provides services to clients. These services are in the form of implementations of COM interfaces that can be called by any client who is able to get a pointer to one of the interfaces on the server object. There are two main types of servers, in-process and out-of-process. In-process servers are implemented in a dynamic linked library (DLL), and out-of-process servers are implemented in an EXE file. Out-of-process servers can reside either on the local machine or on a remote machine.

A COM client is whatever code or object gets a pointer to a COM server, and uses its services by calling the methods of its interfaces.

The COM programming model and constructs have now been extended so that COM clients and servers can work together across the network, not just within a given machine. This has been done so existing applications can interact with new applications and with each other across networks with proper administration, while new applications can be written to take advantage of networking features.

In addition, client applications do not need to be aware of how server objects are packaged, whether they are packaged as in-process objects (in dynamic-link libraries), or as local or remote objects (in executables). Distributed COM further allows objects to be packaged as NT Services, synchronizing OLE with the rich administrative and system-integration capabilities of NT.

Also introduced are new features that complement existing OLE features with the security required to build distributed component software. For more information, refer to Security in COM_com_Security_in_COM.

With the increasing importance of distributed systems, COM has been extended to allow this location transparency to extend across a network for applications written for single machines, while adding features that extend these capabilities and add the security necessary in a network.

COM specifies a mechanism by which the class code can be used by many different applications.

For information on how COM enables client/server interaction, see the following:

- Getting a Pointer to an Object

- Creating an Object through a Class Object

- COM Server Responsibilities

- Persistent Object State

- Security in COM

- Providing Class Information

- Inter-object Communication

- Call Synchronization