home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / tutsamp / locclien / locclien.txt < prev    next >
Encoding:
Text File  |  1997-08-05  |  4.3 KB  |  90 lines

  1.  
  2. LOCCLIEN - Client of Out-of-process Local Server
  3.  
  4.  
  5. SUMMARY
  6. =======
  7.  
  8. The LOCCLIEN sample presents the same series of car-related components
  9. that were studied in previous lessons. The LOCCLIEN/LOCSERVE client/server
  10. pair is analogous to the DLLCLIEN/DLLSERVE pair. The main difference is
  11. that LOCCLIEN must cross process boundaries to access components in the
  12. out-of-process local server LOCSERVE. In contrast, DLLCLIEN could directly
  13. access components in the in-process server DLLSERVE. The LOCCLIEN lesson
  14. illustrates how a client can access and control components in an
  15. out-of-process local server.
  16.  
  17. The COM objects that LOCCLIEN manipulates are the car-related ones of
  18. previous samples, with the following interfaces: ICar, IUtility, and
  19. ICruise. LOCCLIEN works in conjunction with the separate LOCSERVE.EXE,
  20. which provides the COCar, COUtilityCar, and COCruiseCar COM objects.
  21.  
  22. LOCCLIEN.EXE creates its own COUtilityCruiseCar COM object, which is
  23. constructed by reusing the COCruiseCar COM object by containment and
  24. augmenting it with a native implementation of the IUtility interface.
  25. Because the COCruiseCar COM object class is an aggregate--that is, it
  26. reuses an inner COCar object by aggregation--LOCCLIEN illustrates nesting
  27. COM objects by mixed reuse. The composite COUtilityCruiseCar object is
  28. constructed by containment reuse of COCruiseCar, another composite COM
  29. object. COCruiseCar is constructed by aggregation reuse of the COCar COM
  30. object. The composition of COUtilityCruiseCar is also interesting because
  31. the COUtilityCruiseCar object's containment of the COCruiseCar object
  32. crosses the process boundary between LOCCLIEN and the out-of-process local
  33. server LOCSERVE.EXE. LOCCLIEN thus relies on standard marshaling support
  34. for the custom interfaces it uses on the COCruiseCar object. This
  35. marshaling support was separately built as MARSHAL.DLL in the earlier
  36. MARSHAL code sample.
  37.  
  38. For functional descriptions and a tutorial code tour of LOCCLIEN, see the
  39. Code Tour section in LOCCLIEN.HTM. For details on the external user
  40. operation of LOCCLIEN, see both the Usage and Operation sections in
  41. LOCCLIEN.HTM. To read LOCCLIEN.HTM, run TUTORIAL.EXE in the main tutorial
  42. directory and click the LOCCLIEN lesson in the table of lessons. You can
  43. also achieve the same thing by clicking the LOCCLIEN.HTM file after
  44. locating the main tutorial directory in the Windows Explorer. See also
  45. LOCSERVE.HTM in the main tutorial directory for more details on how
  46. LOCSERVE works and exposes its services to LOCCLIEN. You must build
  47. LOCSERVE.EXE before building LOCCLIEN. The makefile for LOCSERVE
  48. automatically registers that server in the registry, so you must build
  49. LOCSERVE before attempting to run LOCCLIEN.
  50.  
  51. Because client and server reside in separate processes, both LOCCLIEN and
  52. LOCSERVE rely on marshaling for the ICar, IUtility, and ICruise interfaces.
  53. This support was provided by the previous MARSHAL code sample, so you must
  54. also build the MARSHAL code sample prior to building and running LOCCLIEN
  55. and LOCSERVE.
  56.  
  57. For details on setting up your system to build and test the code samples
  58. in this COM Tutorial series, see TUTORIAL.HTM. The supplied MAKEFILE is
  59. Microsoft NMAKE-compatible. To create a debug build, issue the NMAKE
  60. command in the Command Prompt window.
  61.  
  62. Usage
  63. -----
  64.  
  65. LOCCLIEN is an application that you can execute directly from Windows in
  66. the normal manner or from the Command Prompt window. No command line
  67. parameters are recognized by LOCCLIEN.
  68.  
  69.  
  70. FILES
  71. =====
  72.  
  73. Files          Description
  74.  
  75. LOCCLIEN.TXT   This file.
  76. MAKEFILE       The generic makefile for building the code sample
  77.                application of this tutorial lesson.
  78. LOCCLIEN.H     The include file for the LOCCLIEN application. Contains
  79.                class declarations, function prototypes, and resource
  80.                identifiers.
  81. LOCCLIEN.CPP   The main implementation file for LOCCLIEN.EXE. Has WinMain
  82.                and CMainWindow implementation, as well as the main menu
  83.                dispatching.
  84. LOCCLIEN.RC    The application resource definition file.
  85. LOCCLIEN.ICO   The application icon resource.
  86. UTCRUCAR.H     The class declaration for the COUtilityCruiseCar COM object.
  87. UTCRUCAR.CPP   Implementation file for the COUtilityCruiseCar COM object.
  88.                Also has the definition of the CreateUtilityCruiseCar
  89.                function.
  90.