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.

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