home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 September / CHIPCD_9_99.iso / software / uaktualnienia / OptionPackPL / iis4_07.cab / rpcndr.h < prev    next >
C/C++ Source or Header  |  1998-04-27  |  74KB  |  2,569 lines

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