home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sysmgmt / sms / smsapi / tree / readme.txt < prev    next >
Text File  |  1996-10-15  |  2KB  |  103 lines

  1.  
  2. Sample: tree
  3. ============
  4.  
  5. DESCRIPTION:
  6.  
  7.  
  8. This program illustrates the self-describing nature of the objects in the
  9. API set. Using the SmsEnum APIs it stores lists of all containers, folders,
  10. and filters known to the API engine.
  11.  
  12. It then scans each container in the container list, displaying first of all
  13. information about the container, and then information about what is
  14. contained within the container. The following information is displayed:
  15.  
  16. * the container tag and type
  17. * the number of filters activated by this container
  18. * a description of each of these filters
  19.  
  20. * the number of folder types that can be container in the container
  21. * a description of each of these folders.
  22.  
  23. The information displayed for a filter is:
  24. * the filter's tag and type
  25. * the names of the fields used by the filter's tokens
  26.   (these will be used as the labels for edit controls in a GUI program).
  27.  
  28. The information displayed for a folder is:
  29. * the folder's tag and type
  30. * filter details (as in container)
  31. * the number of scalars along with their names, type, and access mode
  32. * a recursive display of any sub-folders that can be contained within this
  33.   folder.
  34.  
  35.  
  36. API USAGE:
  37.     SmsAPIVer
  38.     SmsEnumContainers
  39.     SmsEnumFilters
  40.     SmsEnumFolders
  41.  
  42.  
  43. Psuedo-code:
  44. The following is a psuedo-code for this program.
  45.  
  46. begin
  47.     Call the SmsEnum APIs to retrieve lists of
  48.     containers, folders, and filters.
  49.  
  50.  
  51.     for each container
  52.     begin
  53.  
  54.         display container tag and type
  55.  
  56.         display count of filters activated by this container
  57.  
  58.         for each filter that can be activated here
  59.         begin
  60.             display filter
  61.         end
  62.  
  63.  
  64.         for each folder that can be contained here
  65.         begin
  66.             display folder
  67.         end
  68.  
  69.     end
  70.  
  71. end
  72.  
  73.  
  74. display filter
  75. begin
  76.     display filter tag and type
  77.     display its properties (ie fields used in tokens)
  78. end
  79.  
  80.  
  81. display folder
  82. begin
  83.     locate folder in list returned by SmsEnumFolders
  84.     display tag and type
  85.     check if already displayed in this container hierarchy
  86.     display number of filters activated by this folder
  87.     display filters (as above)
  88.     display scalars
  89.     recursively display sub-folders
  90. end
  91.  
  92.  
  93.  
  94. display scalars
  95. begin
  96.     display number of scalars
  97.  
  98.     for each scalar
  99.         display its name, type, and access mode
  100.     end
  101. end
  102.  
  103.