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

  1.  
  2. DLLSERVE - COM Server in a DLL
  3.  
  4.  
  5. SUMMARY
  6. =======
  7.  
  8. The DLLSERVE sample begins with the car-related COM Objects of the previous
  9. COMOBJ lesson and refashions them into components. To do so requires little
  10. change to the COM objects themselves (COCar, COUtilityCar, and COCruiseCar).
  11. But to envelop them as components, this lesson introduces new facilities to
  12. house them in a DLL COM server. These facilities include class factories for
  13. each component and a CarSample utility component that allows clients to see
  14. logged behavior in the server itself.
  15.  
  16. The DLL server provides the following components: Car, UtilityCar, CruiseCar,
  17. and CarSample.
  18.  
  19. In the series of ActiveX tutorial code samples, DLLSERVE works with the
  20. DLLCLIEN code sample to illustrate DLLSERVE's COM server facilities for
  21. creating components that can be used by an EXE client and the subsequent
  22. manipulation of those components by DLLCLIEN.EXE.
  23.  
  24. For functional descriptions and a tutorial code tour of DLLSERVE, see the
  25. Code Tour section in DLLSERVE.HTM. For details on setting up the
  26. programmatic usage of DLLSERVE, see the Usage section in DLLSERVE.HTM. To
  27. read DLLSERVE.HTM, run TUTORIAL.EXE in the main tutorial directory and
  28. click the DLLSERVE lesson in the table of lessons. You can also achieve
  29. the same thing by clicking the DLLSERVE.HTM file after locating the main
  30. tutorial directory in the Windows Explorer. See also DLLCLIEN.HTM in the
  31. main tutorial directory for more details on the DLLCLIEN client
  32. application and how it works with DLLSERVE.DLL.
  33.  
  34. You must build DLLSERVE.DLL before building or running DLLCLIEN.
  35. DLLSERVE's makefile automatically registers DLLSERVE's components in the
  36. registry. These components must be registered before DLLSERVE is available
  37. to outside COM clients as a server for those components. This registration
  38. is done using the REGISTER.EXE utility built in the previous REGISTER
  39. lesson. To build or run DLLSERVE, you should build the REGISTER code
  40. sample first.
  41.  
  42. For details on setting up your system to build and test the code samples in
  43. this ActiveX Tutorial series, see TUTORIAL.HTM. The supplied MAKEFILE is
  44. Microsoft NMAKE-compatible. To create a debug build, issue the NMAKE command
  45. in the Command Prompt window.
  46.  
  47. Usage
  48. -----
  49.  
  50. DLLSERVE is a DLL that is meant to be used primarily as a COM server.
  51. Though it can be implicitly loaded by linking to its associated .LIB file,
  52. it is normally used after an explicit LoadLibrary call (usually from COM's
  53. CoGetClassObject function). Servers like DLLSERVE are registered in the
  54. registry. To use DLLSERVE in a COM client program, a client does not need
  55. to include DLLSERVE.H or link to DLLSERVE.LIB. A COM client of DLLSERVE
  56. obtains access solely through its components' CLSIDs and COM services. For
  57. DLLSERVE, those CLSIDs are CLSID_DllCar, CLSID_DllUtilityCar,
  58. CLSID_DllCruiseCar, and CLSID_DllCarSample. The DLLCLIEN lesson shows how
  59. this is done.
  60.  
  61.  
  62. FILES
  63. =====
  64.  
  65. Files         Description
  66.  
  67. DLLSERVE.TXT  This file.
  68. MAKEFILE      The generic makefile for building the DLLSERVE.DLL
  69.               code sample of this tutorial lesson.
  70. DLLSERVE.H    The include file for declaring as imported or defining as
  71.               exported the service functions in DLLSERVE.DLL.
  72. DLLSERVE.CPP  The main implementation file for DLLSERVE.DLL. Has DllMain
  73.               and the COM server functions (for example, DllGetClassObject).
  74. DLLSERVE.RC   The DLL resource definition file for the executable.
  75. DLLSERVE.ICO  The icon resource for the executable.
  76. SERVER.H      The include file for the server control C++ object. Also has
  77.               resource identifiers for resources stored inside DLLSERVE.DLL
  78.               and other external declarations that are used internally
  79.               within the modules of DLLSERVE.DLL.
  80. SERVER.CPP    The implementation file for the server control object.
  81. FACTORY.H     The include file for the server's class factory COM objects.
  82. FACTORY.CPP   The implementation file for the server's class factories.
  83. CAR.H         The include file for the COCar COM object class.
  84. CAR.CPP       The implementation file for the COCar COM object class.
  85. UTILCAR.H     The include file for the COUtililtyCar COM object class.
  86. UTILCAR.CPP   The implementation file for the COUtilityCar COM object class.
  87. CRUCAR.H      The include file for the COCruiseCar COM object class.
  88. CRUCAR.CPP    The implementation file for the COCruiseCar COM object class.
  89. SAMPLE.H      The include file for the COCarSample COM object class.
  90. SAMPLE.CPP    The implementation file for the COCarSample COM object class.
  91.