home *** CD-ROM | disk | FTP | other *** search
-
- LOCCLIEN - Client of Out-of-process Local Server
-
-
- SUMMARY
- =======
-
- The LOCCLIEN sample presents the same series of car-related components
- that were studied in previous lessons. The LOCCLIEN/LOCSERVE client/server
- pair is analogous to the DLLCLIEN/DLLSERVE pair. The main difference is
- that LOCCLIEN must cross process boundaries to access components in the
- out-of-process local server LOCSERVE. In contrast, DLLCLIEN could directly
- access components in the in-process server DLLSERVE. The LOCCLIEN lesson
- illustrates how a client can access and control components in an
- out-of-process local server.
-
- The COM objects that LOCCLIEN manipulates are the car-related ones of
- previous samples, with the following interfaces: ICar, IUtility, and
- ICruise. LOCCLIEN works in conjunction with the separate LOCSERVE.EXE,
- which provides the COCar, COUtilityCar, and COCruiseCar COM objects.
-
- LOCCLIEN.EXE creates its own COUtilityCruiseCar COM object, which is
- constructed by reusing the COCruiseCar COM object by containment and
- augmenting it with a native implementation of the IUtility interface.
- Because the COCruiseCar COM object class is an aggregate--that is, it
- reuses an inner COCar object by aggregation--LOCCLIEN illustrates nesting
- COM objects by mixed reuse. The composite COUtilityCruiseCar object is
- constructed by containment reuse of COCruiseCar, another composite COM
- object. COCruiseCar is constructed by aggregation reuse of the COCar COM
- object. The composition of COUtilityCruiseCar is also interesting because
- the COUtilityCruiseCar object's containment of the COCruiseCar object
- crosses the process boundary between LOCCLIEN and the out-of-process local
- server LOCSERVE.EXE. LOCCLIEN thus relies on standard marshaling support
- for the custom interfaces it uses on the COCruiseCar object. This
- marshaling support was separately built as MARSHAL.DLL in the earlier
- MARSHAL code sample.
-
- For functional descriptions and a tutorial code tour of LOCCLIEN, see the
- Code Tour section in LOCCLIEN.HTM. For details on the external user
- operation of LOCCLIEN, see both the Usage and Operation sections in
- LOCCLIEN.HTM. To read LOCCLIEN.HTM, run TUTORIAL.EXE in the main tutorial
- directory and click the LOCCLIEN lesson in the table of lessons. You can
- also achieve the same thing by clicking the LOCCLIEN.HTM file after
- locating the main tutorial directory in the Windows Explorer. See also
- LOCSERVE.HTM in the main tutorial directory for more details on how
- LOCSERVE works and exposes its services to LOCCLIEN. You must build
- LOCSERVE.EXE before building LOCCLIEN. The makefile for LOCSERVE
- automatically registers that server in the registry, so you must build
- LOCSERVE before attempting to run LOCCLIEN.
-
- Because client and server reside in separate processes, both LOCCLIEN and
- LOCSERVE rely on marshaling for the ICar, IUtility, and ICruise interfaces.
- This support was provided by the previous MARSHAL code sample, so you must
- also build the MARSHAL code sample prior to building and running LOCCLIEN
- and LOCSERVE.
-
- For details on setting up your system to build and test the code samples
- in this COM Tutorial series, see TUTORIAL.HTM. The supplied MAKEFILE is
- Microsoft NMAKE-compatible. To create a debug build, issue the NMAKE
- command in the Command Prompt window.
-
- Usage
- -----
-
- LOCCLIEN is an application that you can execute directly from Windows in
- the normal manner or from the Command Prompt window. No command line
- parameters are recognized by LOCCLIEN.
-
-
- FILES
- =====
-
- Files Description
-
- LOCCLIEN.TXT This file.
- MAKEFILE The generic makefile for building the code sample
- application of this tutorial lesson.
- LOCCLIEN.H The include file for the LOCCLIEN application. Contains
- class declarations, function prototypes, and resource
- identifiers.
- LOCCLIEN.CPP The main implementation file for LOCCLIEN.EXE. Has WinMain
- and CMainWindow implementation, as well as the main menu
- dispatching.
- LOCCLIEN.RC The application resource definition file.
- LOCCLIEN.ICO The application icon resource.
- UTCRUCAR.H The class declaration for the COUtilityCruiseCar COM object.
- UTCRUCAR.CPP Implementation file for the COUtilityCruiseCar COM object.
- Also has the definition of the CreateUtilityCruiseCar
- function.
-