# Locating a Remote Object

With the advent of COM for distributed systems, COM uses the basic model for object creation described in OLE Class Objects and CLSIDs, and adds more than one way to locate an object that may reside on another system in a network, without overburdening the client application.

COM has added registry keys that permit a server to register the name of the machine on which it resides, or the machine where an existing storage is located. Thus, client applications, as before, need know only the CLSID of the server.

However, for cases where it is desired, COM has replaced a previously reserved parameter of CoGetClassObject with a COSERVERINFO structure, which allows a client to specify the location of a server. Another important value in this function is the CLSCTX enumeration, which specifies whether the expected object is to be run in-process, out-of-process local, or out-of-process remote. Taken together, these two values and the values in the registry determine how and where the object is to be run. Instance creation calls, when they specify a server location, can override a registry setting. The algorithm OLE uses for doing this is described in the reference for the CLSCTX enumeration.

The client and server machines must both be members of domains with a trust relationship for all types of remote activation.