home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / xset1.exe / SCAN_SET.C next >
C/C++ Source or Header  |  1995-08-28  |  4KB  |  148 lines

  1. /**************************************************************************
  2. ** File: scan_set.c
  3. **
  4. ** Desc: Scan all setable parameters on the system.
  5. **
  6. **       <Detailed description>
  7. **
  8. **
  9. **   DISCLAIMER  
  10. **  
  11. **   Novell, Inc. makes no representations or warranties with respect to
  12. **   any NetWare software, and specifically disclaims any express or
  13. **   implied warranties of merchantability, title, or fitness for a
  14. **   particular purpose.  
  15. **
  16. **   Distribution of any NetWare software is forbidden without the
  17. **   express written consent of Novell, Inc.  Further, Novell reserves
  18. **   the right to discontinue distribution of any NetWare software.
  19. **   
  20. **   Novell is not responsible for lost profits or revenue, loss of use
  21. **   of the software, loss of data, costs of re-creating lost data, the
  22. **   cost of any substitute equipment or program, or claims by any party
  23. **   other than you.  Novell strongly recommends a backup be made before
  24. **   any software is installed.   Technical support for this software
  25. **   may be provided at the discretion of Novell.
  26. **
  27. **
  28. ** Programmers:
  29. **
  30. **    Ini   Who                  Firm
  31. **    ---------------------------------------------------------------------
  32. **    DWH   Dirk W. Howard       Novell Developer Support
  33. **
  34. **
  35. ** History:
  36. **
  37. **    When        Who      What
  38. **    ---------------------------------------------------------------------
  39. **    12-1-1994    DWH      First code.
  40. **
  41. */
  42.  
  43.  
  44. /**************************************************************************
  45. ** Include headers and macro definitions
  46. */
  47.  
  48.    /*------------------------------------------------
  49.    ** ANSI
  50.    */
  51.    #include <stdio.h>
  52.    #include <string.h>
  53.  
  54.    /*------------------------------------------------
  55.    ** NetWare
  56.    */
  57.    #include <advanced.h>
  58.    #include <conio.h>
  59.  
  60.    /*------------------------------------------------
  61.    ** Macros
  62.    */
  63.    #define  ALL_CATEGORIES    -1
  64.    #define  SELECTED_CATEGORY  0
  65.  
  66. void main()
  67. {
  68.    LONG  scanCategory = ALL_CATEGORIES;
  69.    LONG  scanSequence = 0;
  70.    BYTE  rParameterName[256];
  71.    LONG  rType;
  72.    LONG  rFlags;
  73.    LONG  rCategory;
  74.    BYTE  parameterDescription[1024];
  75.    BYTE  currentValue[256];
  76.    LONG  rLowerLimit;
  77.    LONG  rUpperLimit;
  78.    LONG  lcode = 0;
  79.    LONG  lnCnt = 0;
  80.    BYTE  szCategory[256];
  81.  
  82.    while ( lcode != -1 )
  83.    {
  84.       lcode = ScanSetableParameters( 
  85.                   scanCategory,
  86.                   &scanSequence,
  87.                   rParameterName,
  88.                   &rType,
  89.                   &rFlags,
  90.                   &rCategory,
  91.                   parameterDescription,
  92.                   currentValue,
  93.                   &rLowerLimit,
  94.                   &rUpperLimit
  95.                   );
  96.       if ( lcode == 0 )
  97.       {
  98.          switch ( rCategory )
  99.          {
  100.             case 0:
  101.                strcpy( szCategory, "COMMUNICATIONS" );
  102.                break;
  103.             case 1:
  104.                strcpy( szCategory, "MEMORY        " );
  105.                break;
  106.             case 2:
  107.                strcpy( szCategory, "FILE CACHE    " );
  108.                break;
  109.             case 3:
  110.                strcpy( szCategory, "DIR CACHE     " );
  111.                break;
  112.             case 4:
  113.                strcpy( szCategory, "FILE SYSTEM   " );
  114.                break;
  115.             case 5:
  116.                strcpy( szCategory, "LOCKING       " );
  117.                break;
  118.             case 6:
  119.                strcpy( szCategory, "TTS           " );
  120.                break;
  121.             case 7:
  122.                strcpy( szCategory, "DISK          " );
  123.                break;
  124.             case 8:
  125.                strcpy( szCategory, "TIME          " );
  126.                break;
  127.             case 9:
  128.                strcpy( szCategory, "NCP           " );
  129.                break;
  130.             case 10:
  131.                strcpy( szCategory, "MISCELLANEOUS " );
  132.                break;
  133.             case 11:
  134.                strcpy( szCategory, "ERROR HANDLING" );
  135.                break;
  136.          }
  137.          printf( "%s:  %s\n", szCategory, rParameterName );
  138.          lnCnt++;
  139.          if ( (lnCnt % 20) == 0 )
  140.          {
  141.             getch();
  142.             printf( "\r" );
  143.          }
  144.       }
  145.    }
  146.    return;
  147. }
  148.