ndr64types.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:21k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4.     ndr64types.h
  5. Abstract:
  6.     Definitions for NDR64 format strings.
  7. --*/
  8. #ifndef _NDR64TYPES_H
  9. #define _NDR64TYPES_H
  10. #include <pshpack8.h>
  11. #include <guiddef.h>    // REVIEW: or just redefine GUID here
  12. #pragma warning (disable: 4201)     // nameless struct/union
  13. typedef const void * FormatInfoRef;
  14. #define INVALID_FRAGMENT_ID 0
  15. /*
  16. *  Format string types
  17. */
  18. typedef unsigned __int8     NDR64_UINT8;
  19. typedef unsigned __int16    NDR64_UINT16;
  20. typedef unsigned __int32    NDR64_UINT32;
  21. typedef unsigned __int64    NDR64_UINT64;
  22. typedef __int8              NDR64_INT8;
  23. typedef __int16             NDR64_INT16;
  24. typedef __int32             NDR64_INT32;
  25. typedef __int64             NDR64_INT64;
  26. typedef NDR64_UINT8         NDR64_FORMAT_CHAR;
  27. typedef const void *        PNDR64_FORMAT;
  28. typedef NDR64_UINT8         NDR64_ALIGNMENT;
  29. typedef NDR64_UINT32        NDR64_FORMAT_UINT32;
  30. // BUG BUG, IA64 stack offsets are actually X86
  31. // offsets when compiled in the 32bit envirnment.  This
  32. // is for testing purposes and should be removed before shipping
  33. // Remove after midl 6.0.330+ propagates around.
  34. #if defined(_M_IA64)
  35. #define Ia64Axp(a, b)       (a)
  36. #elif defined(_M_IX86)
  37. #define Ia64Axp(a, b)       (a)
  38. #elif defined(_M_AMD64)
  39. #define Ia64Axp(a, b)       (a)
  40. #else
  41. #error Invalid platform
  42. #endif
  43. #define NDR64_FC_EXPLICIT_HANDLE    0
  44. #define NDR64_FC_BIND_GENERIC       1
  45. #define NDR64_FC_BIND_PRIMITIVE     2
  46. #define NDR64_FC_AUTO_HANDLE        3
  47. #define NDR64_FC_CALLBACK_HANDLE    4
  48. #define NDR64_FC_NO_HANDLE          5
  49. #if defined(__RPC_WIN32__)
  50. typedef NDR64_INT32 NDR64_PTR_WIRE_TYPE;
  51. #else
  52. typedef NDR64_INT64 NDR64_PTR_WIRE_TYPE;
  53. #endif
  54. #define NDR64_PTR_WIRE_ALIGN (sizeof(NDR64_PTR_WIRE_TYPE)-1)
  55. typedef NDR64_UINT64 NDR64_WIRE_COUNT_TYPE;
  56. #define NDR64_WIRE_COUNT_ALIGN (sizeof(NDR64_WIRE_COUNT_TYPE)-1)
  57. //
  58. // Procedures and parameters
  59. //
  60. typedef struct _NDR64_PROC_FLAGS
  61. {
  62.     NDR64_UINT32    HandleType              : 3;        // 0x00000000
  63.     NDR64_UINT32    ProcType                : 3;        // 0x00000008
  64.     NDR64_UINT32    IsInterpreted           : 2;        // 0x00000040
  65.     NDR64_UINT32    IsObject                : 1;        // 0x00000100
  66.     NDR64_UINT32    IsAsync                 : 1;        // 0x00000200
  67.     NDR64_UINT32    IsEncode                : 1;        // 0x00000400
  68.     NDR64_UINT32    IsDecode                : 1;        // 0x00000800
  69.     NDR64_UINT32    UsesFullPtrPackage      : 1;        // 0x00001000
  70.     NDR64_UINT32    UsesRpcSmPackage        : 1;        // 0x00002000
  71.     NDR64_UINT32    UsesPipes               : 1;        // 0x00004000
  72.     NDR64_UINT32    HandlesExceptions       : 2;        // 0x00008000
  73.     NDR64_UINT32    ServerMustSize          : 1;        // 0x00020000
  74.     NDR64_UINT32    ClientMustSize          : 1;        // 0x00040000
  75.     NDR64_UINT32    HasReturn               : 1;        // 0x00080000
  76.     NDR64_UINT32    HasComplexReturn        : 1;        // 0x00100000
  77.     NDR64_UINT32    ServerHasCorrelation    : 1;        // 0x00200000
  78.     NDR64_UINT32    ClientHasCorrelation    : 1;        // 0x00400000
  79.     NDR64_UINT32    HasNotify               : 1;        // 0x00800000
  80.     NDR64_UINT32    HasOtherExtensions      : 1;        // 0x01000000
  81.     NDR64_UINT32    Reserved                : 7;        // 0x02000000
  82. } NDR64_PROC_FLAGS;
  83. typedef struct _NDR64_RPC_FLAGS
  84. {
  85.     NDR64_UINT16    Idempotent          : 1;
  86.     NDR64_UINT16    Broadcast           : 1;
  87.     NDR64_UINT16    Maybe               : 1;
  88.     NDR64_UINT16    Reserved1           : 5;
  89.     NDR64_UINT16    Message             : 1;
  90.     NDR64_UINT16    Reserved2           : 4;
  91.     NDR64_UINT16    InputSynchronous    : 1;
  92.     NDR64_UINT16    Asynchronous        : 1;
  93.     NDR64_UINT16    Reserved3           : 1;
  94. } NDR64_RPC_FLAGS;
  95. typedef struct _NDR64_PROC_FORMAT
  96. {
  97.     NDR64_UINT32        Flags;
  98.     NDR64_UINT32        StackSize;
  99.     NDR64_UINT32        ConstantClientBufferSize;
  100.     NDR64_UINT32        ConstantServerBufferSize;
  101.     NDR64_UINT16        RpcFlags;
  102.     NDR64_UINT16        FloatDoubleMask;
  103.     NDR64_UINT16        NumberOfParams;
  104.     NDR64_UINT16        ExtensionSize;
  105. } NDR64_PROC_FORMAT, *PNDR64_PROC_FORMAT;
  106. typedef struct _NDR64_PARAM_FLAGS
  107. {
  108.     NDR64_UINT16    MustSize            : 1;
  109.     NDR64_UINT16    MustFree            : 1;
  110.     NDR64_UINT16    IsPipe              : 1;
  111.     NDR64_UINT16    IsIn                : 1;
  112.     NDR64_UINT16    IsOut               : 1;
  113.     NDR64_UINT16    IsReturn            : 1;
  114.     NDR64_UINT16    IsBasetype          : 1;
  115.     NDR64_UINT16    IsByValue           : 1;
  116.     NDR64_UINT16    IsSimpleRef         : 1;
  117.     NDR64_UINT16    IsDontCallFreeInst  : 1;
  118.     NDR64_UINT16    SaveForAsyncFinish  : 1;
  119.     NDR64_UINT16    IsPartialIgnore     : 1;
  120.     NDR64_UINT16    IsForceAllocate     : 1;
  121.     NDR64_UINT16    Reserved            : 2;
  122.     NDR64_UINT16    UseCache            : 1;
  123. } NDR64_PARAM_FLAGS;
  124. typedef struct _NDR64_PARAM_FORMAT
  125. {
  126.     PNDR64_FORMAT       Type;
  127.     NDR64_PARAM_FLAGS   Attributes;
  128.     NDR64_UINT16        Reserved;
  129.     NDR64_UINT32        StackOffset;
  130. } NDR64_PARAM_FORMAT, *PNDR64_PARAM_FORMAT;
  131. //
  132. // Base types
  133. //
  134. typedef struct _NDR64_RANGE_FORMAT
  135. {
  136.     NDR64_FORMAT_CHAR   FormatCode;
  137.     NDR64_FORMAT_CHAR   RangeType;
  138.     NDR64_UINT16        Reserved;
  139.     NDR64_INT64         MinValue;
  140.     NDR64_INT64         MaxValue;
  141. } NDR64_RANGE_FORMAT;
  142. //
  143. // Handles & bindings
  144. //
  145. typedef struct _NDR64_CONTEXT_HANDLE_FLAGS
  146. {
  147.     NDR64_UINT8         CannotBeNull : 1;
  148.     NDR64_UINT8         Serialize    : 1;
  149.     NDR64_UINT8         NoSerialize  : 1;
  150.     NDR64_UINT8         Strict       : 1;
  151.     NDR64_UINT8         IsReturn     : 1;
  152.     NDR64_UINT8         IsOut        : 1;
  153.     NDR64_UINT8         IsIn         : 1;
  154.     NDR64_UINT8         IsViaPointer : 1;
  155. } NDR64_CONTEXT_HANDLE_FLAGS;
  156. typedef struct _NDR64_CONTEXT_HANDLE_FORMAT
  157. {
  158.     NDR64_FORMAT_CHAR   FormatCode;
  159.     NDR64_UINT8         ContextFlags;
  160.     NDR64_UINT8         RundownRoutineIndex;
  161.     NDR64_UINT8         Ordinal;
  162. } NDR64_CONTEXT_HANDLE_FORMAT;
  163. typedef struct _NDR64_BIND_PRIMITIVE
  164. {
  165.     NDR64_FORMAT_CHAR   HandleType;
  166.     NDR64_UINT8         Flags;
  167.     NDR64_UINT16        StackOffset;
  168.     NDR64_UINT16        Reserved;
  169. } NDR64_BIND_PRIMITIVE;
  170. typedef struct _NDR64_BIND_GENERIC
  171. {
  172.     NDR64_FORMAT_CHAR   HandleType;
  173.     NDR64_UINT8         Flags;
  174.     NDR64_UINT16        StackOffset;
  175.     NDR64_UINT8         RoutineIndex;
  176.     NDR64_UINT8         Size;
  177. } NDR64_BIND_GENERIC;
  178. typedef struct _NDR64_BIND_CONTEXT
  179. {
  180.     NDR64_FORMAT_CHAR   HandleType;
  181.     NDR64_UINT8         Flags;
  182.     NDR64_UINT16        StackOffset;
  183.     NDR64_UINT8         RoutineIndex;
  184.     NDR64_UINT8         Ordinal;
  185. } NDR64_BIND_CONTEXT;
  186. typedef union _NDR64_BINDINGS
  187. {
  188.     NDR64_BIND_PRIMITIVE    Primitive;
  189.     NDR64_BIND_GENERIC      Generic;
  190.     NDR64_BIND_CONTEXT      Context;
  191. } NDR64_BINDINGS;
  192. // NOTE: The type of the Binding member below is actually NDR64_BINDINGS.
  193. //       We use NDR64_BIND_CONTEXT because it has essentially the same
  194. //       signature as the others and it makes static initilization clearer.
  195. typedef struct _NDR64_BIND_AND_NOTIFY_EXTENSION
  196. {
  197.     NDR64_BIND_CONTEXT  Binding;
  198.     NDR64_UINT16        NotifyIndex;
  199. } NDR64_BIND_AND_NOTIFY_EXTENSION;
  200. //
  201. // Pointers
  202. //
  203. typedef struct _NDR64_POINTER_FORMAT
  204. {
  205.     NDR64_FORMAT_CHAR  FormatCode;
  206.     NDR64_UINT8        Flags;
  207.     NDR64_UINT16       Reserved;
  208.     PNDR64_FORMAT      Pointee;
  209. } NDR64_POINTER_FORMAT;
  210. typedef struct _NDR64_NO_REPEAT_FORMAT
  211. {
  212.    NDR64_FORMAT_CHAR    FormatCode;
  213.    NDR64_UINT8          Flags;
  214.    NDR64_UINT16         Reserved1;
  215.    NDR64_UINT32         Reserved2;
  216. } NDR64_NO_REPEAT_FORMAT;
  217. typedef struct _NDR64_POINTER_INSTANCE_HEADER_FORMAT
  218. {
  219.     NDR64_UINT32         Offset;
  220.     NDR64_UINT32         Reserved;
  221. } NDR64_POINTER_INSTANCE_HEADER_FORMAT;
  222. typedef struct _NDR64_POINTER_REPEAT_FLAGS
  223. {
  224.     NDR64_UINT8          SetCorrMark : 1;
  225.     NDR64_UINT8          Reserved : 7;
  226. } NDR64_POINTER_REPEAT_FLAGS, *PNDR64_POINTER_REPEAT_FLAGS;
  227. typedef struct _NDR64_REPEAT_FORMAT
  228. {
  229.     NDR64_FORMAT_CHAR    FormatCode;
  230.     NDR64_POINTER_REPEAT_FLAGS  Flags;
  231.     NDR64_UINT16         Reserved;
  232.     NDR64_UINT32         Increment;
  233.     NDR64_UINT32         OffsetToArray;
  234.     NDR64_UINT32         NumberOfPointers;
  235. } NDR64_REPEAT_FORMAT, *PNDR64_REPEAT_FORMAT;
  236. typedef struct _NDR64_FIXED_REPEAT_FORMAT
  237. {
  238.     NDR64_REPEAT_FORMAT  RepeatFormat;
  239.     NDR64_UINT32         Iterations;
  240.     NDR64_UINT32         Reserved;
  241. } NDR64_FIXED_REPEAT_FORMAT, *PNDR64_FIXED_REPEAT_FORMAT;
  242. typedef struct _NDR64_IID_FLAGS
  243. {
  244.     NDR64_UINT8         ConstantIID : 1;
  245.     NDR64_UINT8         Reserved    : 7;
  246. } NDR64_IID_FLAGS;
  247. typedef struct _NDR64_CONSTANT_IID_FORMAT
  248. {
  249.     NDR64_FORMAT_CHAR   FormatCode;
  250.     NDR64_UINT8         Flags;
  251.     NDR64_UINT16        Reserved;
  252.     GUID                Guid;
  253. } NDR64_CONSTANT_IID_FORMAT;
  254. typedef struct _NDR64_IID_FORMAT
  255. {
  256.     NDR64_FORMAT_CHAR   FormatCode;
  257.     NDR64_UINT8         Flags;
  258.     NDR64_UINT16        Reserved;
  259.     PNDR64_FORMAT       IIDDescriptor;
  260. } NDR64_IID_FORMAT;
  261. //
  262. // Structures
  263. //
  264. typedef struct _NDR64_STRUCTURE_FLAGS
  265. {
  266.     NDR64_UINT8         HasPointerInfo      : 1; /* 1 */
  267.     NDR64_UINT8         HasMemberInfo       : 1; /* 2 */
  268.     NDR64_UINT8         HasConfArray        : 1; /* 3 */
  269.     NDR64_UINT8         HasOrigPointerInfo  : 1; /* 4 */
  270.     NDR64_UINT8         HasOrigMemberInfo   : 1; /* 5 */
  271.     NDR64_UINT8         Reserved1           : 1; /* 6 */
  272.     NDR64_UINT8         Reserved2           : 1; /* 7 */
  273.     NDR64_UINT8         Reserved3           : 1; /* 8 */
  274. } NDR64_STRUCTURE_FLAGS;
  275. typedef struct _NDR64_STRUCTURE_HEADER_FORMAT
  276. {
  277.     NDR64_FORMAT_CHAR       FormatCode;
  278.     NDR64_ALIGNMENT         Alignment;
  279.     NDR64_STRUCTURE_FLAGS   Flags;
  280.     NDR64_UINT8             Reserve;
  281.     NDR64_UINT32            MemorySize;
  282. } NDR64_STRUCTURE_HEADER_FORMAT;
  283. typedef struct _NDR64_CONF_STRUCTURE_HEADER_FORMAT
  284. {
  285.     NDR64_FORMAT_CHAR       FormatCode;
  286.     NDR64_ALIGNMENT         Alignment;
  287.     NDR64_STRUCTURE_FLAGS   Flags;
  288.     NDR64_UINT8             Reserve;
  289.     NDR64_UINT32            MemorySize;
  290.     PNDR64_FORMAT           ArrayDescription;
  291. } NDR64_CONF_STRUCTURE_HEADER_FORMAT;
  292. typedef struct _NDR64_BOGUS_STRUCTURE_HEADER_FORMAT
  293. {
  294.     NDR64_FORMAT_CHAR       FormatCode;
  295.     NDR64_ALIGNMENT         Alignment;
  296.     NDR64_STRUCTURE_FLAGS   Flags;
  297.     NDR64_UINT8             Reserve;
  298.     NDR64_UINT32            MemorySize;
  299.     PNDR64_FORMAT           OriginalMemberLayout;
  300.     PNDR64_FORMAT           OriginalPointerLayout;
  301.     PNDR64_FORMAT           PointerLayout;
  302. } NDR64_BOGUS_STRUCTURE_HEADER_FORMAT;
  303. typedef struct _NDR64_CONF_BOGUS_STRUCTURE_HEADER_FORMAT
  304. {
  305.     NDR64_FORMAT_CHAR       FormatCode;
  306.     NDR64_ALIGNMENT         Alignment;
  307.     NDR64_STRUCTURE_FLAGS   Flags;
  308.     NDR64_UINT8             Dimensions;
  309.     NDR64_UINT32            MemorySize;
  310.     PNDR64_FORMAT           OriginalMemberLayout;
  311.     PNDR64_FORMAT           OriginalPointerLayout;
  312.     PNDR64_FORMAT           PointerLayout;
  313.     PNDR64_FORMAT           ConfArrayDescription;
  314. } NDR64_CONF_BOGUS_STRUCTURE_HEADER_FORMAT;
  315. /*
  316. *   Structure member layout components
  317. */
  318. typedef struct _NDR64_SIMPLE_MEMBER_FORMAT
  319. {
  320.     NDR64_FORMAT_CHAR   FormatCode;
  321.     NDR64_UINT8         Reserved1;
  322.     NDR64_UINT16        Reserved2;
  323.     NDR64_UINT32        Reserved3;
  324. } NDR64_SIMPLE_MEMBER_FORMAT;
  325. typedef struct _NDR64_MEMPAD_FORMAT
  326. {
  327.     NDR64_FORMAT_CHAR   FormatCode;
  328.     NDR64_UINT8         Reserve1;
  329.     NDR64_UINT16        MemPad;
  330.     NDR64_UINT32        Reserved2;
  331. } NDR64_MEMPAD_FORMAT;
  332. typedef struct _NDR64_EMBEDDED_COMPLEX_FORMAT
  333. {
  334.     NDR64_FORMAT_CHAR FormatCode;
  335.     NDR64_UINT8       Reserve1;
  336.     NDR64_UINT16      Reserve2;
  337.     PNDR64_FORMAT     Type;
  338. } NDR64_EMBEDDED_COMPLEX_FORMAT;
  339. typedef struct _NDR64_BUFFER_ALIGN_FORMAT
  340. {
  341.     NDR64_FORMAT_CHAR   FormatCode;
  342.     NDR64_ALIGNMENT     Alignment;
  343.     NDR64_UINT16        Reserved;
  344.     NDR64_UINT32        Reserved2;
  345. } NDR64_BUFFER_ALIGN_FORMAT;
  346. typedef struct _NDR64_SIMPLE_REGION_FORMAT
  347. {
  348.     NDR64_FORMAT_CHAR   FormatCode;
  349.     NDR64_ALIGNMENT     Alignment;
  350.     NDR64_UINT16        RegionSize;
  351.     NDR64_UINT32        Reserved;
  352. } NDR64_SIMPLE_REGION_FORMAT;
  353. //
  354. // Unions
  355. //
  356. typedef struct _NDR64_ENCAPSULATED_UNION
  357. {
  358.     NDR64_FORMAT_CHAR   FormatCode;
  359.     NDR64_UINT8         Alignment;
  360.     NDR64_UINT8         Flags;
  361.     NDR64_FORMAT_CHAR   SwitchType;
  362.     NDR64_UINT32        MemoryOffset;
  363.     NDR64_UINT32        MemorySize;
  364.     NDR64_UINT32        Reserved;
  365. }
  366. NDR64_ENCAPSULATED_UNION;
  367. typedef struct _NDR64_NON_ENCAPSULATED_UNION
  368. {
  369.     NDR64_FORMAT_CHAR   FormatCode;
  370.     NDR64_UINT8         Alignment;
  371.     NDR64_UINT8         Flags;
  372.     NDR64_FORMAT_CHAR   SwitchType;
  373.     NDR64_UINT32        MemorySize;
  374.     PNDR64_FORMAT       Switch;
  375.     NDR64_UINT32        Reserved;
  376. }
  377. NDR64_NON_ENCAPSULATED_UNION;
  378. typedef struct _NDR64_UNION_ARM_SELECTOR
  379. {
  380.     NDR64_UINT8         Reserved1;
  381.     NDR64_UINT8         Alignment;
  382.     NDR64_UINT16        Reserved2;
  383.     NDR64_UINT32        Arms;
  384. }
  385. NDR64_UNION_ARM_SELECTOR;
  386. typedef struct _NDR64_UNION_ARM
  387. {
  388.     NDR64_INT64         CaseValue;
  389.     PNDR64_FORMAT       Type;
  390.     NDR64_UINT32        Reserved;
  391. }
  392. NDR64_UNION_ARM;
  393. /*
  394. *    Array related data
  395. */
  396. typedef struct _NDR64_ARRAY_FLAGS
  397. {
  398.     NDR64_UINT8         HasPointerInfo      :   1; /* 1 */
  399.     NDR64_UINT8         HasElementInfo      :   1; /* 2 */
  400.     NDR64_UINT8         IsMultiDimensional  :   1; /* 3 */
  401.     NDR64_UINT8         IsArrayofStrings    :   1; /* 4 */
  402.     NDR64_UINT8         Reserved1           :   1; /* 5 */
  403.     NDR64_UINT8         Reserved2           :   1; /* 6 */
  404.     NDR64_UINT8         Reserved3           :   1; /* 7 */
  405.     NDR64_UINT8         Reserved4           :   1; /* 8 */
  406. } NDR64_ARRAY_FLAGS;
  407. typedef struct _NDR64_ARRAY_ELEMENT_INFO
  408. {
  409.     NDR64_UINT32        ElementMemSize;
  410.     PNDR64_FORMAT       Element;
  411. } NDR64_ARRAY_ELEMENT_INFO;
  412. typedef struct _NDR64_FIX_ARRAY_HEADER_FORMAT
  413. {
  414.     NDR64_FORMAT_CHAR   FormatCode;
  415.     NDR64_ALIGNMENT     Alignment;
  416.     NDR64_ARRAY_FLAGS   Flags;
  417.     NDR64_UINT8         Reserved;
  418.     NDR64_UINT32        TotalSize;
  419. } NDR64_FIX_ARRAY_HEADER_FORMAT;
  420. typedef struct _NDR64_CONF_ARRAY_HEADER_FORMAT
  421. {
  422.     NDR64_FORMAT_CHAR   FormatCode;
  423.     NDR64_ALIGNMENT     Alignment;
  424.     NDR64_ARRAY_FLAGS   Flags;
  425.     NDR64_UINT8         Reserved;
  426.     NDR64_UINT32        ElementSize;
  427.     PNDR64_FORMAT       ConfDescriptor;
  428. } NDR64_CONF_ARRAY_HEADER_FORMAT;
  429. typedef struct _NDR64_CONF_VAR_ARRAY_HEADER_FORMAT
  430. {
  431.     NDR64_FORMAT_CHAR   FormatCode;
  432.     NDR64_ALIGNMENT     Alignment;
  433.     NDR64_ARRAY_FLAGS   Flags;
  434.     NDR64_UINT8         Reserved;
  435.     NDR64_UINT32        ElementSize;
  436.     PNDR64_FORMAT       ConfDescriptor;
  437.     PNDR64_FORMAT       VarDescriptor;
  438. } NDR64_CONF_VAR_ARRAY_HEADER_FORMAT;
  439. typedef struct _NDR64_VAR_ARRAY_HEADER_FORMAT
  440. {
  441.     NDR64_FORMAT_CHAR   FormatCode;
  442.     NDR64_ALIGNMENT     Alignment;
  443.     NDR64_ARRAY_FLAGS   Flags;
  444.     NDR64_UINT8         Reserved;
  445.     NDR64_UINT32        TotalSize;
  446.     NDR64_UINT32        ElementSize;
  447.     PNDR64_FORMAT       VarDescriptor;
  448. } NDR64_VAR_ARRAY_HEADER_FORMAT;
  449. typedef struct _NDR64_BOGUS_ARRAY_HEADER_FORMAT
  450. {
  451.     NDR64_FORMAT_CHAR   FormatCode;
  452.     NDR64_ALIGNMENT     Alignment;
  453.     NDR64_ARRAY_FLAGS   Flags;
  454.     NDR64_UINT8         NumberDims;
  455.     NDR64_UINT32        NumberElements;
  456.     PNDR64_FORMAT       Element;
  457. } NDR64_BOGUS_ARRAY_HEADER_FORMAT;
  458. typedef struct _NDR64_CONF_VAR_BOGUS_ARRAY_HEADER_FORMAT
  459. {
  460.     NDR64_BOGUS_ARRAY_HEADER_FORMAT FixedArrayFormat;
  461.     PNDR64_FORMAT                ConfDescription;
  462.     PNDR64_FORMAT                VarDescription;
  463.     PNDR64_FORMAT                OffsetDescription;
  464. } NDR64_CONF_VAR_BOGUS_ARRAY_HEADER_FORMAT;
  465. /*
  466. *   String related data.
  467. */
  468. typedef struct _NDR64_STRING_FLAGS
  469. {
  470.   NDR64_UINT8           IsSized     : 1;
  471.   NDR64_UINT8           Reserved2   : 1;
  472.   NDR64_UINT8           Reserved3   : 1;
  473.   NDR64_UINT8           Reserved4   : 1;
  474.   NDR64_UINT8           Reserved5   : 1;
  475.   NDR64_UINT8           Reserved6   : 1;
  476.   NDR64_UINT8           Reserved7   : 1;
  477.   NDR64_UINT8           Reserved8   : 1;
  478. } NDR64_STRING_FLAGS;
  479. typedef struct NDR64_STRING_HEADER_FORMAT
  480. {
  481.     NDR64_FORMAT_CHAR    FormatCode;
  482.     NDR64_STRING_FLAGS   Flags;
  483.     NDR64_UINT16         ElementSize;
  484. } NDR64_STRING_HEADER_FORMAT;
  485. typedef struct _NDR64_NON_CONFORMANT_STRING_FORMAT
  486. {
  487.    NDR64_STRING_HEADER_FORMAT   Header;
  488.    NDR64_UINT32                 TotalSize;
  489. } NDR64_NON_CONFORMANT_STRING_FORMAT;
  490. typedef struct _NDR64_CONFORMANT_STRING_FORMAT
  491. {
  492.    NDR64_STRING_HEADER_FORMAT   Header;
  493. } NDR64_CONFORMANT_STRING_FORMAT;
  494. typedef struct NDR64_SIZED_CONFORMANT_STRING_FORMAT
  495. {
  496.    NDR64_STRING_HEADER_FORMAT   Header;
  497.    PNDR64_FORMAT                SizeDescription;
  498. } NDR64_SIZED_CONFORMANT_STRING_FORMAT;
  499. //
  500. // Correlation expressions
  501. //
  502. typedef enum _tagEXPR_TOKEN
  503. {
  504.     FC_EXPR_START = 0,
  505.     FC_EXPR_ILLEGAL = FC_EXPR_START,
  506.     FC_EXPR_CONST32,
  507.     FC_EXPR_CONST64,
  508.     FC_EXPR_VAR,
  509.     FC_EXPR_OPER,
  510.     FC_EXPR_NOOP,    // pad up the format string buffer.
  511.     FC_EXPR_END
  512. } EXPR_TOKEN;
  513. typedef struct _NDR64_EXPR_OPERATOR
  514. {
  515.     NDR64_FORMAT_CHAR   ExprType;
  516.     NDR64_FORMAT_CHAR   Operator;
  517.     NDR64_FORMAT_CHAR   CastType;
  518.     NDR64_UINT8         Reserved;
  519. } NDR64_EXPR_OPERATOR;
  520. typedef struct _NDR64_EXPR_CONST32
  521. {
  522.     NDR64_FORMAT_CHAR   ExprType;
  523.     NDR64_FORMAT_CHAR   Reserved;
  524.     NDR64_UINT16        Reserved1;
  525.     NDR64_UINT32        ConstValue;
  526. } NDR64_EXPR_CONST32;
  527. typedef struct _NDR64_EXPR_CONST64
  528. {
  529.     NDR64_FORMAT_CHAR   ExprType;
  530.     NDR64_FORMAT_CHAR   Reserved;
  531.     NDR64_UINT16        Reserved1;
  532.     NDR64_INT64         ConstValue;
  533. } NDR64_EXPR_CONST64;
  534. typedef struct _NDR64_EXPR_VAR
  535. {
  536.     NDR64_FORMAT_CHAR   ExprType;
  537.     NDR64_FORMAT_CHAR   VarType;
  538.     NDR64_UINT16        Reserved;
  539.     NDR64_UINT32        Offset;
  540. } NDR64_EXPR_VAR;
  541. typedef struct _NDR64_EXPR_NOOP
  542. {
  543.     NDR64_FORMAT_CHAR   ExprType;
  544.     NDR64_UINT8         Size;
  545.     NDR64_UINT16        Reserved;
  546. } NDR64_EXPR_NOOP;
  547. //
  548. // transmit_as, represent_as
  549. //
  550. typedef struct _NDR64_TRANSMIT_AS_FLAGS
  551. {
  552.     NDR64_UINT8         PresentedTypeIsArray : 1;
  553.     NDR64_UINT8         PresentedTypeAlign4  : 1;
  554.     NDR64_UINT8         PresentedTypeAlign8  : 1;
  555.     NDR64_UINT8         Reserved             : 5;
  556. } NDR64_TRANSMIT_AS_FLAGS;
  557. typedef struct _NDR64_TRANSMIT_AS_FORMAT
  558. {
  559.     NDR64_FORMAT_CHAR   FormatCode;
  560.     NDR64_UINT8         Flags;
  561.     NDR64_UINT16        RoutineIndex;
  562.     NDR64_UINT16        TransmittedTypeWireAlignment;
  563.     NDR64_UINT16        MemoryAlignment;
  564.     NDR64_UINT32        PresentedTypeMemorySize;
  565.     NDR64_UINT32        TransmittedTypeBufferSize;
  566.     PNDR64_FORMAT       TransmittedType;
  567. } NDR64_TRANSMIT_AS_FORMAT;
  568. typedef NDR64_TRANSMIT_AS_FORMAT NDR64_REPRESENT_AS_FORMAT;
  569. //
  570. // user_marshal
  571. //
  572. typedef struct _NDR64_USER_MARSHAL_FLAGS
  573. {
  574.     NDR64_UINT8         Reserved        : 5;
  575.     NDR64_UINT8         IID             : 1;
  576.     NDR64_UINT8         RefPointer      : 1;
  577.     NDR64_UINT8         UniquePointer   : 1;
  578. } NDR64_USER_MARSHAL_FLAGS;
  579. typedef struct _NDR64_USER_MARSHAL_FORMAT
  580. {
  581.     NDR64_FORMAT_CHAR   FormatCode;
  582.     NDR64_UINT8         Flags;
  583.     NDR64_UINT16        RoutineIndex;
  584.     NDR64_UINT16        TransmittedTypeWireAlignment;
  585.     NDR64_UINT16        MemoryAlignment;
  586.     NDR64_UINT32        UserTypeMemorySize;
  587.     NDR64_UINT32        TransmittedTypeBufferSize;
  588.     PNDR64_FORMAT       TransmittedType;
  589. } NDR64_USER_MARSHAL_FORMAT;
  590. //
  591. // Pipes
  592. //
  593. typedef struct NDR64_PIPE_FLAGS
  594. {
  595.     NDR64_UINT8         Reserved1  : 5;
  596.     NDR64_UINT8         HasRange   : 1;
  597.     NDR64_UINT8         BlockCopy  : 1;
  598.     NDR64_UINT8         Reserved2  : 1;
  599. } NDR64_PIPE_FLAGS;
  600. typedef struct _NDR64_PIPE_FORMAT
  601. {
  602.     NDR64_FORMAT_CHAR   FormatCode;
  603.     NDR64_UINT8         Flags;
  604.     NDR64_UINT8         Alignment;
  605.     NDR64_UINT8         Reserved;
  606.     PNDR64_FORMAT       Type;
  607.     NDR64_UINT32        MemorySize;
  608.     NDR64_UINT32        BufferSize;
  609. } NDR64_PIPE_FORMAT;
  610. typedef struct _NDR64_RANGE_PIPE_FORMAT
  611. {
  612.     NDR64_FORMAT_CHAR   FormatCode;
  613.     NDR64_UINT8         Flags;
  614.     NDR64_UINT8         Alignment;
  615.     NDR64_UINT8         Reserved;
  616.     PNDR64_FORMAT       Type;
  617.     NDR64_UINT32        MemorySize;
  618.     NDR64_UINT32        BufferSize;
  619.     NDR64_UINT32        MinValue;
  620.     NDR64_UINT32        MaxValue;
  621. } NDR64_RANGE_PIPE_FORMAT;
  622. #include <poppack.h>
  623. #endif //_NDR64TYPES_H