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.

68 lines
1.7 KiB

  1. /*************************************************************************
  2. *
  3. * VERSION.C
  4. *
  5. * Shell version information
  6. *
  7. * Copyright (c) 1995 Microsoft Corporation
  8. *
  9. * $Log: N:\NT\PRIVATE\NW4\NWSCRIPT\VCS\VERSION.C $
  10. *
  11. * Rev 1.2 10 Apr 1996 14:24:08 terryt
  12. * Hotfix for 21181hq
  13. *
  14. * Rev 1.2 12 Mar 1996 19:56:28 terryt
  15. * Relative NDS names and merge
  16. *
  17. * Rev 1.1 22 Dec 1995 14:27:10 terryt
  18. * Add Microsoft headers
  19. *
  20. * Rev 1.0 15 Nov 1995 18:08:18 terryt
  21. * Initial revision.
  22. *
  23. * Rev 1.1 26 Jul 1995 14:17:24 terryt
  24. * Clean up comments
  25. *
  26. * Rev 1.0 15 May 1995 19:11:12 terryt
  27. * Initial revision.
  28. *
  29. *************************************************************************/
  30. #include <stdio.h>
  31. #include <direct.h>
  32. #include <time.h>
  33. #include <stdlib.h>
  34. #include <nt.h>
  35. #include <ntrtl.h>
  36. #include <nturtl.h>
  37. #include <windows.h>
  38. #include "nwscript.h"
  39. /*
  40. * MSDOS is not neccessarily the best thing to put out,
  41. * maybe Windows_NT, NT or NTDOS. The OS_VERSION is also a problem.
  42. * The script variables don't neccessarily have to match the DOS variables.
  43. *
  44. * The shell version numbers may change with 4.X support.
  45. */
  46. #define CLIENT_ID_STRING "MSDOS\0V5.00\0IBM_PC\0IBM"
  47. #define CLIENT_SHELL_MAJOR 0x03
  48. #define CLIENT_SHELL_MINOR 0x1a
  49. #define CLIENT_SHELL_NUMBER 0x00
  50. void
  51. NTGetVersionOfShell( char * buffer,
  52. unsigned char * shellmajor,
  53. unsigned char * shellminor,
  54. unsigned char * shellnum )
  55. {
  56. *shellmajor = CLIENT_SHELL_MAJOR;
  57. *shellminor = CLIENT_SHELL_MINOR;
  58. *shellnum = CLIENT_SHELL_NUMBER;
  59. memcpy( buffer, CLIENT_ID_STRING, strlen(CLIENT_ID_STRING));
  60. }