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
2.0 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. All rights reserved.
  4. Module Name:
  5. marshall.hxx
  6. Abstract:
  7. Declarations for marshalling spooler structures sent via RPC/LPC
  8. Author:
  9. Ramanathan Venkatapathy (RamanV) 4/30/98
  10. Revision History:
  11. --*/
  12. //
  13. // 32-64 bit marshalling constants
  14. //
  15. #include "mType.h"
  16. typedef enum _EDataSize
  17. {
  18. kPointerSize = sizeof (ULONG_PTR),
  19. } EDataSize;
  20. typedef enum _EPtrSize
  21. {
  22. kSpl32Ptr = 4,
  23. kSpl64Ptr = 8,
  24. } EPtrSize ;
  25. EXTERN_C
  26. BOOL
  27. MarshallDownStructure(
  28. IN OUT PBYTE pStructure,
  29. IN FieldInfo *pFieldInfo,
  30. IN SIZE_T StructureSize,
  31. IN CALL_ROUTE Route
  32. );
  33. EXTERN_C
  34. BOOL
  35. MarshallUpStructure(
  36. IN OUT PBYTE pStructure,
  37. IN FieldInfo *pFieldInfo,
  38. IN SIZE_T StructureSize,
  39. IN CALL_ROUTE Route
  40. );
  41. EXTERN_C
  42. BOOL
  43. MarshallUpStructuresArray(
  44. IN OUT PBYTE pBufferArray,
  45. IN DWORD cReturned,
  46. IN FieldInfo *pFieldInfo,
  47. IN SIZE_T StructureSize,
  48. IN CALL_ROUTE Route
  49. );
  50. EXTERN_C
  51. BOOL
  52. MarshallDownStructuresArray(
  53. IN OUT PBYTE pBufferArray,
  54. IN DWORD cReturned,
  55. IN FieldInfo *pFieldInfo,
  56. IN SIZE_T StructureSize,
  57. IN CALL_ROUTE Route
  58. );
  59. EXTERN_C
  60. DWORD
  61. UpdateBufferSize(
  62. IN FieldInfo *pFieldInfo,
  63. IN SIZE_T cbStruct,
  64. IN OUT LPDWORD pcbNeeded,
  65. IN DWORD cbBuf,
  66. IN DWORD dwError,
  67. IN LPDWORD pcReturned
  68. );
  69. EXTERN_C
  70. BOOL
  71. GetShrinkedSize(
  72. IN FieldInfo *pFieldInfo,
  73. OUT SIZE_T *pShrinkedSize
  74. );
  75. EXTERN_C
  76. VOID
  77. AdjustPointers(
  78. IN PBYTE pStructure,
  79. IN FieldInfo *pFieldInfo,
  80. IN ULONG_PTR cbAdjustment
  81. );
  82. EXTERN_C
  83. VOID
  84. AdjustPointersInStructuresArray(
  85. IN PBYTE pBufferArray,
  86. IN DWORD cReturned,
  87. IN FieldInfo *pFieldInfo,
  88. IN SIZE_T StructureSize,
  89. IN ULONG_PTR cbAdjustment
  90. );