Source code of Windows XP (NT5)
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.

102 lines
2.6 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. token.h
  5. Abstract:
  6. Flags and prototypes for GetToken.C
  7. Author:
  8. Danny Glasser (dannygl) June 1989
  9. Revision History:
  10. 02 May 1991 rfirth
  11. 32-bit version
  12. --*/
  13. //
  14. // Non-component types: bits 0 through 2
  15. //
  16. #define TOKEN_TYPE_EOS 0x00000001L // '\0'
  17. #define TOKEN_TYPE_SLASH 0x00000002L // '/' or '\\'
  18. #define TOKEN_TYPE_COLON 0x00000004L // ':'
  19. //
  20. // Component-based types: bits 31 through 11
  21. //
  22. #define TOKEN_TYPE_COMPONENT 0x80000000L // path component
  23. #define TOKEN_TYPE_WILDCARD 0x40000000L // '?' and/or '*'
  24. #define TOKEN_TYPE_WILDONE 0x20000000L // "*"
  25. #define TOKEN_TYPE_DOT 0x10000000L // "."
  26. #define TOKEN_TYPE_DOTDOT 0x08000000L // ".."
  27. #define TOKEN_TYPE_DRIVE 0x04000000L // [A-Za-z]
  28. #define TOKEN_TYPE_COMPUTERNAME 0x02000000L // computername
  29. #define TOKEN_TYPE_LPT 0x01000000L // LPT[1-9]
  30. #define TOKEN_TYPE_COM 0x00800000L // COM[1-9]
  31. #define TOKEN_TYPE_AUX 0x00400000L
  32. #define TOKEN_TYPE_PRN 0x00200000L
  33. #define TOKEN_TYPE_CON 0x00100000L
  34. #define TOKEN_TYPE_NUL 0x00080000L
  35. #define TOKEN_TYPE_DEV 0x00040000L
  36. #define TOKEN_TYPE_SEM 0x00020000L
  37. #define TOKEN_TYPE_SHAREMEM 0x00010000L
  38. #define TOKEN_TYPE_QUEUES 0x00008000L
  39. #define TOKEN_TYPE_PIPE 0x00004000L
  40. #define TOKEN_TYPE_MAILSLOT 0x00002000L
  41. #define TOKEN_TYPE_COMM 0x00001000L
  42. #define TOKEN_TYPE_PRINT 0x00000800L
  43. //
  44. // Undefined types: bits 3 through 10
  45. //
  46. #define TOKEN_TYPE_UNDEFINED 0x000007F8L
  47. //
  48. // Useful combinations
  49. //
  50. #define TOKEN_TYPE_SYSNAME (TOKEN_TYPE_SEM | TOKEN_TYPE_SHAREMEM \
  51. | TOKEN_TYPE_QUEUES | TOKEN_TYPE_PIPE \
  52. | TOKEN_TYPE_COMM | TOKEN_TYPE_PRINT)
  53. #define TOKEN_TYPE_LOCALDEVICE (TOKEN_TYPE_LPT | TOKEN_TYPE_COM \
  54. | TOKEN_TYPE_AUX | TOKEN_TYPE_PRN \
  55. | TOKEN_TYPE_CON | TOKEN_TYPE_NUL)
  56. extern
  57. DWORD
  58. GetToken(
  59. LPTSTR pszBegin,
  60. LPTSTR* ppszEnd,
  61. LPDWORD pflTokenType,
  62. DWORD flFlags
  63. );
  64. //
  65. // Flags for GetToken()
  66. //
  67. #define GTF_8_DOT_3 0x00000001L
  68. #define GTF_RESERVED (~(GTF_8_DOT_3))
  69. //
  70. // IMPORTANT - These variables are defined in the NETAPI.DLL global
  71. // data segment under OS/2. Under DOS we need to define
  72. // them here.
  73. //
  74. #ifdef DOS3
  75. extern USHORT cbMaxPathLen;
  76. extern USHORT cbMaxPathCompLen;
  77. #endif