![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
To access the contents, click the chapter and section titles.
Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6!
Remote Automation Connection ManagerIf your applications software components are going to be scattered across the network, an obvious problem is how a particular client application is going to know where its various components are located. Solving that problem is the job of the Remote Automation Connection Manager (RACM), which supplies a user-friendly interface with which you can tell your system where to find a particular component. This program (RACMGR32.EXE) is located in the System folder (Windows 95/98) or in the System32 folder (Windows NT). The RACM displays a list of all available component classes, as shown in Figure 24.1. The right side of the dialog box is used to specify the details of how a client application can make contact with the remote component. This information includes the network address of the remote computer where a component is located, the network protocol to be used for communication, and if required, the level of authentication to be used. Additional security options are set on the Client Access tab of the RACM.
Behind the scenes of the RACM, the components address in the registry is being changed between local and remote. When a specific component is specified as remote, the local symbol at the top of the RACM dialog box changes to a remote symbol (two connected boxes). You can quickly switch a specific component between local and remote, and back again, by selecting the appropriate command from the Register menu. Be aware, however that the RACM does not test the validity of the remote connection that you specify. Perhaps the best way to think about the RACM is as a type of telephone directory. When you want to talk to someone, you dont really care where they are located, as long as you have the proper phone number to reach them. When you use the RACM to specify a components remote location, you essentially are changing its phone number in the registry. Automation ManagerFor a component to be available remotely, the computer on which it is located must be running the Automation Manager. This program, located in the System directory as AUTMGR32.EXE, runs in the background and intercepts client requests that come over the network. As Figure 24.2 shows, the Automation Managers window displays the number of current connections and the number of objects currently connected to.
Visual Component ManagerUndeniably, you cannot benefit from a software component if you dont know that it exists. This problem is particularly acute in larger organizations where several, or even dozens, of people may be involved in writing applications for the enterprise. Joe Schmoe down the hall may already have written just the component that you need for your projectbut how are you supposed to know about it? For component reuse to become reality, individual programmers need information not only about which components are available, but how each component can be used, as well. The Visual Component Manager, shown in Figure 24.3, performs this job. You start the Visual Component Manager (VCM) from Visual Basics View menu. Using the Visual Component Manager involves three parts. First, a component must be published, so that information about it is included in the VCM database. To publish a component, load the project files into Visual Basic and select Publish from the Tools menu. The Tools menu presents the following two options:
Note that you can publish a component both as source files and as build outputs. Whichever publishing option you select, the Publishing Wizard walks you through the steps that are required in the publishing process, such as entering a description and selecting keywords for the component. Other ways to commence the publishing process are to right-click in the VCM dialog box and select New from the shortcut menu, or to select the component in Windows Explorer and drag it to a folder in the VCM. The second part of using Visual Component Manager is to find components. If a programmer needs a component for a specific task, the programmer can open the VCM and search to see whether a suitable component has been published. The VCM provides a flexible keyword and search mechanism. Components can be located by their name, type, description, keywords, and annotations. You dont even need to know a components name to find it. Of course, the usefulness of the VCMs search capabilities is completely dependent on the care that is used when components are published. If a component is published with too little descriptive detail, or with inappropriate keywords, then finding it in the VCM database will be difficult or impossible for other programmers. After a component is located, the final part of the VCM is to add the component to your Visual Basic project. This is probably the simplest part of using Visual Component Managersimply right-click on the component in the VCM and select Add To Project from the shortcut menu. If the component requires COM registration, the VCM automatically performs this task. Summing UpThis has been an extremely superficial introduction to client/server programming. It is a very complex subject, and I cant do more than scratch the surface within a single chapter. At least you now have some idea of the techniques and capabilities of this powerful tool, and are equipped to seek out additional information if you ever need to use client/server programming. Numerous books are available that are devoted entirely to this subject.
|
![]() |
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |