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

模拟服务器

开发平台:

C/C++

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4.     rpcndr.h
  5. Abstract:
  6.     Definitions for stub data structures and prototypes of helper functions.
  7. --*/
  8. // This version of the rpcndr.h file corresponds to MIDL version 5.0.+
  9. // used with Windows 2000/XP build 1700+
  10. #ifndef __RPCNDR_H_VERSION__
  11. #define __RPCNDR_H_VERSION__        ( 475 )
  12. #endif // __RPCNDR_H_VERSION__
  13. #ifndef __RPCNDR_H__
  14. #define __RPCNDR_H__
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif
  18. #ifdef __REQUIRED_RPCNDR_H_VERSION__
  19.     #if ( __RPCNDR_H_VERSION__ < __REQUIRED_RPCNDR_H_VERSION__ )
  20.         #error incorrect <rpcndr.h> version. Use the header that matches with the MIDL compiler.
  21.     #endif
  22. #endif
  23. #include <pshpack8.h>
  24. #include <basetsd.h>
  25. #include <rpcnsip.h>
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. /****************************************************************************
  30.      Network Computing Architecture (NCA) definition:
  31.      Network Data Representation: (NDR) Label format:
  32.      An unsigned long (32 bits) with the following layout:
  33.      3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  34.      1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
  35.     +---------------+---------------+---------------+-------+-------+
  36.     |   Reserved    |   Reserved    |Floating point | Int   | Char  |
  37.     |               |               |Representation | Rep.  | Rep.  |
  38.     +---------------+---------------+---------------+-------+-------+
  39.      Where
  40.          Reserved:
  41.              Must be zero (0) for NCA 1.5 and NCA 2.0.
  42.          Floating point Representation is:
  43.              0 - IEEE
  44.              1 - VAX
  45.              2 - Cray
  46.              3 - IBM
  47.          Int Rep. is Integer Representation:
  48.              0 - Big Endian
  49.              1 - Little Endian
  50.          Char Rep. is Character Representation:
  51.              0 - ASCII
  52.              1 - EBCDIC
  53.      The Microsoft Local Data Representation (for all platforms which are
  54.      of interest currently is edefined below:
  55.  ****************************************************************************/
  56. #define NDR_CHAR_REP_MASK               (unsigned long)0X0000000FL
  57. #define NDR_INT_REP_MASK                (unsigned long)0X000000F0L
  58. #define NDR_FLOAT_REP_MASK              (unsigned long)0X0000FF00L
  59. #define NDR_LITTLE_ENDIAN               (unsigned long)0X00000010L
  60. #define NDR_BIG_ENDIAN                  (unsigned long)0X00000000L
  61. #define NDR_IEEE_FLOAT                  (unsigned long)0X00000000L
  62. #define NDR_VAX_FLOAT                   (unsigned long)0X00000100L
  63. #define NDR_IBM_FLOAT                   (unsigned long)0X00000300L
  64. #define NDR_ASCII_CHAR                  (unsigned long)0X00000000L
  65. #define NDR_EBCDIC_CHAR                 (unsigned long)0X00000001L
  66. #if defined(__RPC_MAC__)
  67. #define NDR_LOCAL_DATA_REPRESENTATION   (unsigned long)0X00000000L
  68. #define NDR_LOCAL_ENDIAN                NDR_BIG_ENDIAN
  69. #else
  70. #define NDR_LOCAL_DATA_REPRESENTATION   (unsigned long)0X00000010L
  71. #define NDR_LOCAL_ENDIAN                NDR_LITTLE_ENDIAN
  72. #endif
  73. /****************************************************************************
  74.  *  Macros for targeted platforms
  75.  ****************************************************************************/
  76. #if (0x501 <= _WIN32_WINNT)
  77. #define TARGET_IS_NT51_OR_LATER                   1
  78. #else
  79. #define TARGET_IS_NT51_OR_LATER                   0
  80. #endif
  81. #if (0x500 <= _WIN32_WINNT)
  82. #define TARGET_IS_NT50_OR_LATER                   1
  83. #else
  84. #define TARGET_IS_NT50_OR_LATER                   0
  85. #endif
  86. #if (defined(_WIN32_DCOM) || 0x400 <= _WIN32_WINNT)
  87. #define TARGET_IS_NT40_OR_LATER                   1
  88. #else
  89. #define TARGET_IS_NT40_OR_LATER                   0
  90. #endif
  91. #if (0x400 <= WINVER)
  92. #define TARGET_IS_NT351_OR_WIN95_OR_LATER         1
  93. #else
  94. #define TARGET_IS_NT351_OR_WIN95_OR_LATER         0
  95. #endif
  96. /****************************************************************************
  97.  *  Other MIDL base types / predefined types:
  98.  ****************************************************************************/
  99. #define small char
  100. typedef unsigned char byte;
  101. typedef byte cs_byte;
  102. typedef unsigned char boolean;
  103. #ifndef _HYPER_DEFINED
  104. #define _HYPER_DEFINED
  105. #if (!defined(_M_IX86) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64))
  106. #define  hyper           __int64
  107. #define MIDL_uhyper  unsigned __int64
  108. #else
  109. typedef double  hyper;
  110. typedef double MIDL_uhyper;
  111. #endif
  112. #endif // _HYPER_DEFINED
  113. #ifndef _WCHAR_T_DEFINED
  114. typedef unsigned short wchar_t;
  115. #define _WCHAR_T_DEFINED
  116. #endif
  117. #ifndef _SIZE_T_DEFINED
  118. #ifdef __RPC_WIN64__
  119. typedef unsigned __int64 size_t;
  120. #else
  121. typedef unsigned int     size_t;
  122. #endif
  123. #define _SIZE_T_DEFINED
  124. #endif
  125. #ifdef __RPC_WIN32__
  126. #if   (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
  127. #define __RPC_CALLEE       __stdcall
  128. #else
  129. #define __RPC_CALLEE
  130. #endif
  131. #endif
  132. #ifndef __MIDL_USER_DEFINED
  133. #define midl_user_allocate MIDL_user_allocate
  134. #define midl_user_free     MIDL_user_free
  135. #define __MIDL_USER_DEFINED
  136. #endif
  137. void  * __RPC_USER MIDL_user_allocate(size_t);
  138. void             __RPC_USER MIDL_user_free( void  * );
  139. #define RPC_VAR_ENTRY __cdecl
  140. /* winnt only */
  141. #if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)
  142. #define __MIDL_DECLSPEC_DLLIMPORT   __declspec(dllimport)
  143. #define __MIDL_DECLSPEC_DLLEXPORT   __declspec(dllexport)
  144. #else
  145. #define __MIDL_DECLSPEC_DLLIMPORT
  146. #define __MIDL_DECLSPEC_DLLEXPORT
  147. #endif
  148. /****************************************************************************
  149.  * Context handle management related definitions:
  150.  *
  151.  * Client and Server Contexts.
  152.  *
  153.  ****************************************************************************/
  154. typedef void  * NDR_CCONTEXT;
  155. typedef struct
  156.     {
  157.     void  * pad[2];
  158.     void  * userContext;
  159.     }  * NDR_SCONTEXT;
  160. #define NDRSContextValue(hContext) (&(hContext)->userContext)
  161. #define cbNDRContext 20         /* size of context on WIRE */
  162. typedef void (__RPC_USER  * NDR_RUNDOWN)(void  * context);
  163. typedef void (__RPC_USER  * NDR_NOTIFY_ROUTINE)(void);
  164. typedef void (__RPC_USER  * NDR_NOTIFY2_ROUTINE)(boolean flag);
  165. typedef struct _SCONTEXT_QUEUE {
  166.     unsigned long   NumberOfObjects;
  167.     NDR_SCONTEXT  * ArrayOfObjects;
  168.     } SCONTEXT_QUEUE,  * PSCONTEXT_QUEUE;
  169. RPCRTAPI
  170. RPC_BINDING_HANDLE
  171. RPC_ENTRY
  172. NDRCContextBinding (
  173.     IN NDR_CCONTEXT     CContext
  174.     );
  175. RPCRTAPI
  176. void
  177. RPC_ENTRY
  178. NDRCContextMarshall (
  179.     IN  NDR_CCONTEXT    CContext,
  180.     OUT void  *pBuff
  181.     );
  182. RPCRTAPI
  183. void
  184. RPC_ENTRY
  185. NDRCContextUnmarshall (
  186.     OUT NDR_CCONTEXT        *   pCContext,
  187.     IN  RPC_BINDING_HANDLE      hBinding,
  188.     IN  void                *   pBuff,
  189.     IN  unsigned long           DataRepresentation
  190.     );
  191. RPCRTAPI
  192. void
  193. RPC_ENTRY
  194. NDRSContextMarshall (
  195.     IN  NDR_SCONTEXT    CContext,
  196.     OUT void          * pBuff,
  197.     IN  NDR_RUNDOWN     userRunDownIn
  198.     );
  199. RPCRTAPI
  200. NDR_SCONTEXT
  201. RPC_ENTRY
  202. NDRSContextUnmarshall (
  203.     IN  void          * pBuff,
  204.     IN  unsigned long   DataRepresentation
  205.     );
  206. RPCRTAPI
  207. void
  208. RPC_ENTRY
  209. NDRSContextMarshallEx (
  210.     IN  RPC_BINDING_HANDLE  BindingHandle,
  211.     IN  NDR_SCONTEXT        CContext,
  212.     OUT void              * pBuff,
  213.     IN  NDR_RUNDOWN         userRunDownIn
  214.     );
  215. RPCRTAPI
  216. void
  217. RPC_ENTRY
  218. NDRSContextMarshall2 (
  219.     IN  RPC_BINDING_HANDLE  BindingHandle,
  220.     IN  NDR_SCONTEXT        CContext,
  221.     OUT void              * pBuff,
  222.     IN  NDR_RUNDOWN         userRunDownIn,
  223.     IN  void              * CtxGuard,
  224.     IN unsigned long        Flags
  225.     );
  226. RPCRTAPI
  227. NDR_SCONTEXT
  228. RPC_ENTRY
  229. NDRSContextUnmarshallEx (
  230.     IN  RPC_BINDING_HANDLE  BindingHandle,
  231.     IN  void              * pBuff,
  232.     IN  unsigned long       DataRepresentation
  233.     );
  234. RPCRTAPI
  235. NDR_SCONTEXT
  236. RPC_ENTRY
  237. NDRSContextUnmarshall2(
  238.     IN  RPC_BINDING_HANDLE  BindingHandle,
  239.     IN  void              * pBuff,
  240.     IN  unsigned long       DataRepresentation,
  241.     IN  void              * CtxGuard,
  242.     IN unsigned long        Flags
  243.     );
  244. RPCRTAPI
  245. void
  246. RPC_ENTRY
  247. RpcSsDestroyClientContext (
  248.     IN void  *  * ContextHandle
  249.     );
  250. /****************************************************************************
  251.     NDR conversion related definitions.
  252.  ****************************************************************************/
  253. #define byte_from_ndr(source, target) 
  254.     { 
  255.     *(target) = *(*(char  *  *)&(source)->Buffer)++; 
  256.     }
  257. #define byte_array_from_ndr(Source, LowerIndex, UpperIndex, Target) 
  258.     { 
  259.     NDRcopy ( 
  260.         (((char  *)(Target))+(LowerIndex)), 
  261.         (Source)->Buffer, 
  262.         (unsigned int)((UpperIndex)-(LowerIndex))); 
  263.     *(unsigned long  *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); 
  264.     }
  265. #define boolean_from_ndr(source, target) 
  266.     { 
  267.     *(target) = *(*(char  *  *)&(source)->Buffer)++; 
  268.     }
  269. #define boolean_array_from_ndr(Source, LowerIndex, UpperIndex, Target) 
  270.     { 
  271.     NDRcopy ( 
  272.         (((char  *)(Target))+(LowerIndex)), 
  273.         (Source)->Buffer, 
  274.         (unsigned int)((UpperIndex)-(LowerIndex))); 
  275.     *(unsigned long  *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); 
  276.     }
  277. #define small_from_ndr(source, target) 
  278.     { 
  279.     *(target) = *(*(char  *  *)&(source)->Buffer)++; 
  280.     }
  281. #define small_from_ndr_temp(source, target, format) 
  282.     { 
  283.     *(target) = *(*(char  *  *)(source))++; 
  284.     }
  285. #define small_array_from_ndr(Source, LowerIndex, UpperIndex, Target) 
  286.     { 
  287.     NDRcopy ( 
  288.         (((char  *)(Target))+(LowerIndex)), 
  289.         (Source)->Buffer, 
  290.         (unsigned int)((UpperIndex)-(LowerIndex))); 
  291.     *(unsigned long  *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); 
  292.     }
  293. /****************************************************************************
  294.     Platform specific mapping of c-runtime functions.
  295.  ****************************************************************************/
  296. #if defined(__RPC_WIN32__) || defined(__RPC_WIN64__)
  297. #define MIDL_ascii_strlen(string) 
  298.     strlen(string)
  299. #define MIDL_ascii_strcpy(target,source) 
  300.     strcpy(target,source)
  301. #define MIDL_memset(s,c,n) 
  302.     memset(s,c,n)
  303. #endif
  304. /****************************************************************************
  305.     MIDL 2.0 ndr definitions.
  306.  ****************************************************************************/
  307. typedef unsigned long error_status_t;
  308. #define _midl_ma1( p, cast )    *(*( cast **)&p)++
  309. #define _midl_ma2( p, cast )    *(*( cast **)&p)++
  310. #define _midl_ma4( p, cast )    *(*( cast **)&p)++
  311. #define _midl_ma8( p, cast )    *(*( cast **)&p)++
  312. #define _midl_unma1( p, cast )  *(( cast *)p)++
  313. #define _midl_unma2( p, cast )  *(( cast *)p)++
  314. #define _midl_unma3( p, cast )  *(( cast *)p)++
  315. #define _midl_unma4( p, cast )  *(( cast *)p)++
  316. // Some alignment specific macros.
  317. // RKK64
  318. // these appear to be used in fossils inside MIDL
  319. #define _midl_fa2( p )          (p = (RPC_BUFPTR )((ULONG_PTR)(p+1) & ~0x1))
  320. #define _midl_fa4( p )          (p = (RPC_BUFPTR )((ULONG_PTR)(p+3) & ~0x3))
  321. #define _midl_fa8( p )          (p = (RPC_BUFPTR )((ULONG_PTR)(p+7) & ~0x7))
  322. #define _midl_addp( p, n )      (p += n)
  323. // Marshalling macros
  324. #define _midl_marsh_lhs( p, cast )  *(*( cast **)&p)++
  325. #define _midl_marsh_up( mp, p )     *(*(unsigned long **)&mp)++ = (unsigned long)p
  326. #define _midl_advmp( mp )           *(*(unsigned long **)&mp)++
  327. #define _midl_unmarsh_up( p )       (*(*(unsigned long **)&p)++)
  328. ////////////////////////////////////////////////////////////////////////////
  329. // Ndr macros.
  330. ////////////////////////////////////////////////////////////////////////////
  331. // RKK64
  332. // these appear to be used in fossils inside MIDL
  333. #define NdrMarshConfStringHdr( p, s, l )    (_midl_ma4( p, unsigned long) = s, 
  334.                                             _midl_ma4( p, unsigned long) = 0, 
  335.                                             _midl_ma4( p, unsigned long) = l)
  336. #define NdrUnMarshConfStringHdr(p, s, l)    ((s=_midl_unma4(p,unsigned long),
  337.                                             (_midl_addp(p,4)),               
  338.                                             (l=_midl_unma4(p,unsigned long))
  339. #define NdrMarshCCtxtHdl(pc,p)  (NDRCContextMarshall( (NDR_CCONTEXT)pc, p ),p+20)
  340. #define NdrUnMarshCCtxtHdl(pc,p,h,drep) 
  341.         (NDRCContextUnmarshall((NDR_CONTEXT)pc,h,p,drep), p+20)
  342. #define NdrUnMarshSCtxtHdl(pc, p,drep)  (pc = NdrSContextUnMarshall(p,drep ))
  343. #define NdrMarshSCtxtHdl(pc,p,rd)   (NdrSContextMarshall((NDR_SCONTEXT)pc,p, (NDR_RUNDOWN)rd)
  344. // end of unused
  345. #define NdrFieldOffset(s,f)     (LONG_PTR)(& (((s  *)0)->f))
  346. #define NdrFieldPad(s,f,p,t)    ((unsigned long)(NdrFieldOffset(s,f) - NdrFieldOffset(s,p)) - sizeof(t))
  347. #define NdrFcShort(s)   (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
  348. #define NdrFcLong(s)    (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), 
  349.                         (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
  350. //
  351. // On the server side, the following exceptions are mapped to
  352. // the bad stub data exception if -error stub_data is used.
  353. //
  354. #define RPC_BAD_STUB_DATA_EXCEPTION_FILTER  
  355.                  ( (RpcExceptionCode() == STATUS_ACCESS_VIOLATION)  || 
  356.                    (RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || 
  357.                    (RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || 
  358.                    (RpcExceptionCode() == RPC_S_INVALID_BOUND) )
  359. /////////////////////////////////////////////////////////////////////////////
  360. // Some stub helper functions.
  361. /////////////////////////////////////////////////////////////////////////////
  362. ////////////////////////////////////////////////////////////////////////////
  363. // Stub helper structures.
  364. ////////////////////////////////////////////////////////////////////////////
  365. struct _MIDL_STUB_MESSAGE;
  366. struct _MIDL_STUB_DESC;
  367. struct _FULL_PTR_XLAT_TABLES;
  368. typedef unsigned char  *    RPC_BUFPTR;
  369. typedef unsigned long       RPC_LENGTH;
  370. // Expression evaluation callback routine prototype.
  371. typedef void (__RPC_USER  * EXPR_EVAL)( struct _MIDL_STUB_MESSAGE  * );
  372. typedef const unsigned char  * PFORMAT_STRING;
  373. /*
  374.  * Multidimensional conformant/varying array struct.
  375.  */
  376. typedef struct
  377.     {
  378.     long              Dimension;
  379.     /* These fields MUST be (unsigned long *) */
  380.     unsigned long  *  BufferConformanceMark;
  381.     unsigned long  *  BufferVarianceMark;
  382.     /* Count arrays, used for top level arrays in -Os stubs */
  383.     unsigned long  *  MaxCountArray;
  384.     unsigned long  *  OffsetArray;
  385.     unsigned long  *  ActualCountArray;
  386.     } ARRAY_INFO,  *PARRAY_INFO;
  387. typedef struct _NDR_ASYNC_MESSAGE *   PNDR_ASYNC_MESSAGE;
  388. typedef struct _NDR_CORRELATION_INFO *PNDR_CORRELATION_INFO;
  389. /*
  390.  * cs_char info in the stub message
  391.  */
  392. typedef struct
  393.     {
  394.     unsigned long   WireCodeset;
  395.     unsigned long   DesiredReceivingCodeset;
  396.     void           *CSArrayInfo;
  397.     } CS_STUB_INFO;
  398. /*
  399.  * MIDL Stub Message
  400.  */
  401. typedef const unsigned char  * PFORMAT_STRING;
  402. typedef struct _MIDL_SYNTAX_INFO MIDL_SYNTAX_INFO, *PMIDL_SYNTAX_INFO;
  403. struct NDR_ALLOC_ALL_NODES_CONTEXT;
  404. struct NDR_POINTER_QUEUE_STATE;
  405. struct _NDR_PROC_CONTEXT;
  406. typedef struct _MIDL_STUB_MESSAGE
  407.     {
  408.     /* RPC message structure. */
  409.     PRPC_MESSAGE            RpcMsg;
  410.     /* Pointer into RPC message buffer. */
  411.     unsigned char       *   Buffer;
  412.     /*
  413.      * These are used internally by the Ndr routines to mark the beginning
  414.      * and end of an incoming RPC buffer.
  415.      */
  416.     unsigned char       *   BufferStart;
  417.     unsigned char       *   BufferEnd;
  418.     /*
  419.      * Used internally by the Ndr routines as a place holder in the buffer.
  420.      * On the marshalling side it's used to mark the location where conformance
  421.      * size should be marshalled.
  422.      * On the unmarshalling side it's used to mark the location in the buffer
  423.      * used during pointer unmarshalling to base pointer offsets off of.
  424.      */
  425.     unsigned char       *   BufferMark;
  426.     /* Set by the buffer sizing routines. */
  427.     unsigned long           BufferLength;
  428.     /* Set by the memory sizing routines. */
  429.     unsigned long           MemorySize;
  430.     /* Pointer to user memory. */
  431.     unsigned char       *   Memory;
  432.     /* Is the Ndr routine begin called from a client side stub. */
  433.     int                     IsClient;
  434.     /* Can the buffer be re-used for memory on unmarshalling. */
  435.     int                     ReuseBuffer;
  436.     /* Hold the context for allocate all nodes */
  437.     struct NDR_ALLOC_ALL_NODES_CONTEXT *pAllocAllNodesContext;
  438.     struct NDR_POINTER_QUEUE_STATE     *pPointerQueueState;
  439.     /*
  440.      * Stuff needed while handling complex structures
  441.      */
  442.     /* Ignore imbeded pointers while computing buffer or memory sizes. */
  443.     int                     IgnoreEmbeddedPointers;
  444.     /*
  445.      * This marks the location in the buffer where pointees of a complex
  446.      * struct reside.
  447.      */
  448.     unsigned char       *   PointerBufferMark;
  449.     /*
  450.      * Used to catch errors in SendReceive.
  451.      */
  452.     unsigned char           fBufferValid;
  453.     unsigned char           uFlags;
  454.     unsigned short          Unused2;
  455.     /*
  456.      * Used internally by the Ndr routines.  Holds the max counts for
  457.      * a conformant array.
  458.      */
  459.     ULONG_PTR               MaxCount;
  460.     /*
  461.      * Used internally by the Ndr routines.  Holds the offsets for a varying
  462.      * array.
  463.      */
  464.     unsigned long           Offset;
  465.     /*
  466.      * Used internally by the Ndr routines.  Holds the actual counts for
  467.      * a varying array.
  468.      */
  469.     unsigned long           ActualCount;
  470.     /* Allocation and Free routine to be used by the Ndr routines. */
  471.     void  *                 ( __RPC_API * pfnAllocate)(size_t);
  472.     void                    ( __RPC_API * pfnFree)(void  *);
  473.     /*
  474.      * Top of parameter stack.  Used for "single call" stubs during marshalling
  475.      * to hold the beginning of the parameter list on the stack.  Needed to
  476.      * extract parameters which hold attribute values for top level arrays and
  477.      * pointers.
  478.      */
  479.     unsigned char       *   StackTop;
  480.     /*
  481.      *  Fields used for the transmit_as and represent_as objects.
  482.      *  For represent_as the mapping is: presented=local, transmit=named.
  483.      */
  484.     unsigned char       *   pPresentedType;
  485.     unsigned char       *   pTransmitType;
  486.     /*
  487.      * When we first construct a binding on the client side, stick it
  488.      * in the rpcmessage and later call RpcGetBuffer, the handle field
  489.      * in the rpcmessage is changed. That's fine except that we need to
  490.      * have that original handle for use in unmarshalling context handles
  491.      * (the second argument in NDRCContextUnmarshall to be exact). So
  492.      * stash the contructed handle here and extract it when needed.
  493.      */
  494.     handle_t                SavedHandle;
  495.     /*
  496.      * Pointer back to the stub descriptor.  Use this to get all handle info.
  497.      */
  498.     const struct _MIDL_STUB_DESC  * StubDesc;
  499.     /*
  500.      * Full pointer stuff.
  501.      */
  502.     struct _FULL_PTR_XLAT_TABLES  * FullPtrXlatTables;
  503.     unsigned long                   FullPtrRefId;
  504.     unsigned long                   PointerLength;
  505.     int                             fInDontFree       :1;
  506.     int                             fDontCallFreeInst :1;
  507.     int                             fInOnlyParam      :1;
  508.     int                             fHasReturn        :1;
  509.     int                             fHasExtensions    :1;
  510.     int                             fHasNewCorrDesc   :1;
  511.     int                             fUnused           :10;
  512.     int                             fUnused2          :16;
  513.     unsigned long                   dwDestContext;
  514.     void  *                         pvDestContext;
  515.     NDR_SCONTEXT *                  SavedContextHandles;
  516.     long                            ParamNumber;
  517.     struct IRpcChannelBuffer    *   pRpcChannelBuffer;
  518.     PARRAY_INFO                     pArrayInfo;
  519.     unsigned long           *       SizePtrCountArray;
  520.     unsigned long           *       SizePtrOffsetArray;
  521.     unsigned long           *       SizePtrLengthArray;
  522.     /*
  523.      * Interpreter argument queue.  Used on server side only.
  524.      */
  525.     void                    *       pArgQueue;
  526.     unsigned long                   dwStubPhase;
  527.     void                    *       LowStackMark;
  528.     /*
  529.      *  Async message pointer, correlation data - NT 5.0 features.
  530.      */
  531.     PNDR_ASYNC_MESSAGE              pAsyncMsg;
  532.     PNDR_CORRELATION_INFO           pCorrInfo;
  533.     unsigned char *                 pCorrMemory;
  534.     void *                          pMemoryList;
  535.     /*
  536.      *  Reserved fields up to this point present since the 3.50 release.
  537.      *  Reserved fields below were introduced for Windows 2000 release.
  538.      *  (but not used).
  539.      */
  540.     /*
  541.      * International character support information - NT 5.1 feature.
  542.      */
  543.     CS_STUB_INFO *                  pCSInfo;
  544.     unsigned char *                 ConformanceMark;
  545.     unsigned char *                 VarianceMark;
  546. #if defined(IA64)
  547.     void                   *        BackingStoreLowMark;
  548. #else
  549.     INT_PTR                         Unused;
  550. #endif
  551.     struct _NDR_PROC_CONTEXT *      pContext;
  552.     /*
  553.      *  Reserved fields up to this point present since Windows 2000 release.
  554.      *  Fields added for NT5.1
  555.      */
  556.     INT_PTR                         Reserved51_1;
  557.     INT_PTR                         Reserved51_2;
  558.     INT_PTR                         Reserved51_3;
  559.     INT_PTR                         Reserved51_4;
  560.     INT_PTR                         Reserved51_5;
  561.     /*
  562.      *  Reserved fields up to this point present since NT5.1 release.
  563.      */
  564.     } MIDL_STUB_MESSAGE,  *PMIDL_STUB_MESSAGE;
  565. typedef  struct _MIDL_STUB_MESSAGE MIDL_STUB_MESSAGE,   *PMIDL_STUB_MESSAGE;
  566. /*
  567.  * Generic handle bind/unbind routine pair.
  568.  */
  569. typedef void  *
  570.         ( __RPC_API * GENERIC_BINDING_ROUTINE)
  571.         (void  *);
  572. typedef void
  573.         ( __RPC_API * GENERIC_UNBIND_ROUTINE)
  574.         (void  *, unsigned char  *);
  575. typedef struct _GENERIC_BINDING_ROUTINE_PAIR
  576.     {
  577.     GENERIC_BINDING_ROUTINE     pfnBind;
  578.     GENERIC_UNBIND_ROUTINE      pfnUnbind;
  579.     } GENERIC_BINDING_ROUTINE_PAIR,  *PGENERIC_BINDING_ROUTINE_PAIR;
  580. typedef struct __GENERIC_BINDING_INFO
  581.     {
  582.     void  *            pObj;
  583.     unsigned int                Size;
  584.     GENERIC_BINDING_ROUTINE     pfnBind;
  585.     GENERIC_UNBIND_ROUTINE      pfnUnbind;
  586.     } GENERIC_BINDING_INFO,  *PGENERIC_BINDING_INFO;
  587. // typedef EXPR_EVAL - see above
  588. // typedefs for xmit_as
  589. #if (defined(_MSC_VER)) && !defined(MIDL_PASS)
  590. // a Microsoft C++ compiler
  591. #define NDR_SHAREABLE __inline
  592. #else
  593. #define NDR_SHAREABLE static
  594. #endif
  595. typedef void ( __RPC_USER * XMIT_HELPER_ROUTINE)
  596.     ( PMIDL_STUB_MESSAGE );
  597. typedef struct _XMIT_ROUTINE_QUINTUPLE
  598.     {
  599.     XMIT_HELPER_ROUTINE     pfnTranslateToXmit;
  600.     XMIT_HELPER_ROUTINE     pfnTranslateFromXmit;
  601.     XMIT_HELPER_ROUTINE     pfnFreeXmit;
  602.     XMIT_HELPER_ROUTINE     pfnFreeInst;
  603.     } XMIT_ROUTINE_QUINTUPLE,  *PXMIT_ROUTINE_QUINTUPLE;
  604. typedef unsigned long
  605. ( __RPC_USER * USER_MARSHAL_SIZING_ROUTINE)
  606.     (unsigned long  *,
  607.      unsigned long,
  608.      void  * );
  609. typedef unsigned char  *
  610. ( __RPC_USER * USER_MARSHAL_MARSHALLING_ROUTINE)
  611.     (unsigned long  *,
  612.      unsigned char  * ,
  613.      void  * );
  614. typedef unsigned char  *
  615. ( __RPC_USER * USER_MARSHAL_UNMARSHALLING_ROUTINE)
  616.     (unsigned long  *,
  617.      unsigned char  *,
  618.      void  * );
  619. typedef void ( __RPC_USER * USER_MARSHAL_FREEING_ROUTINE)
  620.     (unsigned long  *,
  621.      void  * );
  622. typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
  623.     {
  624.     USER_MARSHAL_SIZING_ROUTINE          pfnBufferSize;
  625.     USER_MARSHAL_MARSHALLING_ROUTINE     pfnMarshall;
  626.     USER_MARSHAL_UNMARSHALLING_ROUTINE   pfnUnmarshall;
  627.     USER_MARSHAL_FREEING_ROUTINE         pfnFree;
  628.     } USER_MARSHAL_ROUTINE_QUADRUPLE;
  629. #define USER_MARSHAL_CB_SIGNATURE 'USRC'
  630. typedef enum _USER_MARSHAL_CB_TYPE
  631. {
  632.     USER_MARSHAL_CB_BUFFER_SIZE,
  633.     USER_MARSHAL_CB_MARSHALL,
  634.     USER_MARSHAL_CB_UNMARSHALL,
  635.     USER_MARSHAL_CB_FREE
  636. } USER_MARSHAL_CB_TYPE;
  637. typedef struct _USER_MARSHAL_CB
  638. {
  639.     unsigned long           Flags;
  640.     PMIDL_STUB_MESSAGE      pStubMsg;
  641.     PFORMAT_STRING          pReserve;
  642.     unsigned long           Signature;
  643.     USER_MARSHAL_CB_TYPE    CBType;
  644.     PFORMAT_STRING          pFormat;
  645.     PFORMAT_STRING          pTypeFormat;
  646. } USER_MARSHAL_CB;
  647. #define USER_CALL_CTXT_MASK(f)  ((f) & 0x00ff)
  648. #define USER_CALL_AUX_MASK(f)   ((f) & 0xff00)
  649. #define GET_USER_DATA_REP(f)    ((f) >> 16)
  650. #define USER_CALL_IS_ASYNC              0x0100  /* aux flag: in an [async] call */
  651. #define USER_CALL_NEW_CORRELATION_DESC  0x0200
  652. typedef struct _MALLOC_FREE_STRUCT
  653.     {
  654.     void  *     ( __RPC_USER * pfnAllocate)(size_t);
  655.     void        ( __RPC_USER * pfnFree)(void  *);
  656.     } MALLOC_FREE_STRUCT;
  657. typedef struct _COMM_FAULT_OFFSETS
  658.     {
  659.     short       CommOffset;
  660.     short       FaultOffset;
  661.     } COMM_FAULT_OFFSETS;
  662. /*
  663.  * International character support definitions
  664.  */
  665. typedef enum _IDL_CS_CONVERT
  666.     {
  667.     IDL_CS_NO_CONVERT,
  668.     IDL_CS_IN_PLACE_CONVERT,
  669.     IDL_CS_NEW_BUFFER_CONVERT
  670.     } IDL_CS_CONVERT;
  671. typedef void
  672. ( __RPC_USER * CS_TYPE_NET_SIZE_ROUTINE)
  673.     (RPC_BINDING_HANDLE     hBinding,
  674.      unsigned long          ulNetworkCodeSet,
  675.      unsigned long          ulLocalBufferSize,
  676.      IDL_CS_CONVERT     *   conversionType,
  677.      unsigned long      *   pulNetworkBufferSize,
  678.      error_status_t     *   pStatus);
  679. typedef void
  680. ( __RPC_USER * CS_TYPE_LOCAL_SIZE_ROUTINE)
  681.     (RPC_BINDING_HANDLE     hBinding,
  682.      unsigned long          ulNetworkCodeSet,
  683.      unsigned long          ulNetworkBufferSize,
  684.      IDL_CS_CONVERT     *   conversionType,
  685.      unsigned long      *   pulLocalBufferSize,
  686.      error_status_t     *   pStatus);
  687. typedef void
  688. ( __RPC_USER * CS_TYPE_TO_NETCS_ROUTINE)
  689.     (RPC_BINDING_HANDLE     hBinding,
  690.      unsigned long          ulNetworkCodeSet,
  691.      void               *   pLocalData,
  692.      unsigned long          ulLocalDataLength,
  693.      byte               *   pNetworkData,
  694.      unsigned long      *   pulNetworkDataLength,
  695.      error_status_t     *   pStatus);
  696. typedef void
  697. ( __RPC_USER * CS_TYPE_FROM_NETCS_ROUTINE)
  698.     (RPC_BINDING_HANDLE     hBinding,
  699.      unsigned long          ulNetworkCodeSet,
  700.      byte               *   pNetworkData,
  701.      unsigned long          ulNetworkDataLength,
  702.      unsigned long          ulLocalBufferSize,
  703.      void               *   pLocalData,
  704.      unsigned long      *   pulLocalDataLength,
  705.      error_status_t     *   pStatus);
  706. typedef void
  707. ( __RPC_USER * CS_TAG_GETTING_ROUTINE)
  708.     (RPC_BINDING_HANDLE     hBinding,
  709.      int                    fServerSide,
  710.      unsigned long      *   pulSendingTag,
  711.      unsigned long      *   pulDesiredReceivingTag,
  712.      unsigned long      *   pulReceivingTag,
  713.      error_status_t     *   pStatus);
  714. void __RPC_USER
  715. RpcCsGetTags(
  716.      RPC_BINDING_HANDLE     hBinding,
  717.      int                    fServerSide,
  718.      unsigned long      *   pulSendingTag,
  719.      unsigned long      *   pulDesiredReceivingTag,
  720.      unsigned long      *   pulReceivingTag,
  721.      error_status_t     *   pStatus);
  722. typedef struct _NDR_CS_SIZE_CONVERT_ROUTINES
  723.     {
  724.     CS_TYPE_NET_SIZE_ROUTINE    pfnNetSize;
  725.     CS_TYPE_TO_NETCS_ROUTINE    pfnToNetCs;
  726.     CS_TYPE_LOCAL_SIZE_ROUTINE  pfnLocalSize;
  727.     CS_TYPE_FROM_NETCS_ROUTINE  pfnFromNetCs;
  728.     } NDR_CS_SIZE_CONVERT_ROUTINES;
  729. typedef struct _NDR_CS_ROUTINES
  730.     {
  731.     NDR_CS_SIZE_CONVERT_ROUTINES   *pSizeConvertRoutines;
  732.     CS_TAG_GETTING_ROUTINE         *pTagGettingRoutines;
  733.     } NDR_CS_ROUTINES;
  734. /*
  735.  * MIDL Stub Descriptor
  736.  */
  737. typedef struct _MIDL_STUB_DESC
  738.     {
  739.     void  *    RpcInterfaceInformation;
  740.     void  *    ( __RPC_API * pfnAllocate)(size_t);
  741.     void       ( __RPC_API * pfnFree)(void  *);
  742.     union
  743.         {
  744.         handle_t  *             pAutoHandle;
  745.         handle_t  *             pPrimitiveHandle;
  746.         PGENERIC_BINDING_INFO   pGenericBindingInfo;
  747.         } IMPLICIT_HANDLE_INFO;
  748.     const NDR_RUNDOWN  *                    apfnNdrRundownRoutines;
  749.     const GENERIC_BINDING_ROUTINE_PAIR  *   aGenericBindingRoutinePairs;
  750.     const EXPR_EVAL  *                      apfnExprEval;
  751.     const XMIT_ROUTINE_QUINTUPLE  *         aXmitQuintuple;
  752.     const unsigned char  *                  pFormatTypes;
  753.     int                                     fCheckBounds;
  754.     /* Ndr library version. */
  755.     unsigned long                           Version;
  756.     MALLOC_FREE_STRUCT  *                   pMallocFreeStruct;
  757.     long                                    MIDLVersion;
  758.     const COMM_FAULT_OFFSETS  *    CommFaultOffsets;
  759.     // New fields for version 3.0+
  760.     const USER_MARSHAL_ROUTINE_QUADRUPLE  * aUserMarshalQuadruple;
  761.     // Notify routines - added for NT5, MIDL 5.0
  762.     const NDR_NOTIFY_ROUTINE  *             NotifyRoutineTable;
  763.     /*
  764.      * Reserved for future use.
  765.      */
  766.     ULONG_PTR                               mFlags;
  767.     // International support routines - added for 64bit post NT5
  768.     const NDR_CS_ROUTINES *                 CsRoutineTables;
  769.     void *                                  Reserved4;
  770.     ULONG_PTR                               Reserved5;
  771.     // Fields up to now present in win2000 release.
  772.     } MIDL_STUB_DESC;
  773. typedef const MIDL_STUB_DESC  * PMIDL_STUB_DESC;
  774. typedef void  * PMIDL_XMIT_TYPE;
  775. /*
  776.  * MIDL Stub Format String.  This is a const in the stub.
  777.  */
  778. #if !defined( RC_INVOKED )
  779. #if _MSC_VER >= 1200
  780. #pragma warning(push)
  781. #endif
  782. #pragma warning( disable:4200 )
  783. #endif
  784. typedef struct _MIDL_FORMAT_STRING
  785.     {
  786.     short               Pad;
  787.     unsigned char       Format[];
  788.     } MIDL_FORMAT_STRING;
  789. #if !defined( RC_INVOKED )
  790. #if _MSC_VER >= 1200
  791. #pragma warning(pop)
  792. #else
  793. #pragma warning( default:4200 )
  794. #endif
  795. #endif
  796. /*
  797.  * Stub thunk used for some interpreted server stubs.
  798.  */
  799. typedef void ( __RPC_API * STUB_THUNK)( PMIDL_STUB_MESSAGE );
  800. typedef long ( __RPC_API * SERVER_ROUTINE)();
  801. /*
  802.  * Server Interpreter's information strucuture.
  803.  */
  804. typedef struct  _MIDL_SERVER_INFO_
  805.     {
  806.     PMIDL_STUB_DESC                     pStubDesc;
  807.     const SERVER_ROUTINE     *          DispatchTable;
  808.     PFORMAT_STRING                      ProcString;
  809.     const unsigned short *              FmtStringOffset;
  810.     const STUB_THUNK *                  ThunkTable;
  811.     PRPC_SYNTAX_IDENTIFIER              pTransferSyntax;
  812.     ULONG_PTR                           nCount;
  813.     PMIDL_SYNTAX_INFO                   pSyntaxInfo;
  814.     } MIDL_SERVER_INFO, *PMIDL_SERVER_INFO;
  815. #undef _MIDL_STUBLESS_PROXY_INFO
  816. /*
  817.  * Stubless object proxy information structure.
  818.  */
  819. typedef struct _MIDL_STUBLESS_PROXY_INFO
  820.     {
  821.     PMIDL_STUB_DESC                     pStubDesc;
  822.     PFORMAT_STRING                      ProcFormatString;
  823.     const unsigned short            *   FormatStringOffset;
  824.     PRPC_SYNTAX_IDENTIFIER              pTransferSyntax;
  825.     ULONG_PTR                           nCount;
  826.     PMIDL_SYNTAX_INFO                   pSyntaxInfo;
  827.     } MIDL_STUBLESS_PROXY_INFO;
  828. typedef MIDL_STUBLESS_PROXY_INFO  * PMIDL_STUBLESS_PROXY_INFO;
  829. /*
  830.  *  Multiple transfer syntax information.
  831.  */
  832. typedef struct _MIDL_SYNTAX_INFO
  833. {
  834. RPC_SYNTAX_IDENTIFIER               TransferSyntax;
  835. RPC_DISPATCH_TABLE *                DispatchTable;
  836. PFORMAT_STRING                      ProcString;
  837. const unsigned short *              FmtStringOffset;
  838. PFORMAT_STRING                      TypeString;
  839. const void           *              aUserMarshalQuadruple;
  840. ULONG_PTR                           pReserved1;
  841. ULONG_PTR                           pReserved2;
  842. } MIDL_SYNTAX_INFO, *PMIDL_SYNTAX_INFO;
  843. typedef unsigned short * PARAM_OFFSETTABLE, *PPARAM_OFFSETTABLE;
  844. /*
  845.  * This is the return value from NdrClientCall.
  846.  */
  847. typedef union _CLIENT_CALL_RETURN
  848.     {
  849.     void  *         Pointer;
  850.     LONG_PTR        Simple;
  851.     } CLIENT_CALL_RETURN;
  852. /*
  853.  * Full pointer data structures.
  854.  */
  855. typedef enum
  856.         {
  857.         XLAT_SERVER = 1,
  858.         XLAT_CLIENT
  859.         } XLAT_SIDE;
  860. /*
  861.  * Stores the translation for the conversion from a full pointer into it's
  862.  * corresponding ref id.
  863.  */
  864. typedef struct _FULL_PTR_TO_REFID_ELEMENT
  865.     {
  866.     struct _FULL_PTR_TO_REFID_ELEMENT  *  Next;
  867.     void  *             Pointer;
  868.     unsigned long       RefId;
  869.     unsigned char       State;
  870.     } FULL_PTR_TO_REFID_ELEMENT,  *PFULL_PTR_TO_REFID_ELEMENT;
  871. /*
  872.  * Full pointer translation tables.
  873.  */
  874. typedef struct _FULL_PTR_XLAT_TABLES
  875.     {
  876.     /*
  877.      * Ref id to pointer translation information.
  878.      */
  879.     struct
  880.         {
  881.         void  * *           XlatTable;
  882.         unsigned char  *    StateTable;
  883.         unsigned long       NumberOfEntries;
  884.         } RefIdToPointer;
  885.     /*
  886.      * Pointer to ref id translation information.
  887.      */
  888.     struct
  889.         {
  890.         PFULL_PTR_TO_REFID_ELEMENT  *   XlatTable;
  891.         unsigned long                   NumberOfBuckets;
  892.         unsigned long                   HashMask;
  893.         } PointerToRefId;
  894.     /*
  895.      * Next ref id to use.
  896.      */
  897.     unsigned long           NextRefId;
  898.     /*
  899.      * Keep track of the translation size we're handling : server or client.
  900.      * This tells us when we have to do reverse translations when we insert
  901.      * new translations.  On the server we must insert a pointer-to-refid
  902.      * translation whenever we insert a refid-to-pointer translation, and
  903.      * vica versa for the client.
  904.      */
  905.     XLAT_SIDE               XlatSide;
  906.     } FULL_PTR_XLAT_TABLES,  *PFULL_PTR_XLAT_TABLES;
  907. /***************************************************************************
  908.  ** New MIDL 2.0 Ndr routine templates
  909.  ***************************************************************************/
  910. RPC_STATUS RPC_ENTRY
  911. NdrClientGetSupportedSyntaxes(
  912.     IN RPC_CLIENT_INTERFACE * pInf,
  913.     OUT unsigned long       * pCount,
  914.     OUT MIDL_SYNTAX_INFO   ** pArr );
  915. RPC_STATUS RPC_ENTRY
  916. NdrServerGetSupportedSyntaxes(
  917.     IN RPC_SERVER_INTERFACE * pInf,
  918.     OUT unsigned long       * pCount,
  919.     OUT MIDL_SYNTAX_INFO   ** pArr,
  920.     OUT unsigned long       * pPreferSyntaxIndex);
  921. /*
  922.  * Marshall routines
  923.  */
  924. RPCRTAPI
  925. void
  926. RPC_ENTRY
  927. NdrSimpleTypeMarshall(
  928.     PMIDL_STUB_MESSAGE      pStubMsg,
  929.     unsigned char  *        pMemory,
  930.     unsigned char           FormatChar
  931.     );
  932. RPCRTAPI
  933. unsigned char  *
  934. RPC_ENTRY
  935. NdrPointerMarshall(
  936.     PMIDL_STUB_MESSAGE      pStubMsg,
  937.     unsigned char  *        pMemory,
  938.     PFORMAT_STRING          pFormat
  939.     );
  940. RPCRTAPI
  941. unsigned char  *
  942. RPC_ENTRY
  943. NdrCsArrayMarshall(
  944.     PMIDL_STUB_MESSAGE      pStubMsg,
  945.     unsigned char  *        pMemory,
  946.     PFORMAT_STRING          pFormat
  947.     );
  948. RPCRTAPI
  949. unsigned char  *
  950. RPC_ENTRY
  951. NdrCsTagMarshall(
  952.     PMIDL_STUB_MESSAGE      pStubMsg,
  953.     unsigned char  *        pMemory,
  954.     PFORMAT_STRING          pFormat
  955.     );
  956. /* Structures */
  957. RPCRTAPI
  958. unsigned char  *
  959. RPC_ENTRY
  960. NdrSimpleStructMarshall(
  961.     PMIDL_STUB_MESSAGE      pStubMsg,
  962.     unsigned char  *        pMemory,
  963.     PFORMAT_STRING          pFormat
  964.     );
  965. RPCRTAPI
  966. unsigned char  *
  967. RPC_ENTRY
  968. NdrConformantStructMarshall(
  969.     PMIDL_STUB_MESSAGE      pStubMsg,
  970.     unsigned char  *        pMemory,
  971.     PFORMAT_STRING          pFormat
  972.     );
  973. RPCRTAPI
  974. unsigned char  *
  975. RPC_ENTRY
  976. NdrConformantVaryingStructMarshall(
  977.     PMIDL_STUB_MESSAGE      pStubMsg,
  978.     unsigned char  *        pMemory,
  979.     PFORMAT_STRING          pFormat
  980.     );
  981. RPCRTAPI
  982. unsigned char  *
  983. RPC_ENTRY
  984. NdrComplexStructMarshall(
  985.     PMIDL_STUB_MESSAGE      pStubMsg,
  986.     unsigned char  *        pMemory,
  987.     PFORMAT_STRING          pFormat
  988.     );
  989. /* Arrays */
  990. RPCRTAPI
  991. unsigned char  *
  992. RPC_ENTRY
  993. NdrFixedArrayMarshall(
  994.     PMIDL_STUB_MESSAGE      pStubMsg,
  995.     unsigned char  *        pMemory,
  996.     PFORMAT_STRING          pFormat
  997.     );
  998. RPCRTAPI
  999. unsigned char  *
  1000. RPC_ENTRY
  1001. NdrConformantArrayMarshall(
  1002.     PMIDL_STUB_MESSAGE      pStubMsg,
  1003.     unsigned char  *        pMemory,
  1004.     PFORMAT_STRING          pFormat
  1005.     );
  1006. RPCRTAPI
  1007. unsigned char  *
  1008. RPC_ENTRY
  1009. NdrConformantVaryingArrayMarshall(
  1010.     PMIDL_STUB_MESSAGE      pStubMsg,
  1011.     unsigned char  *        pMemory,
  1012.     PFORMAT_STRING          pFormat
  1013.     );
  1014. RPCRTAPI
  1015. unsigned char  *
  1016. RPC_ENTRY
  1017. NdrVaryingArrayMarshall(
  1018.     PMIDL_STUB_MESSAGE      pStubMsg,
  1019.     unsigned char  *        pMemory,
  1020.     PFORMAT_STRING          pFormat
  1021.     );
  1022. RPCRTAPI
  1023. unsigned char  *
  1024. RPC_ENTRY
  1025. NdrComplexArrayMarshall(
  1026.     PMIDL_STUB_MESSAGE      pStubMsg,
  1027.     unsigned char  *        pMemory,
  1028.     PFORMAT_STRING          pFormat
  1029.     );
  1030. /* Strings */
  1031. RPCRTAPI
  1032. unsigned char  *
  1033. RPC_ENTRY
  1034. NdrNonConformantStringMarshall(
  1035.     PMIDL_STUB_MESSAGE      pStubMsg,
  1036.     unsigned char  *        pMemory,
  1037.     PFORMAT_STRING          pFormat
  1038.     );
  1039. RPCRTAPI
  1040. unsigned char  *
  1041. RPC_ENTRY
  1042. NdrConformantStringMarshall(
  1043.     PMIDL_STUB_MESSAGE      pStubMsg,
  1044.     unsigned char  *        pMemory,
  1045.     PFORMAT_STRING          pFormat
  1046.     );
  1047. /* Unions */
  1048. RPCRTAPI
  1049. unsigned char  *
  1050. RPC_ENTRY
  1051. NdrEncapsulatedUnionMarshall(
  1052.     PMIDL_STUB_MESSAGE      pStubMsg,
  1053.     unsigned char  *        pMemory,
  1054.     PFORMAT_STRING          pFormat
  1055.     );
  1056. RPCRTAPI
  1057. unsigned char  *
  1058. RPC_ENTRY
  1059. NdrNonEncapsulatedUnionMarshall(
  1060.     PMIDL_STUB_MESSAGE      pStubMsg,
  1061.     unsigned char  *        pMemory,
  1062.     PFORMAT_STRING          pFormat
  1063.     );
  1064. /* Byte count pointer */
  1065. RPCRTAPI
  1066. unsigned char  *
  1067. RPC_ENTRY
  1068. NdrByteCountPointerMarshall(
  1069.     PMIDL_STUB_MESSAGE      pStubMsg,
  1070.     unsigned char  *        pMemory,
  1071.     PFORMAT_STRING          pFormat
  1072.     );
  1073. /* Transmit as and represent as*/
  1074. RPCRTAPI
  1075. unsigned char  *
  1076. RPC_ENTRY
  1077. NdrXmitOrRepAsMarshall(
  1078.     PMIDL_STUB_MESSAGE      pStubMsg,
  1079.     unsigned char  *        pMemory,
  1080.     PFORMAT_STRING          pFormat
  1081.     );
  1082. /* User_marshal */
  1083. RPCRTAPI
  1084. unsigned char  *
  1085. RPC_ENTRY
  1086. NdrUserMarshalMarshall(
  1087.     PMIDL_STUB_MESSAGE      pStubMsg,
  1088.     unsigned char  *        pMemory,
  1089.     PFORMAT_STRING          pFormat
  1090.     );
  1091. /* Interface pointer */
  1092. RPCRTAPI
  1093. unsigned char  *
  1094. RPC_ENTRY
  1095. NdrInterfacePointerMarshall(
  1096.     PMIDL_STUB_MESSAGE      pStubMsg,
  1097.     unsigned char  *        pMemory,
  1098.     PFORMAT_STRING          pFormat
  1099.     );
  1100. /* Context handles */
  1101. RPCRTAPI
  1102. void
  1103. RPC_ENTRY
  1104. NdrClientContextMarshall(
  1105.     PMIDL_STUB_MESSAGE      pStubMsg,
  1106.     NDR_CCONTEXT            ContextHandle,
  1107.     int                     fCheck
  1108.     );
  1109. RPCRTAPI
  1110. void
  1111. RPC_ENTRY
  1112. NdrServerContextMarshall(
  1113.     PMIDL_STUB_MESSAGE      pStubMsg,
  1114.     NDR_SCONTEXT            ContextHandle,
  1115.     NDR_RUNDOWN             RundownRoutine
  1116.     );
  1117. RPCRTAPI
  1118. void
  1119. RPC_ENTRY
  1120. NdrServerContextNewMarshall(
  1121.     PMIDL_STUB_MESSAGE      pStubMsg,
  1122.     NDR_SCONTEXT            ContextHandle,
  1123.     NDR_RUNDOWN             RundownRoutine,
  1124.     PFORMAT_STRING          pFormat
  1125.     );
  1126. /*
  1127.  * Unmarshall routines
  1128.  */
  1129. RPCRTAPI
  1130. void
  1131. RPC_ENTRY
  1132. NdrSimpleTypeUnmarshall(
  1133.     PMIDL_STUB_MESSAGE      pStubMsg,
  1134.     unsigned char  *        pMemory,
  1135.     unsigned char           FormatChar
  1136.     );
  1137. RPCRTAPI
  1138. unsigned char * RPC_ENTRY
  1139. RPC_ENTRY
  1140. NdrCsArrayUnmarshall(
  1141.     PMIDL_STUB_MESSAGE      pStubMsg,
  1142.     unsigned char **        ppMemory,
  1143.     PFORMAT_STRING          pFormat,
  1144.     unsigned char           fMustAlloc
  1145.     );
  1146. RPCRTAPI
  1147. unsigned char * RPC_ENTRY
  1148. RPC_ENTRY
  1149. NdrCsTagUnmarshall(
  1150.     PMIDL_STUB_MESSAGE      pStubMsg,
  1151.     unsigned char **        ppMemory,
  1152.     PFORMAT_STRING          pFormat,
  1153.     unsigned char           fMustAlloc
  1154.     );
  1155. RPCRTAPI
  1156. unsigned char * RPC_ENTRY
  1157. NdrRangeUnmarshall(
  1158.     PMIDL_STUB_MESSAGE      pStubMsg,
  1159.     unsigned char **        ppMemory,
  1160.     PFORMAT_STRING          pFormat,
  1161.     unsigned char           fMustAlloc
  1162.     );
  1163. RPCRTAPI
  1164. void
  1165. RPC_ENTRY
  1166. NdrCorrelationInitialize(
  1167.     PMIDL_STUB_MESSAGE      pStubMsg,
  1168.     void  *                 pMemory,
  1169.     unsigned long           CacheSize,
  1170.     unsigned long           flags
  1171.     );
  1172. RPCRTAPI
  1173. void
  1174. RPC_ENTRY
  1175. NdrCorrelationPass(
  1176.     PMIDL_STUB_MESSAGE      pStubMsg
  1177.     );
  1178. RPCRTAPI
  1179. void
  1180. RPC_ENTRY
  1181. NdrCorrelationFree(
  1182.     PMIDL_STUB_MESSAGE      pStubMsg
  1183.     );
  1184. RPCRTAPI
  1185. unsigned char  *
  1186. RPC_ENTRY
  1187. NdrPointerUnmarshall(
  1188.     PMIDL_STUB_MESSAGE      pStubMsg,
  1189.     unsigned char  *  *     ppMemory,
  1190.     PFORMAT_STRING          pFormat,
  1191.     unsigned char           fMustAlloc
  1192.     );
  1193. /* Structures */
  1194. RPCRTAPI
  1195. unsigned char  *
  1196. RPC_ENTRY
  1197. NdrSimpleStructUnmarshall(
  1198.     PMIDL_STUB_MESSAGE      pStubMsg,
  1199.     unsigned char  *  *     ppMemory,
  1200.     PFORMAT_STRING          pFormat,
  1201.     unsigned char           fMustAlloc
  1202.     );
  1203. RPCRTAPI
  1204. unsigned char  *
  1205. RPC_ENTRY
  1206. NdrConformantStructUnmarshall(
  1207.     PMIDL_STUB_MESSAGE      pStubMsg,
  1208.     unsigned char  *  *     ppMemory,
  1209.     PFORMAT_STRING          pFormat,
  1210.     unsigned char           fMustAlloc
  1211.     );
  1212. RPCRTAPI
  1213. unsigned char  *
  1214. RPC_ENTRY
  1215. NdrConformantVaryingStructUnmarshall(
  1216.     PMIDL_STUB_MESSAGE      pStubMsg,
  1217.     unsigned char  *  *     ppMemory,
  1218.     PFORMAT_STRING          pFormat,
  1219.     unsigned char           fMustAlloc
  1220.     );
  1221. RPCRTAPI
  1222. unsigned char  *
  1223. RPC_ENTRY
  1224. NdrComplexStructUnmarshall(
  1225.     PMIDL_STUB_MESSAGE      pStubMsg,
  1226.     unsigned char  *  *     ppMemory,
  1227.     PFORMAT_STRING          pFormat,
  1228.     unsigned char           fMustAlloc
  1229.     );
  1230. /* Arrays */
  1231. RPCRTAPI
  1232. unsigned char  *
  1233. RPC_ENTRY
  1234. NdrFixedArrayUnmarshall(
  1235.     PMIDL_STUB_MESSAGE      pStubMsg,
  1236.     unsigned char  *  *     ppMemory,
  1237.     PFORMAT_STRING          pFormat,
  1238.     unsigned char           fMustAlloc
  1239.     );
  1240. RPCRTAPI
  1241. unsigned char  *
  1242. RPC_ENTRY
  1243. NdrConformantArrayUnmarshall(
  1244.     PMIDL_STUB_MESSAGE      pStubMsg,
  1245.     unsigned char  *  *     ppMemory,
  1246.     PFORMAT_STRING          pFormat,
  1247.     unsigned char           fMustAlloc
  1248.     );
  1249. RPCRTAPI
  1250. unsigned char  *
  1251. RPC_ENTRY
  1252. NdrConformantVaryingArrayUnmarshall(
  1253.     PMIDL_STUB_MESSAGE      pStubMsg,
  1254.     unsigned char  *  *     ppMemory,
  1255.     PFORMAT_STRING          pFormat,
  1256.     unsigned char           fMustAlloc
  1257.     );
  1258. RPCRTAPI
  1259. unsigned char  *
  1260. RPC_ENTRY
  1261. NdrVaryingArrayUnmarshall(
  1262.     PMIDL_STUB_MESSAGE      pStubMsg,
  1263.     unsigned char  *  *     ppMemory,
  1264.     PFORMAT_STRING          pFormat,
  1265.     unsigned char           fMustAlloc
  1266.     );
  1267. RPCRTAPI
  1268. unsigned char  *
  1269. RPC_ENTRY
  1270. NdrComplexArrayUnmarshall(
  1271.     PMIDL_STUB_MESSAGE      pStubMsg,
  1272.     unsigned char  *  *     ppMemory,
  1273.     PFORMAT_STRING          pFormat,
  1274.     unsigned char           fMustAlloc
  1275.     );
  1276. /* Strings */
  1277. RPCRTAPI
  1278. unsigned char  *
  1279. RPC_ENTRY
  1280. NdrNonConformantStringUnmarshall(
  1281.     PMIDL_STUB_MESSAGE      pStubMsg,
  1282.     unsigned char  *  *     ppMemory,
  1283.     PFORMAT_STRING          pFormat,
  1284.     unsigned char           fMustAlloc
  1285.     );
  1286. RPCRTAPI
  1287. unsigned char  *
  1288. RPC_ENTRY
  1289. NdrConformantStringUnmarshall(
  1290.     PMIDL_STUB_MESSAGE      pStubMsg,
  1291.     unsigned char  *  *     ppMemory,
  1292.     PFORMAT_STRING          pFormat,
  1293.     unsigned char           fMustAlloc
  1294.     );
  1295. /* Unions */
  1296. RPCRTAPI
  1297. unsigned char  *
  1298. RPC_ENTRY
  1299. NdrEncapsulatedUnionUnmarshall(
  1300.     PMIDL_STUB_MESSAGE      pStubMsg,
  1301.     unsigned char  *  *     ppMemory,
  1302.     PFORMAT_STRING          pFormat,
  1303.     unsigned char           fMustAlloc
  1304.     );
  1305. RPCRTAPI
  1306. unsigned char  *
  1307. RPC_ENTRY
  1308. NdrNonEncapsulatedUnionUnmarshall(
  1309.     PMIDL_STUB_MESSAGE      pStubMsg,
  1310.     unsigned char  *  *     ppMemory,
  1311.     PFORMAT_STRING          pFormat,
  1312.     unsigned char           fMustAlloc
  1313.     );
  1314. /* Byte count pointer */
  1315. RPCRTAPI
  1316. unsigned char  *
  1317. RPC_ENTRY
  1318. NdrByteCountPointerUnmarshall(
  1319.     PMIDL_STUB_MESSAGE      pStubMsg,
  1320.     unsigned char  *  *     ppMemory,
  1321.     PFORMAT_STRING          pFormat,
  1322.     unsigned char           fMustAlloc
  1323.     );
  1324. /* Transmit as and represent as*/
  1325. RPCRTAPI
  1326. unsigned char  *
  1327. RPC_ENTRY
  1328. NdrXmitOrRepAsUnmarshall(
  1329.     PMIDL_STUB_MESSAGE      pStubMsg,
  1330.     unsigned char  *  *     ppMemory,
  1331.     PFORMAT_STRING          pFormat,
  1332.     unsigned char           fMustAlloc
  1333.     );
  1334. /* User_marshal */
  1335. RPCRTAPI
  1336. unsigned char  *
  1337. RPC_ENTRY
  1338. NdrUserMarshalUnmarshall(
  1339.     PMIDL_STUB_MESSAGE      pStubMsg,
  1340.     unsigned char  *  *     ppMemory,
  1341.     PFORMAT_STRING          pFormat,
  1342.     unsigned char           fMustAlloc
  1343.     );
  1344. /* Interface pointer */
  1345. RPCRTAPI
  1346. unsigned char  *
  1347. RPC_ENTRY
  1348. NdrInterfacePointerUnmarshall(
  1349.     PMIDL_STUB_MESSAGE      pStubMsg,
  1350.     unsigned char  *  *     ppMemory,
  1351.     PFORMAT_STRING          pFormat,
  1352.     unsigned char           fMustAlloc
  1353.     );
  1354. /* Context handles */
  1355. RPCRTAPI
  1356. void
  1357. RPC_ENTRY
  1358. NdrClientContextUnmarshall(
  1359.     PMIDL_STUB_MESSAGE      pStubMsg,
  1360.     NDR_CCONTEXT        *   pContextHandle,
  1361.     RPC_BINDING_HANDLE      BindHandle
  1362.     );
  1363. RPCRTAPI
  1364. NDR_SCONTEXT
  1365. RPC_ENTRY
  1366. NdrServerContextUnmarshall(
  1367.     PMIDL_STUB_MESSAGE      pStubMsg
  1368.     );
  1369. /* New context handle flavors */
  1370. RPCRTAPI
  1371. NDR_SCONTEXT
  1372. RPC_ENTRY
  1373. NdrContextHandleInitialize(
  1374.     IN  PMIDL_STUB_MESSAGE  pStubMsg,
  1375.     IN  PFORMAT_STRING      pFormat
  1376.     );
  1377. RPCRTAPI
  1378. NDR_SCONTEXT
  1379. RPC_ENTRY
  1380. NdrServerContextNewUnmarshall(
  1381.     IN  PMIDL_STUB_MESSAGE  pStubMsg,
  1382.     IN  PFORMAT_STRING      pFormat
  1383.     );
  1384. /*
  1385.  * Buffer sizing routines
  1386.  */
  1387. RPCRTAPI
  1388. void
  1389. RPC_ENTRY
  1390. NdrPointerBufferSize(
  1391.     PMIDL_STUB_MESSAGE      pStubMsg,
  1392.     unsigned char  *        pMemory,
  1393.     PFORMAT_STRING          pFormat
  1394.     );
  1395. RPCRTAPI
  1396. void
  1397. RPC_ENTRY
  1398. NdrCsArrayBufferSize(
  1399.     PMIDL_STUB_MESSAGE      pStubMsg,
  1400.     unsigned char  *        pMemory,
  1401.     PFORMAT_STRING          pFormat
  1402.     );
  1403. RPCRTAPI
  1404. void
  1405. RPC_ENTRY
  1406. NdrCsTagBufferSize(
  1407.     PMIDL_STUB_MESSAGE      pStubMsg,
  1408.     unsigned char  *        pMemory,
  1409.     PFORMAT_STRING          pFormat
  1410.     );
  1411. /* Structures */
  1412. RPCRTAPI
  1413. void
  1414. RPC_ENTRY
  1415. NdrSimpleStructBufferSize(
  1416.     PMIDL_STUB_MESSAGE      pStubMsg,
  1417.     unsigned char  *        pMemory,
  1418.     PFORMAT_STRING          pFormat
  1419.     );
  1420. RPCRTAPI
  1421. void
  1422. RPC_ENTRY
  1423. NdrConformantStructBufferSize(
  1424.     PMIDL_STUB_MESSAGE      pStubMsg,
  1425.     unsigned char  *        pMemory,
  1426.     PFORMAT_STRING          pFormat
  1427.     );
  1428. RPCRTAPI
  1429. void
  1430. RPC_ENTRY
  1431. NdrConformantVaryingStructBufferSize(
  1432.     PMIDL_STUB_MESSAGE      pStubMsg,
  1433.     unsigned char  *        pMemory,
  1434.     PFORMAT_STRING          pFormat
  1435.     );
  1436. RPCRTAPI
  1437. void
  1438. RPC_ENTRY
  1439. NdrComplexStructBufferSize(
  1440.     PMIDL_STUB_MESSAGE      pStubMsg,
  1441.     unsigned char  *        pMemory,
  1442.     PFORMAT_STRING          pFormat
  1443.     );
  1444. /* Arrays */
  1445. RPCRTAPI
  1446. void
  1447. RPC_ENTRY
  1448. NdrFixedArrayBufferSize(
  1449.     PMIDL_STUB_MESSAGE      pStubMsg,
  1450.     unsigned char  *        pMemory,
  1451.     PFORMAT_STRING          pFormat
  1452.     );
  1453. RPCRTAPI
  1454. void
  1455. RPC_ENTRY
  1456. NdrConformantArrayBufferSize(
  1457.     PMIDL_STUB_MESSAGE      pStubMsg,
  1458.     unsigned char  *        pMemory,
  1459.     PFORMAT_STRING          pFormat
  1460.     );
  1461. RPCRTAPI
  1462. void
  1463. RPC_ENTRY
  1464. NdrConformantVaryingArrayBufferSize(
  1465.     PMIDL_STUB_MESSAGE      pStubMsg,
  1466.     unsigned char  *        pMemory,
  1467.     PFORMAT_STRING          pFormat
  1468.     );
  1469. RPCRTAPI
  1470. void
  1471. RPC_ENTRY
  1472. NdrVaryingArrayBufferSize(
  1473.     PMIDL_STUB_MESSAGE      pStubMsg,
  1474.     unsigned char  *        pMemory,
  1475.     PFORMAT_STRING          pFormat
  1476.     );
  1477. RPCRTAPI
  1478. void
  1479. RPC_ENTRY
  1480. NdrComplexArrayBufferSize(
  1481.     PMIDL_STUB_MESSAGE      pStubMsg,
  1482.     unsigned char  *        pMemory,
  1483.     PFORMAT_STRING          pFormat
  1484.     );
  1485. /* Strings */
  1486. RPCRTAPI
  1487. void
  1488. RPC_ENTRY
  1489. NdrConformantStringBufferSize(
  1490.     PMIDL_STUB_MESSAGE      pStubMsg,
  1491.     unsigned char  *        pMemory,
  1492.     PFORMAT_STRING          pFormat
  1493.     );
  1494. RPCRTAPI
  1495. void
  1496. RPC_ENTRY
  1497. NdrNonConformantStringBufferSize(
  1498.     PMIDL_STUB_MESSAGE      pStubMsg,
  1499.     unsigned char  *        pMemory,
  1500.     PFORMAT_STRING          pFormat
  1501.     );
  1502. /* Unions */
  1503. RPCRTAPI
  1504. void
  1505. RPC_ENTRY
  1506. NdrEncapsulatedUnionBufferSize(
  1507.     PMIDL_STUB_MESSAGE      pStubMsg,
  1508.     unsigned char  *        pMemory,
  1509.     PFORMAT_STRING          pFormat
  1510.     );
  1511. RPCRTAPI
  1512. void
  1513. RPC_ENTRY
  1514. NdrNonEncapsulatedUnionBufferSize(
  1515.     PMIDL_STUB_MESSAGE      pStubMsg,
  1516.     unsigned char  *        pMemory,
  1517.     PFORMAT_STRING          pFormat
  1518.     );
  1519. /* Byte count pointer */
  1520. RPCRTAPI
  1521. void
  1522. RPC_ENTRY
  1523. NdrByteCountPointerBufferSize(
  1524.     PMIDL_STUB_MESSAGE      pStubMsg,
  1525.     unsigned char  *        pMemory,
  1526.     PFORMAT_STRING          pFormat
  1527.     );
  1528. /* Transmit as and represent as*/
  1529. RPCRTAPI
  1530. void
  1531. RPC_ENTRY
  1532. NdrXmitOrRepAsBufferSize(
  1533.     PMIDL_STUB_MESSAGE      pStubMsg,
  1534.     unsigned char  *        pMemory,
  1535.     PFORMAT_STRING          pFormat
  1536.     );
  1537. /* User_marshal */
  1538. RPCRTAPI
  1539. void
  1540. RPC_ENTRY
  1541. NdrUserMarshalBufferSize(
  1542.     PMIDL_STUB_MESSAGE      pStubMsg,
  1543.     unsigned char  *        pMemory,
  1544.     PFORMAT_STRING          pFormat
  1545.     );
  1546. /* Interface pointer */
  1547. RPCRTAPI
  1548. void
  1549. RPC_ENTRY
  1550. NdrInterfacePointerBufferSize(
  1551.     PMIDL_STUB_MESSAGE      pStubMsg,
  1552.     unsigned char  *        pMemory,
  1553.     PFORMAT_STRING          pFormat
  1554.     );
  1555. // Context Handle size
  1556. //
  1557. RPCRTAPI
  1558. void
  1559. RPC_ENTRY
  1560. NdrContextHandleSize(
  1561.     PMIDL_STUB_MESSAGE      pStubMsg,
  1562.     unsigned char  *        pMemory,
  1563.     PFORMAT_STRING          pFormat
  1564.     );
  1565. /*
  1566.  * Memory sizing routines
  1567.  */
  1568. RPCRTAPI
  1569. unsigned long
  1570. RPC_ENTRY
  1571. NdrPointerMemorySize(
  1572.     PMIDL_STUB_MESSAGE      pStubMsg,
  1573.     PFORMAT_STRING          pFormat
  1574.     );
  1575. /* cs_char things */
  1576. RPCRTAPI
  1577. unsigned long
  1578. RPC_ENTRY
  1579. NdrCsArrayMemorySize(
  1580.     PMIDL_STUB_MESSAGE      pStubMsg,
  1581.     PFORMAT_STRING          pFormat
  1582.     );
  1583. RPCRTAPI
  1584. unsigned long
  1585. RPC_ENTRY
  1586. NdrCsTagMemorySize(
  1587.     PMIDL_STUB_MESSAGE      pStubMsg,
  1588.     PFORMAT_STRING          pFormat
  1589.     );
  1590. /* Structures */
  1591. RPCRTAPI
  1592. unsigned long
  1593. RPC_ENTRY
  1594. NdrSimpleStructMemorySize(
  1595.     PMIDL_STUB_MESSAGE      pStubMsg,
  1596.     PFORMAT_STRING          pFormat
  1597.     );
  1598. RPCRTAPI
  1599. unsigned long
  1600. RPC_ENTRY
  1601. NdrConformantStructMemorySize(
  1602.     PMIDL_STUB_MESSAGE      pStubMsg,
  1603.     PFORMAT_STRING          pFormat
  1604.     );
  1605. RPCRTAPI
  1606. unsigned long
  1607. RPC_ENTRY
  1608. NdrConformantVaryingStructMemorySize(
  1609.     PMIDL_STUB_MESSAGE      pStubMsg,
  1610.     PFORMAT_STRING          pFormat
  1611.     );
  1612. RPCRTAPI
  1613. unsigned long
  1614. RPC_ENTRY
  1615. NdrComplexStructMemorySize(
  1616.     PMIDL_STUB_MESSAGE      pStubMsg,
  1617.     PFORMAT_STRING          pFormat
  1618.     );
  1619. /* Arrays */
  1620. RPCRTAPI
  1621. unsigned long
  1622. RPC_ENTRY
  1623. NdrFixedArrayMemorySize(
  1624.     PMIDL_STUB_MESSAGE      pStubMsg,
  1625.     PFORMAT_STRING          pFormat
  1626.     );
  1627. RPCRTAPI
  1628. unsigned long
  1629. RPC_ENTRY
  1630. NdrConformantArrayMemorySize(
  1631.     PMIDL_STUB_MESSAGE      pStubMsg,
  1632.     PFORMAT_STRING          pFormat
  1633.     );
  1634. RPCRTAPI
  1635. unsigned long
  1636. RPC_ENTRY
  1637. NdrConformantVaryingArrayMemorySize(
  1638.     PMIDL_STUB_MESSAGE      pStubMsg,
  1639.     PFORMAT_STRING          pFormat
  1640.     );
  1641. RPCRTAPI
  1642. unsigned long
  1643. RPC_ENTRY
  1644. NdrVaryingArrayMemorySize(
  1645.     PMIDL_STUB_MESSAGE      pStubMsg,
  1646.     PFORMAT_STRING          pFormat
  1647.     );
  1648. RPCRTAPI
  1649. unsigned long
  1650. RPC_ENTRY
  1651. NdrComplexArrayMemorySize(
  1652.     PMIDL_STUB_MESSAGE      pStubMsg,
  1653.     PFORMAT_STRING          pFormat
  1654.     );
  1655. /* Strings */
  1656. RPCRTAPI
  1657. unsigned long
  1658. RPC_ENTRY
  1659. NdrConformantStringMemorySize(
  1660.     PMIDL_STUB_MESSAGE      pStubMsg,
  1661.     PFORMAT_STRING          pFormat
  1662.     );
  1663. RPCRTAPI
  1664. unsigned long
  1665. RPC_ENTRY
  1666. NdrNonConformantStringMemorySize(
  1667.     PMIDL_STUB_MESSAGE      pStubMsg,
  1668.     PFORMAT_STRING          pFormat
  1669.     );
  1670. /* Unions */
  1671. RPCRTAPI
  1672. unsigned long
  1673. RPC_ENTRY
  1674. NdrEncapsulatedUnionMemorySize(
  1675.     PMIDL_STUB_MESSAGE      pStubMsg,
  1676.     PFORMAT_STRING          pFormat
  1677.     );
  1678. RPCRTAPI
  1679. unsigned long
  1680. RPC_ENTRY
  1681. NdrNonEncapsulatedUnionMemorySize(
  1682.     PMIDL_STUB_MESSAGE      pStubMsg,
  1683.     PFORMAT_STRING          pFormat
  1684.     );
  1685. /* Transmit as and represent as*/
  1686. RPCRTAPI
  1687. unsigned long
  1688. RPC_ENTRY
  1689. NdrXmitOrRepAsMemorySize(
  1690.     PMIDL_STUB_MESSAGE      pStubMsg,
  1691.     PFORMAT_STRING          pFormat
  1692.     );
  1693. /* User_marshal */
  1694. RPCRTAPI
  1695. unsigned long
  1696. RPC_ENTRY
  1697. NdrUserMarshalMemorySize(
  1698.     PMIDL_STUB_MESSAGE      pStubMsg,
  1699.     PFORMAT_STRING          pFormat
  1700.     );
  1701. /* Interface pointer */
  1702. RPCRTAPI
  1703. unsigned long
  1704. RPC_ENTRY
  1705. NdrInterfacePointerMemorySize(
  1706.     PMIDL_STUB_MESSAGE      pStubMsg,
  1707.     PFORMAT_STRING          pFormat
  1708.     );
  1709. /*
  1710.  * Freeing routines
  1711.  */
  1712. RPCRTAPI
  1713. void
  1714. RPC_ENTRY
  1715. NdrPointerFree(
  1716.     PMIDL_STUB_MESSAGE      pStubMsg,
  1717.     unsigned char  *        pMemory,
  1718.     PFORMAT_STRING          pFormat
  1719.     );
  1720. RPCRTAPI
  1721. void
  1722. RPC_ENTRY
  1723. NdrCsArrayFree(
  1724.     PMIDL_STUB_MESSAGE      pStubMsg,
  1725.     unsigned char  *        pMemory,
  1726.     PFORMAT_STRING          pFormat
  1727.     );
  1728. /* Structures */
  1729. RPCRTAPI
  1730. void
  1731. RPC_ENTRY
  1732. NdrSimpleStructFree(
  1733.     PMIDL_STUB_MESSAGE      pStubMsg,
  1734.     unsigned char  *        pMemory,
  1735.     PFORMAT_STRING          pFormat
  1736.     );
  1737. RPCRTAPI
  1738. void
  1739. RPC_ENTRY
  1740. NdrConformantStructFree(
  1741.     PMIDL_STUB_MESSAGE      pStubMsg,
  1742.     unsigned char  *        pMemory,
  1743.     PFORMAT_STRING          pFormat
  1744.     );
  1745. RPCRTAPI
  1746. void
  1747. RPC_ENTRY
  1748. NdrConformantVaryingStructFree(
  1749.     PMIDL_STUB_MESSAGE      pStubMsg,
  1750.     unsigned char  *        pMemory,
  1751.     PFORMAT_STRING          pFormat
  1752.     );
  1753. RPCRTAPI
  1754. void
  1755. RPC_ENTRY
  1756. NdrComplexStructFree(
  1757.     PMIDL_STUB_MESSAGE      pStubMsg,
  1758.     unsigned char  *        pMemory,
  1759.     PFORMAT_STRING          pFormat
  1760.     );
  1761. /* Arrays */
  1762. RPCRTAPI
  1763. void
  1764. RPC_ENTRY
  1765. NdrFixedArrayFree(
  1766.     PMIDL_STUB_MESSAGE      pStubMsg,
  1767.     unsigned char  *        pMemory,
  1768.     PFORMAT_STRING          pFormat
  1769.     );
  1770. RPCRTAPI
  1771. void
  1772. RPC_ENTRY
  1773. NdrConformantArrayFree(
  1774.     PMIDL_STUB_MESSAGE      pStubMsg,
  1775.     unsigned char  *        pMemory,
  1776.     PFORMAT_STRING          pFormat
  1777.     );
  1778. RPCRTAPI
  1779. void
  1780. RPC_ENTRY
  1781. NdrConformantVaryingArrayFree(
  1782.     PMIDL_STUB_MESSAGE      pStubMsg,
  1783.     unsigned char  *        pMemory,
  1784.     PFORMAT_STRING          pFormat
  1785.     );
  1786. RPCRTAPI
  1787. void
  1788. RPC_ENTRY
  1789. NdrVaryingArrayFree(
  1790.     PMIDL_STUB_MESSAGE      pStubMsg,
  1791.     unsigned char  *        pMemory,
  1792.     PFORMAT_STRING          pFormat
  1793.     );
  1794. RPCRTAPI
  1795. void
  1796. RPC_ENTRY
  1797. NdrComplexArrayFree(
  1798.     PMIDL_STUB_MESSAGE      pStubMsg,
  1799.     unsigned char  *        pMemory,
  1800.     PFORMAT_STRING          pFormat
  1801.     );
  1802. /* Unions */
  1803. RPCRTAPI
  1804. void
  1805. RPC_ENTRY
  1806. NdrEncapsulatedUnionFree(
  1807.     PMIDL_STUB_MESSAGE      pStubMsg,
  1808.     unsigned char  *        pMemory,
  1809.     PFORMAT_STRING          pFormat
  1810.     );
  1811. RPCRTAPI
  1812. void
  1813. RPC_ENTRY
  1814. NdrNonEncapsulatedUnionFree(
  1815.     PMIDL_STUB_MESSAGE      pStubMsg,
  1816.     unsigned char  *        pMemory,
  1817.     PFORMAT_STRING          pFormat
  1818.     );
  1819. /* Byte count */
  1820. RPCRTAPI
  1821. void
  1822. RPC_ENTRY
  1823. NdrByteCountPointerFree(
  1824.     PMIDL_STUB_MESSAGE      pStubMsg,
  1825.     unsigned char  *        pMemory,
  1826.     PFORMAT_STRING          pFormat
  1827.     );
  1828. /* Transmit as and represent as*/
  1829. RPCRTAPI
  1830. void
  1831. RPC_ENTRY
  1832. NdrXmitOrRepAsFree(
  1833.     PMIDL_STUB_MESSAGE      pStubMsg,
  1834.     unsigned char  *        pMemory,
  1835.     PFORMAT_STRING          pFormat
  1836.     );
  1837. /* User_marshal */
  1838. RPCRTAPI
  1839. void
  1840. RPC_ENTRY
  1841. NdrUserMarshalFree(
  1842.     PMIDL_STUB_MESSAGE      pStubMsg,
  1843.     unsigned char  *        pMemory,
  1844.     PFORMAT_STRING          pFormat
  1845.     );
  1846. /* Interface pointer */
  1847. RPCRTAPI
  1848. void
  1849. RPC_ENTRY
  1850. NdrInterfacePointerFree(
  1851.     PMIDL_STUB_MESSAGE      pStubMsg,
  1852.     unsigned char  *        pMemory,
  1853.     PFORMAT_STRING          pFormat
  1854.     );
  1855. /*
  1856.  * Endian conversion routine.
  1857.  */
  1858. RPCRTAPI
  1859. void
  1860. RPC_ENTRY
  1861. NdrConvert2(
  1862.     PMIDL_STUB_MESSAGE      pStubMsg,
  1863.     PFORMAT_STRING          pFormat,
  1864.     long                    NumberParams
  1865.     );
  1866. RPCRTAPI
  1867. void
  1868. RPC_ENTRY
  1869. NdrConvert(
  1870.     PMIDL_STUB_MESSAGE      pStubMsg,
  1871.     PFORMAT_STRING          pFormat
  1872.     );
  1873. #define USER_MARSHAL_FC_BYTE         1
  1874. #define USER_MARSHAL_FC_CHAR         2
  1875. #define USER_MARSHAL_FC_SMALL        3
  1876. #define USER_MARSHAL_FC_USMALL       4
  1877. #define USER_MARSHAL_FC_WCHAR        5
  1878. #define USER_MARSHAL_FC_SHORT        6
  1879. #define USER_MARSHAL_FC_USHORT       7
  1880. #define USER_MARSHAL_FC_LONG         8
  1881. #define USER_MARSHAL_FC_ULONG        9
  1882. #define USER_MARSHAL_FC_FLOAT       10
  1883. #define USER_MARSHAL_FC_HYPER       11
  1884. #define USER_MARSHAL_FC_DOUBLE      12
  1885. RPCRTAPI
  1886. unsigned char  *
  1887. RPC_ENTRY
  1888. NdrUserMarshalSimpleTypeConvert(
  1889.     unsigned long *         pFlags,
  1890.     unsigned char *         pBuffer,
  1891.     unsigned char           FormatChar
  1892.     );
  1893. /*
  1894.  * Auxilary routines
  1895.  */
  1896. RPCRTAPI
  1897. void
  1898. RPC_ENTRY
  1899. NdrClientInitializeNew(
  1900.     PRPC_MESSAGE            pRpcMsg,
  1901.     PMIDL_STUB_MESSAGE      pStubMsg,
  1902.     PMIDL_STUB_DESC         pStubDescriptor,
  1903.     unsigned int            ProcNum
  1904.     );
  1905. RPCRTAPI
  1906. unsigned char  *
  1907. RPC_ENTRY
  1908. NdrServerInitializeNew(
  1909.     PRPC_MESSAGE            pRpcMsg,
  1910.     PMIDL_STUB_MESSAGE      pStubMsg,
  1911.     PMIDL_STUB_DESC         pStubDescriptor
  1912.     );
  1913. RPCRTAPI
  1914. void
  1915. RPC_ENTRY
  1916. NdrServerInitializePartial(
  1917.     PRPC_MESSAGE            pRpcMsg,
  1918.     PMIDL_STUB_MESSAGE      pStubMsg,
  1919.     PMIDL_STUB_DESC         pStubDescriptor,
  1920.     unsigned long           RequestedBufferSize
  1921.     );
  1922. RPCRTAPI
  1923. void
  1924. RPC_ENTRY
  1925. NdrClientInitialize(
  1926.     PRPC_MESSAGE            pRpcMsg,
  1927.     PMIDL_STUB_MESSAGE      pStubMsg,
  1928.     PMIDL_STUB_DESC         pStubDescriptor,
  1929.     unsigned int            ProcNum
  1930.     );
  1931. RPCRTAPI
  1932. unsigned char  *
  1933. RPC_ENTRY
  1934. NdrServerInitialize(
  1935.     PRPC_MESSAGE            pRpcMsg,
  1936.     PMIDL_STUB_MESSAGE      pStubMsg,
  1937.     PMIDL_STUB_DESC         pStubDescriptor
  1938.     );
  1939. RPCRTAPI
  1940. unsigned char  *
  1941. RPC_ENTRY
  1942. NdrServerInitializeUnmarshall (
  1943.     PMIDL_STUB_MESSAGE      pStubMsg,
  1944.     PMIDL_STUB_DESC         pStubDescriptor,
  1945.     PRPC_MESSAGE            pRpcMsg
  1946.     );
  1947. RPCRTAPI
  1948. void
  1949. RPC_ENTRY
  1950. NdrServerInitializeMarshall (
  1951.     PRPC_MESSAGE            pRpcMsg,
  1952.     PMIDL_STUB_MESSAGE      pStubMsg
  1953.     );
  1954. RPCRTAPI
  1955. unsigned char  *
  1956. RPC_ENTRY
  1957. NdrGetBuffer(
  1958.     PMIDL_STUB_MESSAGE      pStubMsg,
  1959.     unsigned long           BufferLength,
  1960.     RPC_BINDING_HANDLE      Handle
  1961.     );
  1962. RPCRTAPI
  1963. unsigned char  *
  1964. RPC_ENTRY
  1965. NdrNsGetBuffer(
  1966.     PMIDL_STUB_MESSAGE      pStubMsg,
  1967.     unsigned long           BufferLength,
  1968.     RPC_BINDING_HANDLE      Handle
  1969.     );
  1970. RPCRTAPI
  1971. unsigned char  *
  1972. RPC_ENTRY
  1973. NdrSendReceive(
  1974.     PMIDL_STUB_MESSAGE      pStubMsg,
  1975.     unsigned char *         pBufferEnd
  1976.     );
  1977. RPCRTAPI
  1978. unsigned char  *
  1979. RPC_ENTRY
  1980. NdrNsSendReceive(
  1981.     PMIDL_STUB_MESSAGE      pStubMsg,
  1982.     unsigned char  *        pBufferEnd,
  1983.     RPC_BINDING_HANDLE  *   pAutoHandle
  1984.     );
  1985. RPCRTAPI
  1986. void
  1987. RPC_ENTRY
  1988. NdrFreeBuffer(
  1989.     PMIDL_STUB_MESSAGE      pStubMsg
  1990.     );
  1991. RPCRTAPI
  1992. RPC_STATUS
  1993. RPC_ENTRY
  1994. NdrGetDcomProtocolVersion(
  1995.     PMIDL_STUB_MESSAGE      pStubMsg,
  1996.     RPC_VERSION *           pVersion );
  1997. /*
  1998.  * Interpreter calls.
  1999.  */
  2000. /* client */
  2001. CLIENT_CALL_RETURN RPC_VAR_ENTRY
  2002. NdrClientCall2(
  2003.     PMIDL_STUB_DESC         pStubDescriptor,
  2004.     PFORMAT_STRING          pFormat,
  2005.     ...
  2006.     );
  2007. CLIENT_CALL_RETURN RPC_VAR_ENTRY
  2008. NdrClientCall(
  2009.     PMIDL_STUB_DESC         pStubDescriptor,
  2010.     PFORMAT_STRING          pFormat,
  2011.     ...
  2012.     );
  2013. CLIENT_CALL_RETURN RPC_VAR_ENTRY
  2014. NdrAsyncClientCall(
  2015.     PMIDL_STUB_DESC         pStubDescriptor,
  2016.     PFORMAT_STRING          pFormat,
  2017.     ...
  2018.     );
  2019. CLIENT_CALL_RETURN RPC_VAR_ENTRY
  2020. NdrDcomAsyncClientCall(
  2021.     PMIDL_STUB_DESC         pStubDescriptor,
  2022.     PFORMAT_STRING          pFormat,
  2023.     ...
  2024.     );
  2025. /* server */
  2026. typedef enum {
  2027.     STUB_UNMARSHAL,
  2028.     STUB_CALL_SERVER,
  2029.     STUB_MARSHAL,
  2030.     STUB_CALL_SERVER_NO_HRESULT
  2031. }STUB_PHASE;
  2032. typedef enum {
  2033.     PROXY_CALCSIZE,
  2034.     PROXY_GETBUFFER,
  2035.     PROXY_MARSHAL,
  2036.     PROXY_SENDRECEIVE,
  2037.     PROXY_UNMARSHAL
  2038. }PROXY_PHASE;
  2039. struct IRpcStubBuffer;      // Forward declaration
  2040. // Raw RPC only
  2041. RPCRTAPI
  2042. void
  2043. RPC_ENTRY
  2044. NdrAsyncServerCall(
  2045.     PRPC_MESSAGE                pRpcMsg
  2046.     );
  2047. // old dcom async scheme
  2048. RPCRTAPI
  2049. long
  2050. RPC_ENTRY
  2051. NdrAsyncStubCall(
  2052.     struct IRpcStubBuffer *     pThis,
  2053.     struct IRpcChannelBuffer *  pChannel,
  2054.     PRPC_MESSAGE                pRpcMsg,
  2055.     unsigned long *             pdwStubPhase
  2056.     );
  2057. // async uuid
  2058. RPCRTAPI
  2059. long
  2060. RPC_ENTRY
  2061. NdrDcomAsyncStubCall(
  2062.     struct IRpcStubBuffer    *  pThis,
  2063.     struct IRpcChannelBuffer *  pChannel,
  2064.     PRPC_MESSAGE                pRpcMsg,
  2065.     unsigned long            *  pdwStubPhase
  2066.     );
  2067. RPCRTAPI
  2068. long
  2069. RPC_ENTRY
  2070. NdrStubCall2(
  2071.     struct IRpcStubBuffer  *    pThis,
  2072.     struct IRpcChannelBuffer  * pChannel,
  2073.     PRPC_MESSAGE                pRpcMsg,
  2074.     unsigned long  *            pdwStubPhase
  2075.     );
  2076. RPCRTAPI
  2077. void
  2078. RPC_ENTRY
  2079. NdrServerCall2(
  2080.     PRPC_MESSAGE                pRpcMsg
  2081.     );
  2082. RPCRTAPI
  2083. long
  2084. RPC_ENTRY
  2085. NdrStubCall (
  2086.     struct IRpcStubBuffer  *    pThis,
  2087.     struct IRpcChannelBuffer  * pChannel,
  2088.     PRPC_MESSAGE                pRpcMsg,
  2089.     unsigned long  *            pdwStubPhase
  2090.     );
  2091. RPCRTAPI
  2092. void
  2093. RPC_ENTRY
  2094. NdrServerCall(
  2095.     PRPC_MESSAGE                pRpcMsg
  2096.     );
  2097. RPCRTAPI
  2098. int
  2099. RPC_ENTRY
  2100. NdrServerUnmarshall(
  2101.     struct IRpcChannelBuffer  * pChannel,
  2102.     PRPC_MESSAGE                pRpcMsg,
  2103.     PMIDL_STUB_MESSAGE          pStubMsg,
  2104.     PMIDL_STUB_DESC             pStubDescriptor,
  2105.     PFORMAT_STRING              pFormat,
  2106.     void  *                     pParamList
  2107.     );
  2108. RPCRTAPI
  2109. void
  2110. RPC_ENTRY
  2111. NdrServerMarshall(
  2112.     struct IRpcStubBuffer  *    pThis,
  2113.     struct IRpcChannelBuffer  * pChannel,
  2114.     PMIDL_STUB_MESSAGE          pStubMsg,
  2115.     PFORMAT_STRING              pFormat
  2116.     );
  2117. /* Comm and Fault status */
  2118. RPCRTAPI
  2119. RPC_STATUS
  2120. RPC_ENTRY
  2121. NdrMapCommAndFaultStatus(
  2122.     PMIDL_STUB_MESSAGE          pStubMsg,
  2123.     unsigned long  *            pCommStatus,
  2124.     unsigned long  *            pFaultStatus,
  2125.     RPC_STATUS                  Status
  2126.     );
  2127. /* Helper routines */
  2128. RPCRTAPI
  2129. int
  2130. RPC_ENTRY
  2131. NdrSH_UPDecision(
  2132.     PMIDL_STUB_MESSAGE          pStubMsg,
  2133.     unsigned char          * *  pPtrInMem,
  2134.     RPC_BUFPTR                  pBuffer
  2135.     );
  2136. RPCRTAPI
  2137. int
  2138. RPC_ENTRY
  2139. NdrSH_TLUPDecision(
  2140.     PMIDL_STUB_MESSAGE          pStubMsg,
  2141.     unsigned char          * *  pPtrInMem
  2142.     );
  2143. RPCRTAPI
  2144. int
  2145. RPC_ENTRY
  2146. NdrSH_TLUPDecisionBuffer(
  2147.     PMIDL_STUB_MESSAGE          pStubMsg,
  2148.     unsigned char          * *  pPtrInMem
  2149.     );
  2150. RPCRTAPI
  2151. int
  2152. RPC_ENTRY
  2153. NdrSH_IfAlloc(
  2154.     PMIDL_STUB_MESSAGE          pStubMsg,
  2155.     unsigned char          * *  pPtrInMem,
  2156.     unsigned long               Count
  2157.     );
  2158. RPCRTAPI
  2159. int
  2160. RPC_ENTRY
  2161. NdrSH_IfAllocRef(
  2162.     PMIDL_STUB_MESSAGE          pStubMsg,
  2163.     unsigned char          * *  pPtrInMem,
  2164.     unsigned long               Count
  2165.     );
  2166. RPCRTAPI
  2167. int
  2168. RPC_ENTRY
  2169. NdrSH_IfAllocSet(
  2170.     PMIDL_STUB_MESSAGE          pStubMsg,
  2171.     unsigned char          * *  pPtrInMem,
  2172.     unsigned long               Count
  2173.     );
  2174. RPCRTAPI
  2175. RPC_BUFPTR
  2176. RPC_ENTRY
  2177. NdrSH_IfCopy(
  2178.     PMIDL_STUB_MESSAGE          pStubMsg,
  2179.     unsigned char          * *  pPtrInMem,
  2180.     unsigned long               Count
  2181.     );
  2182. RPCRTAPI
  2183. RPC_BUFPTR
  2184. RPC_ENTRY
  2185. NdrSH_IfAllocCopy(
  2186.     PMIDL_STUB_MESSAGE          pStubMsg,
  2187.     unsigned char          * *  pPtrInMem,
  2188.     unsigned long               Count
  2189.     );
  2190. RPCRTAPI
  2191. unsigned long
  2192. RPC_ENTRY
  2193. NdrSH_Copy(
  2194.     unsigned char            *  pStubMsg,
  2195.     unsigned char            *  pPtrInMem,
  2196.     unsigned long               Count
  2197.     );
  2198. RPCRTAPI
  2199. void
  2200. RPC_ENTRY
  2201. NdrSH_IfFree(
  2202.     PMIDL_STUB_MESSAGE          pMessage,
  2203.     unsigned char            *  pPtr );
  2204. RPCRTAPI
  2205. RPC_BUFPTR
  2206. RPC_ENTRY
  2207. NdrSH_StringMarshall(
  2208.     PMIDL_STUB_MESSAGE          pMessage,
  2209.     unsigned char            *  pMemory,
  2210.     unsigned long               Count,
  2211.     int                         Size );
  2212. RPCRTAPI
  2213. RPC_BUFPTR
  2214. RPC_ENTRY
  2215. NdrSH_StringUnMarshall(
  2216.     PMIDL_STUB_MESSAGE          pMessage,
  2217.     unsigned char          * *  pMemory,
  2218.     int                         Size );
  2219. /****************************************************************************
  2220.     MIDL 2.0 memory package: rpc_ss_* rpc_sm_*
  2221.  ****************************************************************************/
  2222. typedef void  * RPC_SS_THREAD_HANDLE;
  2223. typedef void  * __RPC_API
  2224. RPC_CLIENT_ALLOC (
  2225.     IN size_t Size
  2226.     );
  2227. typedef void __RPC_API
  2228. RPC_CLIENT_FREE (
  2229.     IN void  * Ptr
  2230.     );
  2231. /*++
  2232.      RpcSs* package
  2233. --*/
  2234. RPCRTAPI
  2235. void  *
  2236. RPC_ENTRY
  2237. RpcSsAllocate (
  2238.     IN size_t Size
  2239.     );
  2240. RPCRTAPI
  2241. void
  2242. RPC_ENTRY
  2243. RpcSsDisableAllocate (
  2244.     void
  2245.     );
  2246. RPCRTAPI
  2247. void
  2248. RPC_ENTRY
  2249. RpcSsEnableAllocate (
  2250.     void
  2251.     );
  2252. RPCRTAPI
  2253. void
  2254. RPC_ENTRY
  2255. RpcSsFree (
  2256.     IN void  * NodeToFree
  2257.     );
  2258. RPCRTAPI
  2259. RPC_SS_THREAD_HANDLE
  2260. RPC_ENTRY
  2261. RpcSsGetThreadHandle (
  2262.     void
  2263.     );
  2264. RPCRTAPI
  2265. void
  2266. RPC_ENTRY
  2267. RpcSsSetClientAllocFree (
  2268.     IN RPC_CLIENT_ALLOC  * ClientAlloc,
  2269.     IN RPC_CLIENT_FREE   * ClientFree
  2270.     );
  2271. RPCRTAPI
  2272. void
  2273. RPC_ENTRY
  2274. RpcSsSetThreadHandle (
  2275.     IN RPC_SS_THREAD_HANDLE Id
  2276.     );
  2277. RPCRTAPI
  2278. void
  2279. RPC_ENTRY
  2280. RpcSsSwapClientAllocFree (
  2281.     IN RPC_CLIENT_ALLOC     * ClientAlloc,
  2282.     IN RPC_CLIENT_FREE      * ClientFree,
  2283.     OUT RPC_CLIENT_ALLOC *  * OldClientAlloc,
  2284.     OUT RPC_CLIENT_FREE  *  * OldClientFree
  2285.     );
  2286. /*++
  2287.      RpcSm* package
  2288. --*/
  2289. RPCRTAPI
  2290. void  *
  2291. RPC_ENTRY
  2292. RpcSmAllocate (
  2293.     IN  size_t          Size,
  2294.     OUT RPC_STATUS  *   pStatus
  2295.     );
  2296. RPCRTAPI
  2297. RPC_STATUS
  2298. RPC_ENTRY
  2299. RpcSmClientFree (
  2300.     IN  void        *   pNodeToFree
  2301.     );
  2302. RPCRTAPI
  2303. RPC_STATUS
  2304. RPC_ENTRY
  2305. RpcSmDestroyClientContext (
  2306.     IN void         * * ContextHandle
  2307.     );
  2308. RPCRTAPI
  2309. RPC_STATUS
  2310. RPC_ENTRY
  2311. RpcSmDisableAllocate (
  2312.     void
  2313.     );
  2314. RPCRTAPI
  2315. RPC_STATUS
  2316. RPC_ENTRY
  2317. RpcSmEnableAllocate (
  2318.     void
  2319.     );
  2320. RPCRTAPI
  2321. RPC_STATUS
  2322. RPC_ENTRY
  2323. RpcSmFree (
  2324.     IN void         *   NodeToFree
  2325.     );
  2326. RPCRTAPI
  2327. RPC_SS_THREAD_HANDLE
  2328. RPC_ENTRY
  2329. RpcSmGetThreadHandle (
  2330.     OUT RPC_STATUS  *   pStatus
  2331.     );
  2332. RPCRTAPI
  2333. RPC_STATUS
  2334. RPC_ENTRY
  2335. RpcSmSetClientAllocFree (
  2336.     IN RPC_CLIENT_ALLOC * ClientAlloc,
  2337.     IN RPC_CLIENT_FREE  * ClientFree
  2338.     );
  2339. RPCRTAPI
  2340. RPC_STATUS
  2341. RPC_ENTRY
  2342. RpcSmSetThreadHandle (
  2343.     IN RPC_SS_THREAD_HANDLE Id
  2344.     );
  2345. RPCRTAPI
  2346. RPC_STATUS
  2347. RPC_ENTRY
  2348. RpcSmSwapClientAllocFree (
  2349.     IN RPC_CLIENT_ALLOC     *   ClientAlloc,
  2350.     IN RPC_CLIENT_FREE      *   ClientFree,
  2351.     OUT RPC_CLIENT_ALLOC    * * OldClientAlloc,
  2352.     OUT RPC_CLIENT_FREE     * * OldClientFree
  2353.     );
  2354. /*++
  2355.      Ndr stub entry points
  2356. --*/
  2357. RPCRTAPI
  2358. void
  2359. RPC_ENTRY
  2360. NdrRpcSsEnableAllocate(
  2361.     PMIDL_STUB_MESSAGE      pMessage );
  2362. RPCRTAPI
  2363. void
  2364. RPC_ENTRY
  2365. NdrRpcSsDisableAllocate(
  2366.     PMIDL_STUB_MESSAGE      pMessage );
  2367. RPCRTAPI
  2368. void
  2369. RPC_ENTRY
  2370. NdrRpcSmSetClientToOsf(
  2371.     PMIDL_STUB_MESSAGE      pMessage );
  2372. RPCRTAPI
  2373. void  *
  2374. RPC_ENTRY
  2375. NdrRpcSmClientAllocate (
  2376.     IN size_t Size
  2377.     );
  2378. RPCRTAPI
  2379. void
  2380. RPC_ENTRY
  2381. NdrRpcSmClientFree (
  2382.     IN void  * NodeToFree
  2383.     );
  2384. RPCRTAPI
  2385. void  *
  2386. RPC_ENTRY
  2387. NdrRpcSsDefaultAllocate (
  2388.     IN size_t Size
  2389.     );
  2390. RPCRTAPI
  2391. void
  2392. RPC_ENTRY
  2393. NdrRpcSsDefaultFree (
  2394.     IN void  * NodeToFree
  2395.     );
  2396. /****************************************************************************
  2397.     end of memory package: rpc_ss_* rpc_sm_*
  2398.  ****************************************************************************/
  2399. /****************************************************************************
  2400.  * Full Pointer APIs
  2401.  ****************************************************************************/
  2402. RPCRTAPI
  2403. PFULL_PTR_XLAT_TABLES
  2404. RPC_ENTRY
  2405. NdrFullPointerXlatInit(
  2406.     unsigned long           NumberOfPointers,
  2407.     XLAT_SIDE               XlatSide
  2408.     );
  2409. RPCRTAPI
  2410. void
  2411. RPC_ENTRY
  2412. NdrFullPointerXlatFree(
  2413.     PFULL_PTR_XLAT_TABLES   pXlatTables
  2414.     );
  2415. RPCRTAPI
  2416. int
  2417. RPC_ENTRY
  2418. NdrFullPointerQueryPointer(
  2419.     PFULL_PTR_XLAT_TABLES   pXlatTables,
  2420.     void  *                 pPointer,
  2421.     unsigned char           QueryType,
  2422.     unsigned long  *        pRefId
  2423.     );
  2424. RPCRTAPI
  2425. int
  2426. RPC_ENTRY
  2427. NdrFullPointerQueryRefId(
  2428.     PFULL_PTR_XLAT_TABLES   pXlatTables,
  2429.     unsigned long           RefId,
  2430.     unsigned char           QueryType,
  2431.     void  * *               ppPointer
  2432.     );
  2433. RPCRTAPI
  2434. void
  2435. RPC_ENTRY
  2436. NdrFullPointerInsertRefId(
  2437.     PFULL_PTR_XLAT_TABLES   pXlatTables,
  2438.     unsigned long           RefId,
  2439.     void  *                 pPointer
  2440.     );
  2441. RPCRTAPI
  2442. int
  2443. RPC_ENTRY
  2444. NdrFullPointerFree(
  2445.     PFULL_PTR_XLAT_TABLES   pXlatTables,
  2446.     void  *                 Pointer
  2447.     );
  2448. RPCRTAPI
  2449. void  *
  2450. RPC_ENTRY
  2451. NdrAllocate(
  2452.     PMIDL_STUB_MESSAGE      pStubMsg,
  2453.     size_t                  Len
  2454.     );
  2455. RPCRTAPI
  2456. void
  2457. RPC_ENTRY
  2458. NdrClearOutParameters(
  2459.     PMIDL_STUB_MESSAGE      pStubMsg,
  2460.     PFORMAT_STRING          pFormat,
  2461.     void  *                 ArgAddr
  2462.     );
  2463. /****************************************************************************
  2464.  * Proxy APIs
  2465.  ****************************************************************************/
  2466. RPCRTAPI
  2467. void  *
  2468. RPC_ENTRY
  2469. NdrOleAllocate (
  2470.     IN size_t Size
  2471.     );
  2472. RPCRTAPI
  2473. void
  2474. RPC_ENTRY
  2475. NdrOleFree (
  2476.     IN void  * NodeToFree
  2477.     );
  2478. #ifdef CONST_VTABLE
  2479. #define CONST_VTBL const
  2480. #else
  2481. #define CONST_VTBL
  2482. #endif
  2483. /****************************************************************************
  2484.  * VC COM support 
  2485.  ****************************************************************************/
  2486. #ifndef DECLSPEC_SELECTANY
  2487. #if (_MSC_VER >= 1100)
  2488. #define DECLSPEC_SELECTANY __declspec(selectany)
  2489. #else
  2490. #define DECLSPEC_SELECTANY
  2491. #endif
  2492. #endif
  2493. #ifndef DECLSPEC_NOVTABLE
  2494. #if (_MSC_VER >= 1100) && defined(__cplusplus)
  2495. #define DECLSPEC_NOVTABLE __declspec(novtable)
  2496. #else
  2497. #define DECLSPEC_NOVTABLE
  2498. #endif
  2499. #endif
  2500. #ifndef DECLSPEC_UUID
  2501. #if (_MSC_VER >= 1100) && defined(__cplusplus)
  2502. #define DECLSPEC_UUID(x) __declspec(uuid(x))
  2503. #else
  2504. #define DECLSPEC_UUID(x)
  2505. #endif
  2506. #endif
  2507. #define MIDL_INTERFACE(x)   struct DECLSPEC_UUID(x) DECLSPEC_NOVTABLE
  2508. #if _MSC_VER >= 1100
  2509. #define EXTERN_GUID(itf,l1,s1,s2,c1,c2,c3,c4,c5,c6,c7,c8)  
  2510.   EXTERN_C const IID DECLSPEC_SELECTANY itf = {l1,s1,s2,{c1,c2,c3,c4,c5,c6,c7,c8}}
  2511. #else
  2512. #define EXTERN_GUID(itf,l1,s1,s2,c1,c2,c3,c4,c5,c6,c7,c8) EXTERN_C const IID itf
  2513. #endif
  2514. /****************************************************************************
  2515.  * UserMarshal information
  2516.  ****************************************************************************/
  2517. typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
  2518. {
  2519.     void *                      Buffer;
  2520.     unsigned long               BufferSize;
  2521.     void *(__RPC_API * pfnAllocate)(size_t);
  2522.     void (__RPC_API * pfnFree)(void *);
  2523.     struct IRpcChannelBuffer *  pRpcChannelBuffer;
  2524.     ULONG_PTR                   Reserved[5];
  2525. } NDR_USER_MARSHAL_INFO_LEVEL1;
  2526. #if !defined( RC_INVOKED )
  2527. #if _MSC_VER >= 1200
  2528. #pragma warning(push)
  2529. #endif
  2530. #pragma warning(disable:4201)
  2531. #endif
  2532. typedef struct _NDR_USER_MARSHAL_INFO
  2533. {
  2534.     unsigned long InformationLevel;
  2535.     union {
  2536.         NDR_USER_MARSHAL_INFO_LEVEL1 Level1;
  2537.     };
  2538. } NDR_USER_MARSHAL_INFO;
  2539. #if !defined( RC_INVOKED )
  2540. #if _MSC_VER >= 1200
  2541. #pragma warning(pop)
  2542. #else
  2543. #pragma warning(default:4201)
  2544. #endif
  2545. #endif
  2546. RPC_STATUS
  2547. RPC_ENTRY
  2548. NdrGetUserMarshalInfo (
  2549.     IN unsigned long        *   pFlags,
  2550.     IN unsigned long            InformationLevel,
  2551.     OUT NDR_USER_MARSHAL_INFO * pMarshalInfo
  2552.     );
  2553. /****************************************************************************
  2554.  * 64bit APIs
  2555.  ****************************************************************************/
  2556. RPC_STATUS RPC_ENTRY
  2557. NdrCreateServerInterfaceFromStub(
  2558.             IN struct IRpcStubBuffer* pStub,
  2559.             IN OUT RPC_SERVER_INTERFACE *pServerIf );
  2560. /*
  2561.  * Interpreter calls
  2562.  */
  2563. CLIENT_CALL_RETURN RPC_VAR_ENTRY
  2564. NdrClientCall3(
  2565.     MIDL_STUBLESS_PROXY_INFO   *pProxyInfo,
  2566.     unsigned long               nProcNum,
  2567.     void *                      pReturnValue,
  2568.     ...
  2569.     );
  2570. CLIENT_CALL_RETURN RPC_VAR_ENTRY
  2571. Ndr64AsyncClientCall(
  2572.     MIDL_STUBLESS_PROXY_INFO   *pProxyInfo,
  2573.     unsigned long               nProcNum,
  2574.     void *                      pReturnValue,
  2575.     ...
  2576.     );
  2577. CLIENT_CALL_RETURN RPC_VAR_ENTRY
  2578. Ndr64DcomAsyncClientCall(
  2579.     MIDL_STUBLESS_PROXY_INFO   *pProxyInfo,
  2580.     unsigned long               nProcNum,
  2581.     void *                      pReturnValue,
  2582.     ...
  2583.     );
  2584. struct IRpcStubBuffer;      // Forward declaration
  2585. RPCRTAPI
  2586. void
  2587. RPC_ENTRY
  2588. Ndr64AsyncServerCall(
  2589.     PRPC_MESSAGE                pRpcMsg
  2590.     );
  2591. RPCRTAPI
  2592. void
  2593. RPC_ENTRY
  2594. Ndr64AsyncServerCall64(
  2595.     PRPC_MESSAGE                pRpcMsg
  2596.     );
  2597. RPCRTAPI
  2598. void
  2599. RPC_ENTRY
  2600. Ndr64AsyncServerCallAll(
  2601.     PRPC_MESSAGE                pRpcMsg
  2602.     );
  2603. RPCRTAPI
  2604. long
  2605. RPC_ENTRY
  2606. Ndr64AsyncStubCall(
  2607.     struct IRpcStubBuffer *     pThis,
  2608.     struct IRpcChannelBuffer *  pChannel,
  2609.     PRPC_MESSAGE                pRpcMsg,
  2610.     unsigned long *             pdwStubPhase
  2611.     );
  2612. /* async uuid */
  2613. RPCRTAPI
  2614. long
  2615. RPC_ENTRY
  2616. Ndr64DcomAsyncStubCall(
  2617.     struct IRpcStubBuffer    *  pThis,
  2618.     struct IRpcChannelBuffer *  pChannel,
  2619.     PRPC_MESSAGE                pRpcMsg,
  2620.     unsigned long            *  pdwStubPhase
  2621.     );
  2622. RPCRTAPI
  2623. long
  2624. RPC_ENTRY
  2625. NdrStubCall3 (
  2626.     struct IRpcStubBuffer  *    pThis,
  2627.     struct IRpcChannelBuffer  * pChannel,
  2628.     PRPC_MESSAGE                pRpcMsg,
  2629.     unsigned long  *            pdwStubPhase
  2630.     );
  2631. RPCRTAPI
  2632. void
  2633. RPC_ENTRY
  2634. NdrServerCallAll(
  2635.     PRPC_MESSAGE                pRpcMsg
  2636.     );
  2637. RPCRTAPI
  2638. void
  2639. RPC_ENTRY
  2640. NdrServerCallNdr64(
  2641.     PRPC_MESSAGE                pRpcMsg
  2642.     );
  2643. RPCRTAPI
  2644. void
  2645. RPC_ENTRY
  2646. NdrServerCall3(
  2647.     PRPC_MESSAGE                pRpcMsg
  2648.     );
  2649. /* [partial_ignore] functions*/
  2650. RPCRTAPI
  2651. void
  2652. RPC_ENTRY
  2653. NdrPartialIgnoreClientMarshall(
  2654.     PMIDL_STUB_MESSAGE          pStubMsg,
  2655.     void *                      pMemory
  2656.     );
  2657. RPCRTAPI
  2658. void
  2659. RPC_ENTRY
  2660. NdrPartialIgnoreServerUnmarshall(
  2661.     PMIDL_STUB_MESSAGE          pStubMsg,
  2662.     void **                     ppMemory
  2663.     );
  2664. RPCRTAPI
  2665. void
  2666. RPC_ENTRY
  2667. NdrPartialIgnoreClientBufferSize(
  2668.     PMIDL_STUB_MESSAGE          pStubMsg,
  2669.     void *                      pMemory
  2670.     );
  2671. RPCRTAPI
  2672. void
  2673. RPC_ENTRY
  2674. NdrPartialIgnoreServerInitialize(
  2675.     PMIDL_STUB_MESSAGE          pStubMsg,
  2676.     void **                     ppMemory,
  2677.     PFORMAT_STRING              pFormat
  2678.     );
  2679. void RPC_ENTRY
  2680. RpcUserFree( handle_t AsyncHandle, void * pBuffer );
  2681. #ifdef __cplusplus
  2682. }
  2683. #endif
  2684. #include <poppack.h>
  2685. #endif /* __RPCNDR_H__ */