Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
3.2 KiB

  1. /*++
  2. Copyright (c) 1991-1992 Microsoft Corporation
  3. Module Name:
  4. WksEquiv.c
  5. Abstract:
  6. This file contains RxpGetWkstaInfoLevelEquivalent.
  7. Author:
  8. John Rogers (JohnRo) 15-Aug-1991
  9. Environment:
  10. Portable to any flat, 32-bit environment. (Uses Win32 typedefs.)
  11. Requires ANSI C extensions: slash-slash comments, long external names.
  12. Revision History:
  13. 15-Aug-1991 JohnRo
  14. Implement downlevel NetWksta APIs.
  15. 21-Nov-1991 JohnRo
  16. Removed NT dependencies to reduce recompiles.
  17. 30-Oct-1992 JohnRo
  18. RAID 10418: NetWkstaGetInfo level 302: wrong error code.
  19. Use PREFIX_ equates.
  20. --*/
  21. // These must be included first:
  22. #include <windef.h> // IN, DWORD, etc.
  23. #include <lmcons.h> // NET_API_STATUS, etc.
  24. // These may be included in any order:
  25. #include <lmerr.h> // ERROR_ and NERR_ equates.
  26. #include <netdebug.h> // NetpKdPrint(()).
  27. #include <netlib.h> // NetpSetOptionalArg().
  28. #include <prefix.h> // PREFIX_ equates.
  29. #include <rxwksta.h> // My prototypes.
  30. NET_API_STATUS
  31. RxpGetWkstaInfoLevelEquivalent(
  32. IN DWORD FromLevel,
  33. OUT LPDWORD ToLevel,
  34. OUT LPBOOL IncompleteOutput OPTIONAL // incomplete (except platform ID)
  35. )
  36. {
  37. switch (FromLevel) {
  38. case 0 :
  39. NetpKdPrint(( PREFIX_NETAPI
  40. "RxpGetWkstaInfoLevelEquivalent: 0 not supported yet\n" ));
  41. return (ERROR_INVALID_LEVEL);
  42. case 1 :
  43. NetpKdPrint(( PREFIX_NETAPI
  44. "RxpGetWkstaInfoLevelEquivalent: 1 not supported yet\n" ));
  45. return (ERROR_INVALID_LEVEL);
  46. case 10 :
  47. NetpKdPrint(( PREFIX_NETAPI
  48. "RxpGetWkstaInfoLevelEquivalent: 10 not supported yet\n" ));
  49. return (ERROR_INVALID_LEVEL);
  50. case 100 :
  51. // Level 100 is subset of level 10 (except platform ID).
  52. *ToLevel = 10;
  53. NetpSetOptionalArg( IncompleteOutput, FALSE );
  54. return (NERR_Success);
  55. case 101 :
  56. // Level 101 is subset of level 0 (except platform ID).
  57. *ToLevel = 0;
  58. NetpSetOptionalArg( IncompleteOutput, FALSE );
  59. return (NERR_Success);
  60. case 102 :
  61. // Level 102 is subset of level 0 (except platform ID and logged on
  62. // users).
  63. *ToLevel = 0;
  64. NetpSetOptionalArg( IncompleteOutput, TRUE );
  65. return (NERR_Success);
  66. case 302:
  67. // Info level 302 is DOS only, so isn't supported here.
  68. NetpKdPrint(( PREFIX_NETAPI
  69. "RxpGetWkstaInfoLevelEquivalent: 302 not supported\n" ));
  70. return (ERROR_INVALID_LEVEL);
  71. case 402 :
  72. // Level 402 is subset of level 1 (except platform ID).
  73. *ToLevel = 1;
  74. NetpSetOptionalArg( IncompleteOutput, FALSE );
  75. return (NERR_Success);
  76. case 502:
  77. // Info level 502 is NT only, so isn't supported here.
  78. NetpKdPrint(( PREFIX_NETAPI
  79. "RxpGetWkstaInfoLevelEquivalent: 502 not supported\n" ));
  80. return (ERROR_INVALID_LEVEL);
  81. default :
  82. return (ERROR_INVALID_LEVEL);
  83. }
  84. /* NOTREACHED */
  85. } // RxpGetWkstaStructInfo