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 / mgrp / readme.txt < prev   
Encoding:
Text File  |  1996-10-15  |  1.4 KB  |  34 lines

  1.     SMS API Example: creation of machine group (mgrp.exe)
  2.     =====================================================
  3.  
  4. This sample shows how to create a machine group using the SMS API.
  5.  
  6. Currently the API only allows top-level machine groups to be created, in
  7. other words you cannot a) modify existing machine groups, and b) you
  8. cannot create nested machine groups.
  9.  
  10. There has been one addition to the API set in order to enable this; this is
  11. the SmsDupFolder API.
  12.  
  13. The sample opens a machine container, and a machine group container.
  14. From the machine container we select the machines that we want inserted into
  15. the machine group that we are about to create. In this example we just select
  16. all the Personal Computer architecture machines, a real-world usage would be
  17. more judicious in its selection.
  18.  
  19. From the machine group container we create a new machine group folder.
  20. We then enter a loop duplicating each machine folder (SmsDupFolder) and
  21. inserting it into the machine group folder (SmsLinkFolder) and committing
  22. the insertion.
  23.  
  24. When the loop terminates we set the scalars for the new machine group folder.
  25. There are two scalars: Name and Comment. The Comment is optional and can be
  26. any text string. The name however, must be unique. This is solicited from the
  27. user.
  28.  
  29. The new folder is then linked and committed.
  30.  
  31. The contents of this machine group folder are then displayed. Note that this
  32. can be very lengthy.
  33.  
  34.