home *** CD-ROM | disk | FTP | other *** search
/ PC Press 1997 July / Sezamfile97_2.iso / windows / program / activex / axtsamp.exe / TSBRANCH.EXE / MARSHAL / MARSHAL.TXT < prev    next >
Text File  |  1997-01-05  |  5KB  |  100 lines

  1.  
  2. MARSHAL - Standard Marshaling of Custom Interfaces
  3.  
  4.  
  5. SUMMARY
  6. =======
  7.  
  8. The MARSHAL sample anticipates the interaction of client and
  9. out-of-process server in the LOCCLIEN and LOCSERVE samples. For the
  10. LOCCLIEN client to use the services in the LOCSERVE server requires
  11. marshaling of the car-related interfaces used in the previous COM samples.
  12. This code sample creates a standard marshaling server for the ICar,
  13. IUtility, and ICruise custom interfaces.
  14.  
  15. The Microsoft Interface Definition Language (MIDL) compiler is used to
  16. compile the interface specifications (expressed in MIDL in MICARS.IDL).
  17. MIDL.EXE is a utility provided as part of the Win32 SDK. The MIDL
  18. compilation of MICARS.IDL produces additional source files: MICARS.H,
  19. MICARS_I.C, MICARS_P.C, and DLLDATA.C.
  20.  
  21. In the series of ActiveX Tutorial code samples, MARSHAL works with the
  22. LOCSERVE and LOCCLIEN code samples to illustrate a COM client using the
  23. interfaces on COM objects in an out-of-process local server. In these
  24. lessons, only standard marshaling is used for the custom ICar, IUtility,
  25. and ICruise interfaces.
  26.  
  27. For functional descriptions and a tutorial code tour of MARSHAL, see the
  28. Code Tour section in MARSHAL.HTM. For details on setting up the
  29. programmatic usage of MARSHAL, see the Usage section in MARSHAL.HTM. To
  30. read MARSHAL.HTM, run TUTORIAL.EXE in the main tutorial directory and
  31. click the MARSHAL lesson in the table of lessons. You can also achieve the
  32. same thing by clicking the MARSHAL.HTM file after locating the main
  33. tutorial directory in the Windows Explorer. See also LOCSERVE.HTM and
  34. LOCCLIEN.HTM in the main tutorial directory for more details on this
  35. client and server and how MARSHAL.DLL supports their operation. Because
  36. those code samples rely on MARSHAL.DLL, you must build this MARSHAL DLL
  37. before building or running LOCCLIEN and LOCSERVE. MARSHAL's makefile
  38. automatically registers MARSHAL's proxy and stub interface handlers in the
  39. system registry. This registration must be done before these interfaces
  40. can be used by COM clients or servers in the LOCSERVE, LOCCLIEN, and later
  41. samples of the series.
  42.  
  43. MARSHAL's self-registration is done using the REGISTER.EXE utility built
  44. in the REGISTER sample. To build or run MARSHAL, you should build the
  45. REGISTER code sample first.
  46.  
  47. For details on setting up your system to build and test the code samples
  48. in this ActiveX Tutorial series, see TUTORIAL.HTM. The supplied MAKEFILE
  49. is Microsoft NMAKE-compatible. To create a debug build, issue the NMAKE
  50. command in the Command Prompt window.
  51.  
  52. Usage
  53. -----
  54.  
  55. MARSHAL is a DLL that is built solely as a marshaling DLL for the
  56. specified interfaces. Though it can be implicitly loaded by linking to its
  57. associated .LIB file, it is normally used on behalf of a COM client of an
  58. out-of-process server, in which case it is automatically loaded by COM as
  59. needed. Before COM can find and load the MARSHAL DLL to support marshaling
  60. of its supporeted interfaces, the MARSHAL server must be registered in the
  61. registry as the marshaling server for those interfaces. MARSHAL is a
  62. self-registering in-process server. The makefile that builds this sample
  63. automatically registers the server in the registry. You can manually
  64. initiate its self-registration by issuing the following command at the
  65. command prompt in the MARSHAL directory:
  66.  
  67.   nmake register
  68.  
  69. You can also directly invoke the REGISTER.EXE command at the command prompt
  70. while in the MARSHAL directory.
  71.  
  72.   ..\register\register.exe marhsal.dll
  73.  
  74. These registration commands require a prior build of the REGISTER sample
  75. in this series, as well as a prior build of MARSHAL.DLL.
  76.  
  77.  
  78. FILES
  79. =====
  80.  
  81. Files        Description
  82.  
  83. MARSHAL.TXT  This file.
  84. MAKEFILE     The generic makefile for building the MARSHAL.DLL
  85.              code sample.
  86. MARSHAL.CPP  The main implementation file for MARSHAL.DLL. Has DllMain
  87.              and the self-registration functions.
  88. MARSHAL.RC   The DLL resource definition file for the executable.
  89. MARSHAL.ICO  The icon resource for the executable.
  90. MICARS.IDL   The MIDL interface specifications for ICar, IUtility,
  91.              and ICruise.
  92. MICARS.H     Produced by compiling MICARS.IDL. The interface include
  93.              file for the specified interfaces.
  94. MICARS_I.C   Produced by compiling MICARS.IDL. The data definitions
  95.              of the GUIDs for the marshaled interfaces.
  96. MICARS_P.C   Produced by compiling MICARS.IDL. The actual proxy and
  97.              stub functions for the interface methods.
  98. DLLDATA.C    Produced by compiling MICARS.IDL. DLL data routines for
  99.              the proxies.
  100.