Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2483 lines
68 KiB

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