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.

127 lines
2.4 KiB

  1. // Copyright (c) 1993-1999 Microsoft Corporation
  2. #ifndef __UACT_HXX__
  3. #define __UACT_HXX__
  4. //
  5. // Manifests defining the allocation needs.
  6. //
  7. #define AN_NONE (0x0)
  8. #define AN_STACK (0x1)
  9. #define AN_HEAP (0x2)
  10. #define AN_PHANTOM_REF (0x3)
  11. #define AN_EXISTS (0x4)
  12. #define AN_TOP_LEVEL (0x5)
  13. #define AN_ERROR (0xf)
  14. //
  15. // Manifests for reference action
  16. //
  17. #define RA_NONE (0x0)
  18. #define RA_PATCH_INTO_BUFFER (0x1)
  19. #define RA_PATCH_TO_ADDR_OF_TYPE (0x2)
  20. #define RA_DEFER_PATCH_TO_PTE (0x3)
  21. #define RA_ERROR (0xf)
  22. //
  23. // Manifests for unmarshalling action
  24. //
  25. #define UA_NONE (0x0)
  26. #define UA_COPY_INTO_DEREF_OF_REF (0x1)
  27. #define UA_COPY_INTO_TYPE (0x2)
  28. #define UA_ERROR (0xf)
  29. //
  30. // Manifests to define presented expression.
  31. #define PR_NONE (0x0)
  32. #define PR_TYPE (0x1)
  33. #define PR_DEREF_OF_REF (0x2)
  34. #define PR_DEREF_OF_SRC (0x3)
  35. #define PR_ERROR (0xf)
  36. //
  37. // This set of constants defines the additional unmarshall flags while
  38. // determining the unmarshall action.
  39. //
  40. enum _UAF
  41. {
  42. UAFLAGS_NONE = 0x0000
  43. };
  44. typedef unsigned short UAFLAGS;
  45. //
  46. // The structure defining the unmarshalling action mask.
  47. //
  48. typedef struct _u_action
  49. {
  50. unsigned short AN : 4;
  51. unsigned short RA : 4;
  52. unsigned short UA : 4;
  53. unsigned short PR : 4;
  54. unsigned short SetAllocNeed( unsigned short A )
  55. {
  56. return (AN = A);
  57. }
  58. unsigned short GetAllocNeed()
  59. {
  60. return AN;
  61. }
  62. unsigned short SetRefAction( unsigned short R )
  63. {
  64. return RA = R;
  65. }
  66. unsigned short GetRefAction()
  67. {
  68. return RA;
  69. }
  70. unsigned short SetUnMarAction( unsigned short U )
  71. {
  72. return UA = U;
  73. }
  74. unsigned short GetUnMarAction()
  75. {
  76. return UA;
  77. }
  78. unsigned short SetPresentedExprAction( unsigned short P )
  79. {
  80. return PR = P;
  81. }
  82. unsigned short GetPresentedExprAction()
  83. {
  84. return PR;
  85. }
  86. void SetUAction( unsigned short A,
  87. unsigned short R,
  88. unsigned short U,
  89. unsigned short P
  90. )
  91. {
  92. SetAllocNeed( A );
  93. SetRefAction( R );
  94. SetUnMarAction( U );
  95. SetPresentedExprAction( P );
  96. }
  97. struct _u_action SetUAction( struct _u_action UA )
  98. {
  99. SetAllocNeed( UA.GetAllocNeed() );
  100. SetRefAction( UA.GetRefAction() );
  101. SetUnMarAction( UA.GetUnMarAction() );
  102. SetPresentedExprAction( UA.GetPresentedExprAction() );
  103. return UA;
  104. }
  105. } U_ACTION;
  106. #endif // __UACT_HXX__