home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / SAMPLES / COMPILER / SAMPLE05 / READ.ME < prev    next >
Text File  |  1993-05-07  |  2KB  |  43 lines

  1. The sample program SAMPLE05 shows how to create a simple subsystem DLL and a
  2. program to access it.
  3.  
  4. The DLL keeps a global count of the number of processes that access it,
  5. running totals for each process that accesses the subsystem, and a grand
  6. total for all processes.  There are two external entry points for programs
  7. accessing the subsystem.  The first is DLLINCREMENT, which increments both
  8. the grand total and the total for the calling process by the amount passed
  9. in.  The second entry point is DLLSTATS, which prints out statistics kept by
  10. the subsystem, including the grand total and the total for the current
  11. process.
  12.  
  13. The grand total and the total for the process are stored in a single shared
  14. data segment of the subsystem. Each process total is stored in its own data
  15. segment.
  16.  
  17. The files for the sample program are:
  18.  
  19. SAMPLE05.C        The source for the functions in the DLL
  20. SAMPLE05.H        The user include file
  21. SAMPLE05.DEF      The module definition file for the DLL
  22.  
  23. MAIN05.C          The source for the main program that accesses the subsystem
  24. MAIN05.DEF        The module definition file for MAIN05.C
  25.  
  26. To build the sample program, use the supplied make files:
  27.  
  28. MAKE05S           Builds MAIN05.EXE and SAMPLE05.DLL. The compiler libraries
  29.                   are linked statically.
  30.  
  31. MAKE05D           Builds MAIN05.EXE and SAMPLE05.DLL. The compiler libraries
  32.                   are linked dynamically.
  33.  
  34. For example:
  35.  
  36.     nmake all -f make05d
  37.  
  38. To clean up after the sample program has been built and run, type the following
  39. command:
  40.  
  41.     nmake clean -f make05d
  42.  
  43.