Globally Unique Identifiers

Distributed COM

The Distributed Component Object Model (DCOM) is a protocol that enables software components to communicate directly over a network in a reliable, secure, and efficient manner.

click to view at full size.

Figure 5.5 Distributed COM Process Boundaries

Previously called Network OLE, DCOM is designed for use across multiple network transports. DCOM is based on the Open Software Foundation's DCE-RPC specification, and supports both Java applets and ActiveX components through the use of COM technology. For example, you could use Java to build a Web browser applet that calculates the value of a portfolio of securities, using DCOM to communicate stock values to the applet in real time over the Internet.

When the client and component reside on different machines, DCOM simply replaces the local interprocess communication with a network protocol. Neither the client nor the component is aware that the wire that connects them has just become a bit longer.

The Remote Automation Connection Manager

The access control level for a network computer can be set using the Remote Automation Connection Manager. To set the security policy, the Connection Manager must be installed and run on the remote computer. The Remote Automation Connection Manager that comes with Visual Basic 5.0 Enterprise Edition can be used to connect to COM sources through remote automation or DCOM.

The Client Access tab of the Connection Manager allows you to select a System Security Policy setting for a remote computer. The value column in the following table lists the values of the RemoteActivationPolicy preference setting:

Name Value Description
Disallow All Remote Do not allow any objects to be created.
Allow Remote Creates by Key 2 An object can be created only if the Allow Remote Activation check box is selected. This alters its CLSID in the Windows registry to include the following subkey setting:

AllowRemoteActivation=Y

Allow Remote Creates by ACL 3 A user can create an object only if the Access Control List for the CLSID in the Windows registry includes the user . (Windows NT only.)
Allow All Remote Creates 1 Allow any object to be created.

Lesson Summary

The Component Object Model (COM) defines how objects such as a Visual Basic application and a spreadsheet communicate and share data. COM's language independence allows unrelated objects to be reused in a variety of applications and software tools. This interaction is accomplished through the use of standard or custom COM interfaces. An interface is a contract between two objects that establishes:

  • A unique identifier to distinguish each interface.
  • The location of the functions in the interface.
  • The purpose of the function.
  • The arguments and return values to each function.

All objects must use the standard COM IUnknown interface, which manages all other interfaces used by an object. You can access members or functions of the COM object by using the object's IDispatch interface or virtual function table (VTBL).

COM uses globally unique identifiers (GUIDs) to identify every interface and every COM component class.

The Distributed Component Object Model (DCOM) is a protocol that enables software components to communicate transparently over a network in a reliable, secure, and efficient manner.



Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net