SVS, COM, and DCOM - Experience by Example
One of the building blocks of many modern applications is the Component Object Model (COM). COM allows for functionality to be shared between applications. Distributed COM (DCOM) has the same goals as COM but allows for the COM object to reside in another application or on a different computer.
SVS handles many of the situations that arise when conflicts occur with COM components. Conflicts can happen in the registry or on the file system. The registry contains the information telling where COM / DCOM objects reside, in a local DLL, local process, or a remote process. If the COM object resides on the local computer you may also have file conflicts: two DLLs in the same location with the same name. SVS allows for all of these conflicts to be resolved effectively so COM and DCOM work properly. As you go through the scenarios listed below feel free to explore the layers to get a better understanding of what is happening.
To setup the tests you must do the following:
- Extract the .ZIP file to the system directory (example C:\). This is needed to ensure you can see all of the file conflicts.
- Import all the layers from the VSA directory.
- Run the scenarios in the COM_DCOM directory. See the Scenario Description section below for more details on each scenario.
- To do the DCOM examples with remote computers, you will need to change which computer the DCOM object is requested from and modify the Windows security to allow for the DCOM object to be requested remotely.
Note: The scenarios use an application called COM_Client.exe. This application requests a COM object, asks the object for its version and then prints the COM objects' version. Each layer has an associated COM_Client_X.exe and COM object registered. For example, the layer COM_1 has COM_Client_1.exe and a COM component registered that returns version 1.
The exceptions are:
- The base system has COM_Client.exe and a COM component that has a version of 0.
- COM_Client_Layer has COM_Client_layer.exe and does not have a COM component registered.
Scenario Description:
The following scenarios discuss:
- Basic COM (scenarios 1-5)
- COM with registry conflicts (scenarios 6-9)
- COM with file system conflicts (scenarios 10-13)
- Basic DCOM (scenarios 14-19)
- Advanced DCOM (scenarios 20-21)
Basic COM (scenarios 1-5)
These scenarios show SVS basic usage of COM objects.
Scenario_01.cmd
Demonstrates the interaction between SVS and a basic COM object. In this basic setup, the COM component is installed on the base system, and is used by an application on the base system.

Scenario_02.cmd
Demonstrates the interaction between SVS and a basic COM object. In this basic setup the COM component is installed on the base system, and is used by an application in an application layer

Scenario_03.cmd
Demonstrates the interaction between SVS and a basic COM object. In this basic setup the COM component is installed in an application layer, and is used by an application on the base system.

Scenario_04.cmd
Demonstrates the interaction between SVS and a basic COM object. In this basic setup the COM component is installed in an application layer, and is used by an application in the same application layer.

Scenario_05.cmd
Demonstrates the interaction between SVS and a basic COM object. In this basic setup the COM component is installed in an application layer, and is used by an application in a different application layer.

COM WITH REGISTRY CONFLICTS (scenarios 6-9)
Demonstrates how SVS handles registry conflicts with COM components.
Scenario_06.cmd
Demonstrates the interaction between multiple SVS application layers, each using a different version of the same COM object. This is done by having the application and the appropriate version of the COM object installed in the same layer.
Scenario_07.cmd
Demonstrates how to use priorities to get deterministic results when there is a registry conflict. This is done by having the same COM component registered in 2 application layers. The application using COM will reside in the base.
Scenario_08.cmd
Demonstrates how to use priorities to get deterministic results when there is a registry conflict. This is done by having the same COM component registered in 2 application layers. The application using COM will reside in a third application layer.
Scenario_09.cmd
Demonstrates how to use priorities to get deterministic results when there is a registry conflict. This is done by having a COM component registered on the base system and in an application layer. The application on the base needs the COM on the base and the application in the layer needs the COM in the layer.
COM WITH FILE SYSTEM CONFLICTS (Scenarios 10-13)
These scenarios demonstrate how SVS manages file conflicts with COM components.
Scenario_10.cmd
Demonstrates how file conflicts are managed with SVS. This is done by having the 2 versions of the COM object registered. One is on the base system the other is in an application layer. The application on the base needs the COM object on the base and the application in the layer needs the COM object in the layer.
Scenario_11.cmd
Demonstrates how file conflicts are managed with SVS. This is done by having 2 versions of a COM object. Each COM object resides in its own layer. The application in the layer needs to see the COM object in its layer.
Scenario_12.cmd
Demonstrates how priorities are used to change the visibility of COM objects that reside in application layers. The application will reside on the base system and the COM objects will reside in 2 different application layers.
Scenario_13.cmd
Demonstrates how priorities are used to change the visibility of COM objects that reside in application layers. The application will reside in a third application layer and the COM objects will reside in 2 different application layers.
DCOM
The main difference between COM and DCOM is where the object resides. With COM the object resides in the local application, but with DCOM the object may reside in another application or potentially on a different computer. Another difference is how an object is looked up. In the case of COM the lookup is done in the context of the current application, with DCOM svchost.exe does the lookup for you. Since a DCOM object is looked up by svchost.exe all lookup is done from the perspective of the base system.
BASIC DCOM (Scenarios 14-19)
These scenarios demonstrate the basic use of DCOM.
Scenario_14.cmd
Demonstrates that an application on the base system can communicate with an application in a layer through DCOM.

Scenario_15.cmd
Demonstrates that an application in the same layer as a DCOM service can communicate through DCOM.

Scenario_16.cmd
Demonstrates that an application in a different layer can communicate with a DCOM service that resides in another application layer.

Scenario_17.cmd
Demonstrates that an application on the base system can use DCOM registered in an application layer to request an object on a remote computer.

Scenario_18.cmd
Demonstrates that an application with a registered DCOM object in its layer can use a DCOM object on a remote computer.

Scenario_19.cmd
Demonstrates that an application in a different application layer can use a DCOM object registered in another application layer that resides on a remote computer.

Advanced DCOM(Scenarios 20-21)
Scenario_20.cmd
Demonstrates how to quickly change out a service that contains a different version of a DCOM object.
Scenario 21
Demonstrates how to quickly change which computer is pointed to when requesting a DCOM object.
SVS has demonstrated that it can handle file and registry conflicts easily and effectively. COM and DCOM work just like they do on your current system - maybe even a little better since the interactions with the file system and registry are virtualized.
| License: | AJSL By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License |
| Support: | User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab. |






























