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.

109 lines
2.7 KiB

  1. /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name :
  4. expr.h
  5. Abstract :
  6. This file contains code for ndr correlations.
  7. Author :
  8. Ryszard K. Kott (ryszardk) Sep 1997
  9. Revision History :
  10. ---------------------------------------------------------------------*/
  11. #include "ndrp.h"
  12. #if !defined(__EXPR_H__)
  13. #define __EXPR_H__
  14. class CORRELATION_CONTEXT
  15. {
  16. PMIDL_STUB_MESSAGE const pStubMsg;
  17. uchar * const pCorrMemorySave;
  18. public:
  19. CORRELATION_CONTEXT(PMIDL_STUB_MESSAGE pCurStubMsg,
  20. uchar *pNewContext ) :
  21. pStubMsg( pCurStubMsg ),
  22. pCorrMemorySave( pCurStubMsg->pCorrMemory )
  23. {
  24. pCurStubMsg->pCorrMemory = pNewContext;
  25. }
  26. ~CORRELATION_CONTEXT()
  27. {
  28. pStubMsg->pCorrMemory = pCorrMemorySave;
  29. }
  30. };
  31. typedef __int64 EXPR_VALUE;
  32. EXPR_VALUE
  33. Ndr64EvaluateExpr(
  34. PMIDL_STUB_MESSAGE pStubMsg,
  35. PNDR64_FORMAT pFormat,
  36. NDR64_EXPRESSION_TYPE ExpressionType );
  37. typedef struct _NDR64_CORRELATION_INFO_DATA
  38. {
  39. unsigned char * pMemoryObject;
  40. PNDR64_FORMAT pCorrDesc;
  41. EXPR_VALUE Value;
  42. long CheckKind;
  43. } NDR64_CORRELATION_INFO_DATA;
  44. #define NDR64_SLOTS_PER_CORRELATION_INFO 5
  45. typedef struct _NDR64_CORRELATION_INFO
  46. {
  47. struct _NDR64_CORRELATION_INFO *pNext;
  48. NDR64_UINT32 SlotsUsed;
  49. NDR64_CORRELATION_INFO_DATA Data[NDR64_SLOTS_PER_CORRELATION_INFO];
  50. } NDR64_CORRELATION_INFO, *PNDR64_CORRELATION_INFO;
  51. void
  52. Ndr64pCheckCorrelation(
  53. PMIDL_STUB_MESSAGE pStubMsg,
  54. EXPR_VALUE Value,
  55. PNDR64_FORMAT pFormat,
  56. NDR64_EXPRESSION_TYPE CheckKind );
  57. void
  58. Ndr64pAddCorrelationData(
  59. PMIDL_STUB_MESSAGE pStubMsg,
  60. uchar * pMemory,
  61. PNDR64_FORMAT pFormat,
  62. EXPR_VALUE Value,
  63. NDR64_EXPRESSION_TYPE CheckKind );
  64. void Ndr64pNoCheckCorrelation(
  65. PMIDL_STUB_MESSAGE pStubMsg,
  66. EXPR_VALUE Value,
  67. PNDR64_FORMAT pFormat,
  68. NDR64_EXPRESSION_TYPE ExpressionType );
  69. void Ndr64pEarlyCheckCorrelation(
  70. PMIDL_STUB_MESSAGE pStubMsg,
  71. EXPR_VALUE Value,
  72. PNDR64_FORMAT pFormat,
  73. NDR64_EXPRESSION_TYPE ExpressionType );
  74. void Ndr64pLateCheckCorrelation(
  75. PMIDL_STUB_MESSAGE pStubMsg,
  76. EXPR_VALUE Value,
  77. PNDR64_FORMAT pFormat,
  78. NDR64_EXPRESSION_TYPE ExpressionType );
  79. void
  80. Ndr64CorrelationPass(
  81. PMIDL_STUB_MESSAGE pStubMsg
  82. );
  83. #endif // __EXPR_H__