Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3076 lines
77 KiB

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