PageRenderTime 56ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/header/Microsoft SDKs/Windows/v7.0A/Include/RpcNdr.h

https://github.com/nihon-tc/Rtest
C Header | 3106 lines | 2240 code | 515 blank | 351 comment | 17 complexity | b66e6161d3a01a5edb4d1253b551b12d MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. rpcndr.h
  5. Abstract:
  6. Definitions for stub data structures and prototypes of helper functions.
  7. --*/
  8. // This version of the rpcndr.h file corresponds to MIDL version 5.0.+
  9. // used with Windows 2000/XP build 1700+
  10. #ifndef __RPCNDR_H_VERSION__
  11. #define __RPCNDR_H_VERSION__ ( 500 )
  12. #endif // __RPCNDR_H_VERSION__
  13. #ifndef __RPCNDR_H__
  14. #define __RPCNDR_H__
  15. #if _MSC_VER > 1000
  16. #pragma once
  17. #endif
  18. #ifdef __REQUIRED_RPCNDR_H_VERSION__
  19. #if ( __RPCNDR_H_VERSION__ < __REQUIRED_RPCNDR_H_VERSION__ )
  20. #error incorrect <rpcndr.h> version. Use the header that matches with the MIDL compiler.
  21. #endif
  22. #endif
  23. #include <pshpack8.h>
  24. #include <basetsd.h>
  25. #if !defined(_KRPCENV_)
  26. #include <rpcnsip.h>
  27. #endif
  28. #include <rpcsal.h>
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32. /****************************************************************************
  33. Network Computing Architecture (NCA) definition:
  34. Network Data Representation: (NDR) Label format:
  35. An unsigned long (32 bits) with the following layout:
  36. 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
  37. 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
  38. +---------------+---------------+---------------+-------+-------+
  39. | Reserved | Reserved |Floating point | Int | Char |
  40. | | |Representation | Rep. | Rep. |
  41. +---------------+---------------+---------------+-------+-------+
  42. Where
  43. Reserved:
  44. Must be zero (0) for NCA 1.5 and NCA 2.0.
  45. Floating point Representation is:
  46. 0 - IEEE
  47. 1 - VAX
  48. 2 - Cray
  49. 3 - IBM
  50. Int Rep. is Integer Representation:
  51. 0 - Big Endian
  52. 1 - Little Endian
  53. Char Rep. is Character Representation:
  54. 0 - ASCII
  55. 1 - EBCDIC
  56. The Microsoft Local Data Representation (for all platforms which are
  57. of interest currently is edefined below:
  58. ****************************************************************************/
  59. #define NDR_CHAR_REP_MASK (unsigned long)0X0000000FL
  60. #define NDR_INT_REP_MASK (unsigned long)0X000000F0L
  61. #define NDR_FLOAT_REP_MASK (unsigned long)0X0000FF00L
  62. #define NDR_LITTLE_ENDIAN (unsigned long)0X00000010L
  63. #define NDR_BIG_ENDIAN (unsigned long)0X00000000L
  64. #define NDR_IEEE_FLOAT (unsigned long)0X00000000L
  65. #define NDR_VAX_FLOAT (unsigned long)0X00000100L
  66. #define NDR_IBM_FLOAT (unsigned long)0X00000300L
  67. #define NDR_ASCII_CHAR (unsigned long)0X00000000L
  68. #define NDR_EBCDIC_CHAR (unsigned long)0X00000001L
  69. #if defined(__RPC_MAC__)
  70. #define NDR_LOCAL_DATA_REPRESENTATION (unsigned long)0X00000000L
  71. #define NDR_LOCAL_ENDIAN NDR_BIG_ENDIAN
  72. #else
  73. #define NDR_LOCAL_DATA_REPRESENTATION (unsigned long)0X00000010L
  74. #define NDR_LOCAL_ENDIAN NDR_LITTLE_ENDIAN
  75. #endif
  76. /****************************************************************************
  77. * Macros for targeted platforms
  78. ****************************************************************************/
  79. #if (0x601 <= _WIN32_WINNT)
  80. #define TARGET_IS_NT61_OR_LATER 1
  81. #else
  82. #define TARGET_IS_NT61_OR_LATER 0
  83. #endif
  84. #if (0x600 <= _WIN32_WINNT)
  85. #define TARGET_IS_NT60_OR_LATER 1
  86. #else
  87. #define TARGET_IS_NT60_OR_LATER 0
  88. #endif
  89. #if (0x501 <= _WIN32_WINNT)
  90. #define TARGET_IS_NT51_OR_LATER 1
  91. #else
  92. #define TARGET_IS_NT51_OR_LATER 0
  93. #endif
  94. #if (0x500 <= _WIN32_WINNT)
  95. #define TARGET_IS_NT50_OR_LATER 1
  96. #else
  97. #define TARGET_IS_NT50_OR_LATER 0
  98. #endif
  99. #if (defined(_WIN32_DCOM) || 0x400 <= _WIN32_WINNT)
  100. #define TARGET_IS_NT40_OR_LATER 1
  101. #else
  102. #define TARGET_IS_NT40_OR_LATER 0
  103. #endif
  104. #if (0x400 <= WINVER)
  105. #define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
  106. #else
  107. #define TARGET_IS_NT351_OR_WIN95_OR_LATER 0
  108. #endif
  109. /****************************************************************************
  110. * Other MIDL base types / predefined types:
  111. ****************************************************************************/
  112. #define small char
  113. typedef unsigned char byte;
  114. typedef byte cs_byte;
  115. typedef unsigned char boolean;
  116. #ifndef _HYPER_DEFINED
  117. #define _HYPER_DEFINED
  118. #if (!defined(_M_IX86) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64))
  119. #define hyper __int64
  120. #define MIDL_uhyper unsigned __int64
  121. #else
  122. typedef double hyper;
  123. typedef double MIDL_uhyper;
  124. #endif
  125. #endif // _HYPER_DEFINED
  126. #ifndef _WCHAR_T_DEFINED
  127. typedef unsigned short wchar_t;
  128. #define _WCHAR_T_DEFINED
  129. #endif
  130. #ifndef _SIZE_T_DEFINED
  131. #ifdef __RPC_WIN64__
  132. typedef unsigned __int64 size_t;
  133. #else
  134. typedef unsigned int size_t;
  135. #endif
  136. #define _SIZE_T_DEFINED
  137. #endif
  138. #ifdef __RPC_WIN32__
  139. #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
  140. #define __RPC_CALLEE __stdcall
  141. #else
  142. #define __RPC_CALLEE
  143. #endif
  144. #endif
  145. #ifndef __MIDL_USER_DEFINED
  146. #define midl_user_allocate MIDL_user_allocate
  147. #define midl_user_free MIDL_user_free
  148. #define __MIDL_USER_DEFINED
  149. #endif
  150. __bcount_opt(size)
  151. void * __RPC_USER MIDL_user_allocate(size_t size);
  152. void __RPC_USER MIDL_user_free( __inout void * );
  153. __bcount_opt(size)
  154. void * __RPC_USER I_RpcDefaultAllocate(
  155. handle_t bh, size_t size, void * (* RealAlloc)(size_t) );
  156. void __RPC_USER I_RpcDefaultFree(
  157. handle_t bh, void *, void (*RealFree)(void *) );
  158. #define RPC_VAR_ENTRY __cdecl
  159. /* winnt only */
  160. #if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64)
  161. #define __MIDL_DECLSPEC_DLLIMPORT __declspec(dllimport)
  162. #define __MIDL_DECLSPEC_DLLEXPORT __declspec(dllexport)
  163. #else
  164. #define __MIDL_DECLSPEC_DLLIMPORT
  165. #define __MIDL_DECLSPEC_DLLEXPORT
  166. #endif
  167. /****************************************************************************
  168. * Context handle management related definitions:
  169. *
  170. * Client and Server Contexts.
  171. *
  172. ****************************************************************************/
  173. typedef void * NDR_CCONTEXT;
  174. typedef struct
  175. {
  176. void * pad[2];
  177. void * userContext;
  178. } * NDR_SCONTEXT;
  179. #define NDRSContextValue(hContext) (&(hContext)->userContext)
  180. #define cbNDRContext 20 /* size of context on WIRE */
  181. typedef void (__RPC_USER * NDR_RUNDOWN)(void * context);
  182. typedef void (__RPC_USER * NDR_NOTIFY_ROUTINE)(void);
  183. typedef void (__RPC_USER * NDR_NOTIFY2_ROUTINE)(boolean flag);
  184. typedef struct _SCONTEXT_QUEUE {
  185. unsigned long NumberOfObjects;
  186. NDR_SCONTEXT * ArrayOfObjects;
  187. } SCONTEXT_QUEUE, * PSCONTEXT_QUEUE;
  188. RPCRTAPI
  189. RPC_BINDING_HANDLE
  190. RPC_ENTRY
  191. NDRCContextBinding (
  192. __in NDR_CCONTEXT CContext
  193. );
  194. RPCRTAPI
  195. void
  196. RPC_ENTRY
  197. NDRCContextMarshall (
  198. __in NDR_CCONTEXT CContext,
  199. __out void *pBuff
  200. );
  201. RPCRTAPI
  202. void
  203. RPC_ENTRY
  204. NDRCContextUnmarshall (
  205. __inout NDR_CCONTEXT * pCContext,
  206. __in RPC_BINDING_HANDLE hBinding,
  207. __in void * pBuff,
  208. __in unsigned long DataRepresentation
  209. );
  210. RPCRTAPI
  211. void
  212. RPC_ENTRY
  213. NDRCContextUnmarshall2 (
  214. __inout NDR_CCONTEXT * pCContext,
  215. __in RPC_BINDING_HANDLE hBinding,
  216. __in void * pBuff,
  217. __in unsigned long DataRepresentation
  218. );
  219. RPCRTAPI
  220. void
  221. RPC_ENTRY
  222. NDRSContextMarshall (
  223. __in NDR_SCONTEXT CContext,
  224. __out void * pBuff,
  225. __in NDR_RUNDOWN userRunDownIn
  226. );
  227. RPCRTAPI
  228. NDR_SCONTEXT
  229. RPC_ENTRY
  230. NDRSContextUnmarshall (
  231. __in void * 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 * pBuff,
  241. __in NDR_RUNDOWN userRunDownIn
  242. );
  243. RPCRTAPI
  244. void
  245. RPC_ENTRY
  246. NDRSContextMarshall2 (
  247. __in RPC_BINDING_HANDLE BindingHandle,
  248. __in NDR_SCONTEXT CContext,
  249. __out void * pBuff,
  250. __in NDR_RUNDOWN userRunDownIn,
  251. __in void * CtxGuard,
  252. __in unsigned long Flags
  253. );
  254. RPCRTAPI
  255. NDR_SCONTEXT
  256. RPC_ENTRY
  257. NDRSContextUnmarshallEx (
  258. __in RPC_BINDING_HANDLE BindingHandle,
  259. __in void * pBuff,
  260. __in unsigned long DataRepresentation
  261. );
  262. RPCRTAPI
  263. NDR_SCONTEXT
  264. RPC_ENTRY
  265. NDRSContextUnmarshall2(
  266. __in RPC_BINDING_HANDLE BindingHandle,
  267. __in void * pBuff,
  268. __in unsigned long DataRepresentation,
  269. __in void * CtxGuard,
  270. __in unsigned long Flags
  271. );
  272. RPCRTAPI
  273. void
  274. RPC_ENTRY
  275. RpcSsDestroyClientContext (
  276. __in void * * ContextHandle
  277. );
  278. /****************************************************************************
  279. NDR conversion related definitions.
  280. ****************************************************************************/
  281. #define byte_from_ndr(source, target) \
  282. { \
  283. *(target) = *(*(char * *)&(source)->Buffer)++; \
  284. }
  285. #define byte_array_from_ndr(Source, LowerIndex, UpperIndex, Target) \
  286. { \
  287. NDRcopy ( \
  288. (((char *)(Target))+(LowerIndex)), \
  289. (Source)->Buffer, \
  290. (unsigned int)((UpperIndex)-(LowerIndex))); \
  291. *(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); \
  292. }
  293. #define boolean_from_ndr(source, target) \
  294. { \
  295. *(target) = *(*(char * *)&(source)->Buffer)++; \
  296. }
  297. #define boolean_array_from_ndr(Source, LowerIndex, UpperIndex, Target) \
  298. { \
  299. NDRcopy ( \
  300. (((char *)(Target))+(LowerIndex)), \
  301. (Source)->Buffer, \
  302. (unsigned int)((UpperIndex)-(LowerIndex))); \
  303. *(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); \
  304. }
  305. #define small_from_ndr(source, target) \
  306. { \
  307. *(target) = *(*(char * *)&(source)->Buffer)++; \
  308. }
  309. #define small_from_ndr_temp(source, target, format) \
  310. { \
  311. *(target) = *(*(char * *)(source))++; \
  312. }
  313. #define small_array_from_ndr(Source, LowerIndex, UpperIndex, Target) \
  314. { \
  315. NDRcopy ( \
  316. (((char *)(Target))+(LowerIndex)), \
  317. (Source)->Buffer, \
  318. (unsigned int)((UpperIndex)-(LowerIndex))); \
  319. *(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); \
  320. }
  321. /****************************************************************************
  322. Platform specific mapping of c-runtime functions.
  323. ****************************************************************************/
  324. #if defined(__RPC_WIN32__) || defined(__RPC_WIN64__)
  325. #define MIDL_ascii_strlen(string) \
  326. strlen(string)
  327. #define MIDL_ascii_strcpy(target,source) \
  328. strcpy(target,source)
  329. #define MIDL_memset(s,c,n) \
  330. memset(s,c,n)
  331. #endif
  332. /****************************************************************************
  333. MIDL 2.0 ndr definitions.
  334. ****************************************************************************/
  335. typedef unsigned long error_status_t;
  336. #define _midl_ma1( p, cast ) *(*( cast **)&p)++
  337. #define _midl_ma2( p, cast ) *(*( cast **)&p)++
  338. #define _midl_ma4( p, cast ) *(*( cast **)&p)++
  339. #define _midl_ma8( p, cast ) *(*( cast **)&p)++
  340. #define _midl_unma1( p, cast ) *(( cast *)p)++
  341. #define _midl_unma2( p, cast ) *(( cast *)p)++
  342. #define _midl_unma3( p, cast ) *(( cast *)p)++
  343. #define _midl_unma4( p, cast ) *(( cast *)p)++
  344. // Some alignment specific macros.
  345. // RKK64
  346. // these appear to be used in fossils inside MIDL
  347. #define _midl_fa2( p ) (p = (RPC_BUFPTR )((ULONG_PTR)(p+1) & ~0x1))
  348. #define _midl_fa4( p ) (p = (RPC_BUFPTR )((ULONG_PTR)(p+3) & ~0x3))
  349. #define _midl_fa8( p ) (p = (RPC_BUFPTR )((ULONG_PTR)(p+7) & ~0x7))
  350. #define _midl_addp( p, n ) (p += n)
  351. // Marshalling macros
  352. #define _midl_marsh_lhs( p, cast ) *(*( cast **)&p)++
  353. #define _midl_marsh_up( mp, p ) *(*(unsigned long **)&mp)++ = (unsigned long)p
  354. #define _midl_advmp( mp ) *(*(unsigned long **)&mp)++
  355. #define _midl_unmarsh_up( p ) (*(*(unsigned long **)&p)++)
  356. ////////////////////////////////////////////////////////////////////////////
  357. // Ndr macros.
  358. ////////////////////////////////////////////////////////////////////////////
  359. // RKK64
  360. // these appear to be used in fossils inside MIDL
  361. #define NdrMarshConfStringHdr( p, s, l ) (_midl_ma4( p, unsigned long) = s, \
  362. _midl_ma4( p, unsigned long) = 0, \
  363. _midl_ma4( p, unsigned long) = l)
  364. #define NdrUnMarshConfStringHdr(p, s, l) ((s=_midl_unma4(p,unsigned long),\
  365. (_midl_addp(p,4)), \
  366. (l=_midl_unma4(p,unsigned long))
  367. #define NdrMarshCCtxtHdl(pc,p) (NDRCContextMarshall( (NDR_CCONTEXT)pc, p ),p+20)
  368. #define NdrUnMarshCCtxtHdl(pc,p,h,drep) \
  369. (NDRCContextUnmarshall((NDR_CONTEXT)pc,h,p,drep), p+20)
  370. #define NdrUnMarshSCtxtHdl(pc, p,drep) (pc = NdrSContextUnMarshall(p,drep ))
  371. #define NdrMarshSCtxtHdl(pc,p,rd) (NdrSContextMarshall((NDR_SCONTEXT)pc,p, (NDR_RUNDOWN)rd)
  372. // end of unused
  373. #define NdrFieldOffset(s,f) (LONG_PTR)(& (((s *)0)->f))
  374. #define NdrFieldPad(s,f,p,t) ((unsigned long)(NdrFieldOffset(s,f) - NdrFieldOffset(s,p)) - sizeof(t))
  375. #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
  376. #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
  377. (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
  378. //
  379. // On the server side, the following exceptions are mapped to
  380. // the bad stub data exception if -error stub_data is used.
  381. //
  382. #define RPC_BAD_STUB_DATA_EXCEPTION_FILTER \
  383. ( (RpcExceptionCode() == STATUS_ACCESS_VIOLATION) || \
  384. (RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || \
  385. (RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
  386. (RpcExceptionCode() == RPC_S_INVALID_BOUND) )
  387. /////////////////////////////////////////////////////////////////////////////
  388. // Some stub helper functions.
  389. /////////////////////////////////////////////////////////////////////////////
  390. ////////////////////////////////////////////////////////////////////////////
  391. // Stub helper structures.
  392. ////////////////////////////////////////////////////////////////////////////
  393. struct _MIDL_STUB_MESSAGE;
  394. struct _MIDL_STUB_DESC;
  395. struct _FULL_PTR_XLAT_TABLES;
  396. typedef unsigned char * RPC_BUFPTR;
  397. typedef unsigned long RPC_LENGTH;
  398. // Expression evaluation callback routine prototype.
  399. typedef void (__RPC_USER * EXPR_EVAL)( struct _MIDL_STUB_MESSAGE * );
  400. typedef const unsigned char * PFORMAT_STRING;
  401. /*
  402. * Multidimensional conformant/varying array struct.
  403. */
  404. typedef struct
  405. {
  406. long Dimension;
  407. /* These fields MUST be (unsigned long *) */
  408. unsigned long * BufferConformanceMark;
  409. unsigned long * BufferVarianceMark;
  410. /* Count arrays, used for top level arrays in -Os stubs */
  411. unsigned long * MaxCountArray;
  412. unsigned long * OffsetArray;
  413. unsigned long * ActualCountArray;
  414. } ARRAY_INFO, *PARRAY_INFO;
  415. typedef struct _NDR_ASYNC_MESSAGE * PNDR_ASYNC_MESSAGE;
  416. typedef struct _NDR_CORRELATION_INFO *PNDR_CORRELATION_INFO;
  417. /*
  418. * MIDL Stub Message
  419. */
  420. typedef const unsigned char * PFORMAT_STRING;
  421. typedef struct _MIDL_SYNTAX_INFO MIDL_SYNTAX_INFO, *PMIDL_SYNTAX_INFO;
  422. struct NDR_ALLOC_ALL_NODES_CONTEXT;
  423. struct NDR_POINTER_QUEUE_STATE;
  424. struct _NDR_PROC_CONTEXT;
  425. typedef struct _MIDL_STUB_MESSAGE
  426. {
  427. /* RPC message structure. */
  428. PRPC_MESSAGE RpcMsg;
  429. /* Pointer into RPC message buffer. */
  430. unsigned char * Buffer;
  431. /*
  432. * These are used internally by the Ndr routines to mark the beginning
  433. * and end of an incoming RPC buffer.
  434. */
  435. unsigned char * BufferStart;
  436. unsigned char * BufferEnd;
  437. /*
  438. * Used internally by the Ndr routines as a place holder in the buffer.
  439. * On the marshalling side it's used to mark the location where conformance
  440. * size should be marshalled.
  441. * On the unmarshalling side it's used to mark the location in the buffer
  442. * used during pointer unmarshalling to base pointer offsets off of.
  443. */
  444. unsigned char * BufferMark;
  445. /* Set by the buffer sizing routines. */
  446. unsigned long BufferLength;
  447. /* Set by the memory sizing routines. */
  448. unsigned long MemorySize;
  449. /* Pointer to user memory. */
  450. unsigned char * Memory;
  451. /* Is the Ndr routine begin called from a client side stub. */
  452. unsigned char IsClient;
  453. unsigned char Pad;
  454. unsigned short uFlags2;
  455. /* Can the buffer be re-used for memory on unmarshalling. */
  456. int ReuseBuffer;
  457. /* Hold the context for allocate all nodes */
  458. struct NDR_ALLOC_ALL_NODES_CONTEXT *pAllocAllNodesContext;
  459. struct NDR_POINTER_QUEUE_STATE *pPointerQueueState;
  460. /*
  461. * Stuff needed while handling complex structures
  462. */
  463. /* Ignore imbeded pointers while computing buffer or memory sizes. */
  464. int IgnoreEmbeddedPointers;
  465. /*
  466. * This marks the location in the buffer where pointees of a complex
  467. * struct reside.
  468. */
  469. unsigned char * PointerBufferMark;
  470. /*
  471. * Used to catch errors in SendReceive.
  472. */
  473. unsigned char CorrDespIncrement;
  474. unsigned char uFlags;
  475. unsigned short UniquePtrCount;
  476. /*
  477. * Used internally by the Ndr routines. Holds the max counts for
  478. * a conformant array.
  479. */
  480. ULONG_PTR MaxCount;
  481. /*
  482. * Used internally by the Ndr routines. Holds the offsets for a varying
  483. * array.
  484. */
  485. unsigned long Offset;
  486. /*
  487. * Used internally by the Ndr routines. Holds the actual counts for
  488. * a varying array.
  489. */
  490. unsigned long ActualCount;
  491. /* Allocation and Free routine to be used by the Ndr routines. */
  492. void * ( __RPC_API * pfnAllocate)( size_t );
  493. void ( __RPC_API * pfnFree)(void *);
  494. /*
  495. * Top of parameter stack. Used for "single call" stubs during marshalling
  496. * to hold the beginning of the parameter list on the stack. Needed to
  497. * extract parameters which hold attribute values for top level arrays and
  498. * pointers.
  499. */
  500. unsigned char * StackTop;
  501. /*
  502. * Fields used for the transmit_as and represent_as objects.
  503. * For represent_as the mapping is: presented=local, transmit=named.
  504. */
  505. unsigned char * pPresentedType;
  506. unsigned char * pTransmitType;
  507. /*
  508. * When we first construct a binding on the client side, stick it
  509. * in the rpcmessage and later call RpcGetBuffer, the handle field
  510. * in the rpcmessage is changed. That's fine except that we need to
  511. * have that original handle for use in unmarshalling context handles
  512. * (the second argument in NDRCContextUnmarshall to be exact). So
  513. * stash the contructed handle here and extract it when needed.
  514. */
  515. handle_t SavedHandle;
  516. /*
  517. * Pointer back to the stub descriptor. Use this to get all handle info.
  518. */
  519. const struct _MIDL_STUB_DESC * StubDesc;
  520. /*
  521. * Full pointer stuff.
  522. */
  523. struct _FULL_PTR_XLAT_TABLES * FullPtrXlatTables;
  524. unsigned long FullPtrRefId;
  525. unsigned long PointerLength;
  526. int fInDontFree :1;
  527. int fDontCallFreeInst :1;
  528. int fInOnlyParam :1;
  529. int fHasReturn :1;
  530. int fHasExtensions :1;
  531. int fHasNewCorrDesc :1;
  532. int fIsIn :1;
  533. int fIsOut :1;
  534. int fIsOicf :1;
  535. int fBufferValid :1;
  536. int fHasMemoryValidateCallback: 1;
  537. int fInFree :1;
  538. int fNeedMCCP :1;
  539. int fUnused :3;
  540. int fUnused2 :16;
  541. unsigned long dwDestContext;
  542. void * pvDestContext;
  543. NDR_SCONTEXT * SavedContextHandles;
  544. long ParamNumber;
  545. struct IRpcChannelBuffer * pRpcChannelBuffer;
  546. PARRAY_INFO pArrayInfo;
  547. unsigned long * SizePtrCountArray;
  548. unsigned long * SizePtrOffsetArray;
  549. unsigned long * SizePtrLengthArray;
  550. /*
  551. * Interpreter argument queue. Used on server side only.
  552. */
  553. void * pArgQueue;
  554. unsigned long dwStubPhase;
  555. void * LowStackMark;
  556. /*
  557. * Async message pointer, correlation data - NT 5.0 features.
  558. */
  559. PNDR_ASYNC_MESSAGE pAsyncMsg;
  560. PNDR_CORRELATION_INFO pCorrInfo;
  561. unsigned char * pCorrMemory;
  562. void * pMemoryList;
  563. /*
  564. * Reserved fields up to this point present since the 3.50 release.
  565. * Reserved fields below were introduced for Windows 2000 release.
  566. * (but not used).
  567. */
  568. /*
  569. * International character support information - NT 5.1 feature.
  570. */
  571. #if (NTDDI_VERSION >= NTDDI_WIN2K )
  572. INT_PTR pCSInfo;
  573. unsigned char * ConformanceMark;
  574. unsigned char * VarianceMark;
  575. #if defined(IA64)
  576. void * BackingStoreLowMark;
  577. #else
  578. INT_PTR Unused;
  579. #endif
  580. struct _NDR_PROC_CONTEXT * pContext;
  581. /*
  582. * Reserved fields up to this point present since Windows 2000 release.
  583. * Fields added for NT5.1
  584. *
  585. * pUserMarshalList is used to keep a linked list of nodes pointing to
  586. * marshalled data to be freed. This list can contain (as the name
  587. * implies) User Marshalled data, but also can contain Interface Pointer
  588. * data.
  589. */
  590. void * ContextHandleHash;
  591. void * pUserMarshalList;
  592. INT_PTR Reserved51_3;
  593. INT_PTR Reserved51_4;
  594. INT_PTR Reserved51_5;
  595. /*
  596. * Reserved fields up to this point present since NT5.1 release.
  597. */
  598. #endif // (NTDDI_VERSION >= NTDDI_WIN2K )
  599. } MIDL_STUB_MESSAGE, *PMIDL_STUB_MESSAGE;
  600. typedef struct _MIDL_STUB_MESSAGE MIDL_STUB_MESSAGE, *PMIDL_STUB_MESSAGE;
  601. /*
  602. * Generic handle bind/unbind routine pair.
  603. */
  604. typedef void *
  605. ( __RPC_API * GENERIC_BINDING_ROUTINE)
  606. (void *);
  607. typedef void
  608. ( __RPC_API * GENERIC_UNBIND_ROUTINE)
  609. (void *, unsigned char *);
  610. typedef struct _GENERIC_BINDING_ROUTINE_PAIR
  611. {
  612. GENERIC_BINDING_ROUTINE pfnBind;
  613. GENERIC_UNBIND_ROUTINE pfnUnbind;
  614. } GENERIC_BINDING_ROUTINE_PAIR, *PGENERIC_BINDING_ROUTINE_PAIR;
  615. typedef struct __GENERIC_BINDING_INFO
  616. {
  617. void * pObj;
  618. unsigned int Size;
  619. GENERIC_BINDING_ROUTINE pfnBind;
  620. GENERIC_UNBIND_ROUTINE pfnUnbind;
  621. } GENERIC_BINDING_INFO, *PGENERIC_BINDING_INFO;
  622. // typedef EXPR_EVAL - see above
  623. // typedefs for xmit_as
  624. #if (defined(_MSC_VER)) && !defined(MIDL_PASS)
  625. // a Microsoft C++ compiler
  626. #define NDR_SHAREABLE __inline
  627. #else
  628. #define NDR_SHAREABLE static
  629. #endif
  630. typedef void ( __RPC_USER * XMIT_HELPER_ROUTINE)
  631. ( PMIDL_STUB_MESSAGE );
  632. typedef struct _XMIT_ROUTINE_QUINTUPLE
  633. {
  634. XMIT_HELPER_ROUTINE pfnTranslateToXmit;
  635. XMIT_HELPER_ROUTINE pfnTranslateFromXmit;
  636. XMIT_HELPER_ROUTINE pfnFreeXmit;
  637. XMIT_HELPER_ROUTINE pfnFreeInst;
  638. } XMIT_ROUTINE_QUINTUPLE, *PXMIT_ROUTINE_QUINTUPLE;
  639. typedef unsigned long
  640. ( __RPC_USER * USER_MARSHAL_SIZING_ROUTINE)
  641. (unsigned long *,
  642. unsigned long,
  643. void * );
  644. typedef unsigned char *
  645. ( __RPC_USER * USER_MARSHAL_MARSHALLING_ROUTINE)
  646. (unsigned long *,
  647. unsigned char * ,
  648. void * );
  649. typedef unsigned char *
  650. ( __RPC_USER * USER_MARSHAL_UNMARSHALLING_ROUTINE)
  651. (unsigned long *,
  652. unsigned char *,
  653. void * );
  654. typedef void ( __RPC_USER * USER_MARSHAL_FREEING_ROUTINE)
  655. (unsigned long *,
  656. void * );
  657. typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
  658. {
  659. USER_MARSHAL_SIZING_ROUTINE pfnBufferSize;
  660. USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall;
  661. USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall;
  662. USER_MARSHAL_FREEING_ROUTINE pfnFree;
  663. } USER_MARSHAL_ROUTINE_QUADRUPLE;
  664. #define USER_MARSHAL_CB_SIGNATURE 'USRC'
  665. typedef enum _USER_MARSHAL_CB_TYPE
  666. {
  667. USER_MARSHAL_CB_BUFFER_SIZE,
  668. USER_MARSHAL_CB_MARSHALL,
  669. USER_MARSHAL_CB_UNMARSHALL,
  670. USER_MARSHAL_CB_FREE
  671. } USER_MARSHAL_CB_TYPE;
  672. typedef struct _USER_MARSHAL_CB
  673. {
  674. unsigned long Flags;
  675. PMIDL_STUB_MESSAGE pStubMsg;
  676. PFORMAT_STRING pReserve;
  677. unsigned long Signature;
  678. USER_MARSHAL_CB_TYPE CBType;
  679. PFORMAT_STRING pFormat;
  680. PFORMAT_STRING pTypeFormat;
  681. } USER_MARSHAL_CB;
  682. #define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
  683. #define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
  684. #define GET_USER_DATA_REP(f) ((f) >> 16)
  685. #define USER_CALL_IS_ASYNC 0x0100 /* aux flag: in an [async] call */
  686. #define USER_CALL_NEW_CORRELATION_DESC 0x0200
  687. typedef struct _MALLOC_FREE_STRUCT
  688. {
  689. void * ( __RPC_USER * pfnAllocate)(size_t);
  690. void ( __RPC_USER * pfnFree)(void *);
  691. } MALLOC_FREE_STRUCT;
  692. typedef struct _COMM_FAULT_OFFSETS
  693. {
  694. short CommOffset;
  695. short FaultOffset;
  696. } COMM_FAULT_OFFSETS;
  697. /*
  698. * International character support definitions
  699. */
  700. typedef enum _IDL_CS_CONVERT
  701. {
  702. IDL_CS_NO_CONVERT,
  703. IDL_CS_IN_PLACE_CONVERT,
  704. IDL_CS_NEW_BUFFER_CONVERT
  705. } IDL_CS_CONVERT;
  706. typedef void
  707. ( __RPC_USER * CS_TYPE_NET_SIZE_ROUTINE)
  708. (RPC_BINDING_HANDLE hBinding,
  709. unsigned long ulNetworkCodeSet,
  710. unsigned long ulLocalBufferSize,
  711. IDL_CS_CONVERT * conversionType,
  712. unsigned long * pulNetworkBufferSize,
  713. error_status_t * pStatus);
  714. typedef void
  715. ( __RPC_USER * CS_TYPE_LOCAL_SIZE_ROUTINE)
  716. (RPC_BINDING_HANDLE hBinding,
  717. unsigned long ulNetworkCodeSet,
  718. unsigned long ulNetworkBufferSize,
  719. IDL_CS_CONVERT * conversionType,
  720. unsigned long * pulLocalBufferSize,
  721. error_status_t * pStatus);
  722. typedef void
  723. ( __RPC_USER * CS_TYPE_TO_NETCS_ROUTINE)
  724. (RPC_BINDING_HANDLE hBinding,
  725. unsigned long ulNetworkCodeSet,
  726. void * pLocalData,
  727. unsigned long ulLocalDataLength,
  728. byte * pNetworkData,
  729. unsigned long * pulNetworkDataLength,
  730. error_status_t * pStatus);
  731. typedef void
  732. ( __RPC_USER * CS_TYPE_FROM_NETCS_ROUTINE)
  733. (RPC_BINDING_HANDLE hBinding,
  734. unsigned long ulNetworkCodeSet,
  735. byte * pNetworkData,
  736. unsigned long ulNetworkDataLength,
  737. unsigned long ulLocalBufferSize,
  738. void * pLocalData,
  739. unsigned long * pulLocalDataLength,
  740. error_status_t * pStatus);
  741. typedef void
  742. ( __RPC_USER * CS_TAG_GETTING_ROUTINE)
  743. (RPC_BINDING_HANDLE hBinding,
  744. int fServerSide,
  745. unsigned long * pulSendingTag,
  746. unsigned long * pulDesiredReceivingTag,
  747. unsigned long * pulReceivingTag,
  748. error_status_t * pStatus);
  749. void __RPC_USER
  750. RpcCsGetTags(
  751. RPC_BINDING_HANDLE hBinding,
  752. int fServerSide,
  753. unsigned long * pulSendingTag,
  754. unsigned long * pulDesiredReceivingTag,
  755. unsigned long * pulReceivingTag,
  756. error_status_t * pStatus);
  757. typedef struct _NDR_CS_SIZE_CONVERT_ROUTINES
  758. {
  759. CS_TYPE_NET_SIZE_ROUTINE pfnNetSize;
  760. CS_TYPE_TO_NETCS_ROUTINE pfnToNetCs;
  761. CS_TYPE_LOCAL_SIZE_ROUTINE pfnLocalSize;
  762. CS_TYPE_FROM_NETCS_ROUTINE pfnFromNetCs;
  763. } NDR_CS_SIZE_CONVERT_ROUTINES;
  764. typedef struct _NDR_CS_ROUTINES
  765. {
  766. NDR_CS_SIZE_CONVERT_ROUTINES *pSizeConvertRoutines;
  767. CS_TAG_GETTING_ROUTINE *pTagGettingRoutines;
  768. } NDR_CS_ROUTINES;
  769. typedef struct _NDR_EXPR_DESC
  770. {
  771. const unsigned short * pOffset;
  772. PFORMAT_STRING pFormatExpr;
  773. } NDR_EXPR_DESC;
  774. /*
  775. * MIDL Stub Descriptor
  776. */
  777. typedef struct _MIDL_STUB_DESC
  778. {
  779. void * RpcInterfaceInformation;
  780. void * ( __RPC_API * pfnAllocate)(size_t);
  781. void ( __RPC_API * pfnFree)(void *);
  782. union
  783. {
  784. handle_t * pAutoHandle;
  785. handle_t * pPrimitiveHandle;
  786. PGENERIC_BINDING_INFO pGenericBindingInfo;
  787. } IMPLICIT_HANDLE_INFO;
  788. const NDR_RUNDOWN * apfnNdrRundownRoutines;
  789. const GENERIC_BINDING_ROUTINE_PAIR * aGenericBindingRoutinePairs;
  790. const EXPR_EVAL * apfnExprEval;
  791. const XMIT_ROUTINE_QUINTUPLE * aXmitQuintuple;
  792. const unsigned char * pFormatTypes;
  793. int fCheckBounds;
  794. /* Ndr library version. */
  795. unsigned long Version;
  796. MALLOC_FREE_STRUCT * pMallocFreeStruct;
  797. long MIDLVersion;
  798. const COMM_FAULT_OFFSETS * CommFaultOffsets;
  799. // New fields for version 3.0+
  800. const USER_MARSHAL_ROUTINE_QUADRUPLE * aUserMarshalQuadruple;
  801. // Notify routines - added for NT5, MIDL 5.0
  802. const NDR_NOTIFY_ROUTINE * NotifyRoutineTable;
  803. /*
  804. * Reserved for future use.
  805. */
  806. ULONG_PTR mFlags;
  807. // International support routines - added for 64bit post NT5
  808. const NDR_CS_ROUTINES * CsRoutineTables;
  809. void * ProxyServerInfo;
  810. const NDR_EXPR_DESC * pExprInfo;
  811. // Fields up to now present in win2000 release.
  812. } MIDL_STUB_DESC;
  813. typedef const MIDL_STUB_DESC * PMIDL_STUB_DESC;
  814. typedef void * PMIDL_XMIT_TYPE;
  815. /*
  816. * MIDL Stub Format String. This is a const in the stub.
  817. */
  818. #if defined(_MSC_EXTENSIONS)
  819. #if !defined( RC_INVOKED )
  820. #if _MSC_VER >= 1200
  821. #pragma warning(push)
  822. #endif
  823. #pragma warning( disable:4200 )
  824. #endif
  825. typedef struct _MIDL_FORMAT_STRING
  826. {
  827. short Pad;
  828. unsigned char Format[];
  829. } MIDL_FORMAT_STRING;
  830. #if !defined( RC_INVOKED )
  831. #if _MSC_VER >= 1200
  832. #pragma warning(pop)
  833. #else
  834. #pragma warning( default:4200 )
  835. #endif
  836. #endif
  837. #endif /* _MSC_EXTENSIONS */
  838. /*
  839. * Stub thunk used for some interpreted server stubs.
  840. */
  841. typedef void ( __RPC_API * STUB_THUNK)( PMIDL_STUB_MESSAGE );
  842. #ifndef _MANAGED
  843. typedef long ( __RPC_API * SERVER_ROUTINE)();
  844. #else
  845. typedef long ( __RPC_API * SERVER_ROUTINE)(void);
  846. #endif
  847. /*
  848. * Server Interpreter's information strucuture.
  849. */
  850. typedef struct _MIDL_SERVER_INFO_
  851. {
  852. PMIDL_STUB_DESC pStubDesc;
  853. const SERVER_ROUTINE * DispatchTable;
  854. PFORMAT_STRING ProcString;
  855. const unsigned short * FmtStringOffset;
  856. const STUB_THUNK * ThunkTable;
  857. PRPC_SYNTAX_IDENTIFIER pTransferSyntax;
  858. ULONG_PTR nCount;
  859. PMIDL_SYNTAX_INFO pSyntaxInfo;
  860. } MIDL_SERVER_INFO, *PMIDL_SERVER_INFO;
  861. #undef _MIDL_STUBLESS_PROXY_INFO
  862. /*
  863. * Stubless object proxy information structure.
  864. */
  865. typedef struct _MIDL_STUBLESS_PROXY_INFO
  866. {
  867. PMIDL_STUB_DESC pStubDesc;
  868. PFORMAT_STRING ProcFormatString;
  869. const unsigned short * FormatStringOffset;
  870. PRPC_SYNTAX_IDENTIFIER pTransferSyntax;
  871. ULONG_PTR nCount;
  872. PMIDL_SYNTAX_INFO pSyntaxInfo;
  873. } MIDL_STUBLESS_PROXY_INFO;
  874. typedef MIDL_STUBLESS_PROXY_INFO * PMIDL_STUBLESS_PROXY_INFO;
  875. /*
  876. * Multiple transfer syntax information.
  877. */
  878. typedef struct _MIDL_SYNTAX_INFO
  879. {
  880. RPC_SYNTAX_IDENTIFIER TransferSyntax;
  881. RPC_DISPATCH_TABLE * DispatchTable;
  882. PFORMAT_STRING ProcString;
  883. const unsigned short * FmtStringOffset;
  884. PFORMAT_STRING TypeString;
  885. const void * aUserMarshalQuadruple;
  886. ULONG_PTR pReserved1;
  887. ULONG_PTR pReserved2;
  888. } MIDL_SYNTAX_INFO, *PMIDL_SYNTAX_INFO;
  889. typedef unsigned short * PARAM_OFFSETTABLE, *PPARAM_OFFSETTABLE;
  890. /*
  891. * This is the return value from NdrClientCall.
  892. */
  893. typedef union _CLIENT_CALL_RETURN
  894. {
  895. void * Pointer;
  896. LONG_PTR Simple;
  897. } CLIENT_CALL_RETURN;
  898. // BUGBUG: can we get rid of this defintion altogether, just leave void * here?
  899. typedef enum
  900. {
  901. XLAT_SERVER = 1,
  902. XLAT_CLIENT
  903. } XLAT_SIDE;
  904. typedef struct _FULL_PTR_XLAT_TABLES
  905. {
  906. void * RefIdToPointer;
  907. void * PointerToRefId;
  908. unsigned long NextRefId;
  909. XLAT_SIDE XlatSide;
  910. } FULL_PTR_XLAT_TABLES, *PFULL_PTR_XLAT_TABLES;
  911. /***************************************************************************
  912. ** New MIDL 2.0 Ndr routine templates
  913. ***************************************************************************/
  914. RPC_STATUS RPC_ENTRY
  915. NdrClientGetSupportedSyntaxes(
  916. __in RPC_CLIENT_INTERFACE * pInf,
  917. __out unsigned long * pCount,
  918. __out MIDL_SYNTAX_INFO ** pArr );
  919. RPC_STATUS RPC_ENTRY
  920. NdrServerGetSupportedSyntaxes(
  921. __in RPC_SERVER_INTERFACE * pInf,
  922. __out unsigned long * pCount,
  923. __out MIDL_SYNTAX_INFO ** pArr,
  924. __out unsigned long * pPreferSyntaxIndex);
  925. /*
  926. * Marshall routines
  927. */
  928. RPCRTAPI
  929. void
  930. RPC_ENTRY
  931. NdrSimpleTypeMarshall(
  932. PMIDL_STUB_MESSAGE pStubMsg,
  933. unsigned char * pMemory,
  934. unsigned char FormatChar
  935. );
  936. RPCRTAPI
  937. unsigned char *
  938. RPC_ENTRY
  939. NdrPointerMarshall(
  940. PMIDL_STUB_MESSAGE pStubMsg,
  941. unsigned char * pMemory,
  942. PFORMAT_STRING pFormat
  943. );
  944. RPCRTAPI
  945. unsigned char *
  946. RPC_ENTRY
  947. NdrCsArrayMarshall(
  948. PMIDL_STUB_MESSAGE pStubMsg,
  949. unsigned char * pMemory,
  950. PFORMAT_STRING pFormat
  951. );
  952. RPCRTAPI
  953. unsigned char *
  954. RPC_ENTRY
  955. NdrCsTagMarshall(
  956. PMIDL_STUB_MESSAGE pStubMsg,
  957. unsigned char * pMemory,
  958. PFORMAT_STRING pFormat
  959. );
  960. /* Structures */
  961. RPCRTAPI
  962. unsigned char *
  963. RPC_ENTRY
  964. NdrSimpleStructMarshall(
  965. PMIDL_STUB_MESSAGE pStubMsg,
  966. unsigned char * pMemory,
  967. PFORMAT_STRING pFormat
  968. );
  969. RPCRTAPI
  970. unsigned char *
  971. RPC_ENTRY
  972. NdrConformantStructMarshall(
  973. PMIDL_STUB_MESSAGE pStubMsg,
  974. unsigned char * pMemory,
  975. PFORMAT_STRING pFormat
  976. );
  977. RPCRTAPI
  978. unsigned char *
  979. RPC_ENTRY
  980. NdrConformantVaryingStructMarshall(
  981. PMIDL_STUB_MESSAGE pStubMsg,
  982. unsigned char * pMemory,
  983. PFORMAT_STRING pFormat
  984. );
  985. RPCRTAPI
  986. unsigned char *
  987. RPC_ENTRY
  988. NdrComplexStructMarshall(
  989. PMIDL_STUB_MESSAGE pStubMsg,
  990. unsigned char * pMemory,
  991. PFORMAT_STRING pFormat
  992. );
  993. /* Arrays */
  994. RPCRTAPI
  995. unsigned char *
  996. RPC_ENTRY
  997. NdrFixedArrayMarshall(
  998. PMIDL_STUB_MESSAGE pStubMsg,
  999. unsigned char * pMemory,
  1000. PFORMAT_STRING pFormat
  1001. );
  1002. RPCRTAPI
  1003. unsigned char *
  1004. RPC_ENTRY
  1005. NdrConformantArrayMarshall(
  1006. PMIDL_STUB_MESSAGE pStubMsg,
  1007. unsigned char * pMemory,
  1008. PFORMAT_STRING pFormat
  1009. );
  1010. RPCRTAPI
  1011. unsigned char *
  1012. RPC_ENTRY
  1013. NdrConformantVaryingArrayMarshall(
  1014. PMIDL_STUB_MESSAGE pStubMsg,
  1015. unsigned char * pMemory,
  1016. PFORMAT_STRING pFormat
  1017. );
  1018. RPCRTAPI
  1019. unsigned char *
  1020. RPC_ENTRY
  1021. NdrVaryingArrayMarshall(
  1022. PMIDL_STUB_MESSAGE pStubMsg,
  1023. unsigned char * pMemory,
  1024. PFORMAT_STRING pFormat
  1025. );
  1026. RPCRTAPI
  1027. unsigned char *
  1028. RPC_ENTRY
  1029. NdrComplexArrayMarshall(
  1030. PMIDL_STUB_MESSAGE pStubMsg,
  1031. unsigned char * pMemory,
  1032. PFORMAT_STRING pFormat
  1033. );
  1034. /* Strings */
  1035. RPCRTAPI
  1036. unsigned char *
  1037. RPC_ENTRY
  1038. NdrNonConformantStringMarshall(
  1039. PMIDL_STUB_MESSAGE pStubMsg,
  1040. unsigned char * pMemory,
  1041. PFORMAT_STRING pFormat
  1042. );
  1043. RPCRTAPI
  1044. unsigned char *
  1045. RPC_ENTRY
  1046. NdrConformantStringMarshall(
  1047. PMIDL_STUB_MESSAGE pStubMsg,
  1048. unsigned char * pMemory,
  1049. PFORMAT_STRING pFormat
  1050. );
  1051. /* Unions */
  1052. RPCRTAPI
  1053. unsigned char *
  1054. RPC_ENTRY
  1055. NdrEncapsulatedUnionMarshall(
  1056. PMIDL_STUB_MESSAGE pStubMsg,
  1057. unsigned char * pMemory,
  1058. PFORMAT_STRING pFormat
  1059. );
  1060. RPCRTAPI
  1061. unsigned char *
  1062. RPC_ENTRY
  1063. NdrNonEncapsulatedUnionMarshall(
  1064. PMIDL_STUB_MESSAGE pStubMsg,
  1065. unsigned char * pMemory,
  1066. PFORMAT_STRING pFormat
  1067. );
  1068. /* Byte count pointer */
  1069. RPCRTAPI
  1070. unsigned char *
  1071. RPC_ENTRY
  1072. NdrByteCountPointerMarshall(
  1073. PMIDL_STUB_MESSAGE pStubMsg,
  1074. unsigned char * pMemory,
  1075. PFORMAT_STRING pFormat
  1076. );
  1077. /* Transmit as and represent as*/
  1078. RPCRTAPI
  1079. unsigned char *
  1080. RPC_ENTRY
  1081. NdrXmitOrRepAsMarshall(
  1082. PMIDL_STUB_MESSAGE pStubMsg,
  1083. unsigned char * pMemory,
  1084. PFORMAT_STRING pFormat
  1085. );
  1086. /* User_marshal */
  1087. RPCRTAPI
  1088. unsigned char *
  1089. RPC_ENTRY
  1090. NdrUserMarshalMarshall(
  1091. PMIDL_STUB_MESSAGE pStubMsg,
  1092. unsigned char * pMemory,
  1093. PFORMAT_STRING pFormat
  1094. );
  1095. /* Interface pointer */
  1096. RPCRTAPI
  1097. unsigned char *
  1098. RPC_ENTRY
  1099. NdrInterfacePointerMarshall(
  1100. PMIDL_STUB_MESSAGE pStubMsg,
  1101. unsigned char * pMemory,
  1102. PFORMAT_STRING pFormat
  1103. );
  1104. /* Context handles */
  1105. RPCRTAPI
  1106. void
  1107. RPC_ENTRY
  1108. NdrClientContextMarshall(
  1109. PMIDL_STUB_MESSAGE pStubMsg,
  1110. NDR_CCONTEXT ContextHandle,
  1111. int fCheck
  1112. );
  1113. RPCRTAPI
  1114. void
  1115. RPC_ENTRY
  1116. NdrServerContextMarshall(
  1117. PMIDL_STUB_MESSAGE pStubMsg,
  1118. NDR_SCONTEXT ContextHandle,
  1119. NDR_RUNDOWN RundownRoutine
  1120. );
  1121. RPCRTAPI
  1122. void
  1123. RPC_ENTRY
  1124. NdrServerContextNewMarshall(
  1125. PMIDL_STUB_MESSAGE pStubMsg,
  1126. NDR_SCONTEXT ContextHandle,
  1127. NDR_RUNDOWN RundownRoutine,
  1128. PFORMAT_STRING pFormat
  1129. );
  1130. /*
  1131. * Unmarshall routines
  1132. */
  1133. RPCRTAPI
  1134. void
  1135. RPC_ENTRY
  1136. NdrSimpleTypeUnmarshall(
  1137. PMIDL_STUB_MESSAGE pStubMsg,
  1138. unsigned char * pMemory,
  1139. unsigned char FormatChar
  1140. );
  1141. RPCRTAPI
  1142. unsigned char * RPC_ENTRY
  1143. RPC_ENTRY
  1144. NdrCsArrayUnmarshall(
  1145. PMIDL_STUB_MESSAGE pStubMsg,
  1146. unsigned char ** ppMemory,
  1147. PFORMAT_STRING pFormat,
  1148. unsigned char fMustAlloc
  1149. );
  1150. RPCRTAPI
  1151. unsigned char * RPC_ENTRY
  1152. RPC_ENTRY
  1153. NdrCsTagUnmarshall(
  1154. PMIDL_STUB_MESSAGE pStubMsg,
  1155. unsigned char ** ppMemory,
  1156. PFORMAT_STRING pFormat,
  1157. unsigned char fMustAlloc
  1158. );
  1159. RPCRTAPI
  1160. unsigned char * RPC_ENTRY
  1161. NdrRangeUnmarshall(
  1162. PMIDL_STUB_MESSAGE pStubMsg,
  1163. unsigned char ** ppMemory,
  1164. PFORMAT_STRING pFormat,
  1165. unsigned char fMustAlloc
  1166. );
  1167. RPCRTAPI
  1168. void
  1169. RPC_ENTRY
  1170. NdrCorrelationInitialize(
  1171. PMIDL_STUB_MESSAGE pStubMsg,
  1172. void * pMemory,
  1173. unsigned long CacheSize,
  1174. unsigned long flags
  1175. );
  1176. RPCRTAPI
  1177. void
  1178. RPC_ENTRY
  1179. NdrCorrelationPass(
  1180. PMIDL_STUB_MESSAGE pStubMsg
  1181. );
  1182. RPCRTAPI
  1183. void
  1184. RPC_ENTRY
  1185. NdrCorrelationFree(
  1186. PMIDL_STUB_MESSAGE pStubMsg
  1187. );
  1188. RPCRTAPI
  1189. unsigned char *
  1190. RPC_ENTRY
  1191. NdrPointerUnmarshall(
  1192. PMIDL_STUB_MESSAGE pStubMsg,
  1193. unsigned char * * ppMemory,
  1194. PFORMAT_STRING pFormat,
  1195. unsigned char fMustAlloc
  1196. );
  1197. /* Structures */
  1198. RPCRTAPI
  1199. unsigned char *
  1200. RPC_ENTRY
  1201. NdrSimpleStructUnmarshall(
  1202. PMIDL_STUB_MESSAGE pStubMsg,
  1203. unsigned char * * ppMemory,
  1204. PFORMAT_STRING pFormat,
  1205. unsigned char fMustAlloc
  1206. );
  1207. RPCRTAPI
  1208. unsigned char *
  1209. RPC_ENTRY
  1210. NdrConformantStructUnmarshall(
  1211. PMIDL_STUB_MESSAGE pStubMsg,
  1212. unsigned char * * ppMemory,
  1213. PFORMAT_STRING pFormat,
  1214. unsigned char fMustAlloc
  1215. );
  1216. RPCRTAPI
  1217. unsigned char *
  1218. RPC_ENTRY
  1219. NdrConformantVaryingStructUnmarshall(
  1220. PMIDL_STUB_MESSAGE pStubMsg,
  1221. unsigned char * * ppMemory,
  1222. PFORMAT_STRING pFormat,
  1223. unsigned char fMustAlloc
  1224. );
  1225. RPCRTAPI
  1226. unsigned char *
  1227. RPC_ENTRY
  1228. NdrComplexStructUnmarshall(
  1229. PMIDL_STUB_MESSAGE pStubMsg,
  1230. unsigned char * * ppMemory,
  1231. PFORMAT_STRING pFormat,
  1232. unsigned char fMustAlloc
  1233. );
  1234. /* Arrays */
  1235. RPCRTAPI
  1236. unsigned char *
  1237. RPC_ENTRY
  1238. NdrFixedArrayUnmarshall(
  1239. PMIDL_STUB_MESSAGE pStubMsg,
  1240. unsigned char * * ppMemory,
  1241. PFORMAT_STRING pFormat,
  1242. unsigned char fMustAlloc
  1243. );
  1244. RPCRTAPI
  1245. unsigned char *
  1246. RPC_ENTRY
  1247. NdrConformantArrayUnmarshall(
  1248. PMIDL_STUB_MESSAGE pStubMsg,
  1249. unsigned char * * ppMemory,
  1250. PFORMAT_STRING pFormat,
  1251. unsigned char fMustAlloc
  1252. );
  1253. RPCRTAPI
  1254. unsigned char *
  1255. RPC_ENTRY
  1256. NdrConformantVaryingArrayUnmarshall(
  1257. PMIDL_STUB_MESSAGE pStubMsg,
  1258. unsigned char * * ppMemory,
  1259. PFORMAT_STRING pFormat,
  1260. unsigned char fMustAlloc
  1261. );
  1262. RPCRTAPI
  1263. unsigned char *
  1264. RPC_ENTRY
  1265. NdrVaryingArrayUnmarshall(
  1266. PMIDL_STUB_MESSAGE pStubMsg,
  1267. unsigned char * * ppMemory,
  1268. PFORMAT_STRING pFormat,
  1269. unsigned char fMustAlloc
  1270. );
  1271. RPCRTAPI
  1272. unsigned char *
  1273. RPC_ENTRY
  1274. NdrComplexArrayUnmarshall(
  1275. PMIDL_STUB_MESSAGE pStubMsg,
  1276. unsigned char * * ppMemory,
  1277. PFORMAT_STRING pFormat,
  1278. unsigned char fMustAlloc
  1279. );
  1280. /* Strings */
  1281. RPCRTAPI
  1282. unsigned char *
  1283. RPC_ENTRY
  1284. NdrNonConformantStringUnmarshall(
  1285. PMIDL_STUB_MESSAGE pStubMsg,
  1286. unsigned char * * ppMemory,
  1287. PFORMAT_STRING pFormat,
  1288. unsigned char fMustAlloc
  1289. );
  1290. RPCRTAPI
  1291. unsigned char *
  1292. RPC_ENTRY
  1293. NdrConformantStringUnmarshall(
  1294. PMIDL_STUB_MESSAGE pStubMsg,
  1295. unsigned char * * ppMemory,
  1296. PFORMAT_STRING pFormat,
  1297. unsigned char fMustAlloc
  1298. );
  1299. /* Unions */
  1300. RPCRTAPI
  1301. unsigned char *
  1302. RPC_ENTRY
  1303. NdrEncapsulatedUnionUnmarshall(
  1304. PMIDL_STUB_MESSAGE pStubMsg,
  1305. unsigned char * * ppMemory,
  1306. PFORMAT_STRING pFormat,
  1307. unsigned char fMustAlloc
  1308. );
  1309. RPCRTAPI
  1310. unsigned char *
  1311. RPC_ENTRY
  1312. NdrNonEncapsulatedUnionUnmarshall(
  1313. PMIDL_STUB_MESSAGE pStubMsg,
  1314. unsigned char * * ppMemory,
  1315. PFORMAT_STRING pFormat,
  1316. unsigned char fMustAlloc
  1317. );
  1318. /* Byte count pointer */
  1319. RPCRTAPI
  1320. unsigned char *
  1321. RPC_ENTRY
  1322. NdrByteCountPointerUnmarshall(
  1323. PMIDL_STUB_MESSAGE pStubMsg,
  1324. unsigned char * * ppMemory,
  1325. PFORMAT_STRING pFormat,
  1326. unsigned char fMustAlloc
  1327. );
  1328. /* Transmit as and represent as*/
  1329. RPCRTAPI
  1330. unsigned char *
  1331. RPC_ENTRY
  1332. NdrXmitOrRepAsUnmarshall(
  1333. PMIDL_STUB_MESSAGE pStubMsg,
  1334. unsigned char * * ppMemory,
  1335. PFORMAT_STRING pFormat,
  1336. unsigned char fMustAlloc
  1337. );
  1338. /* User_marshal */
  1339. RPCRTAPI
  1340. unsigned char *
  1341. RPC_ENTRY
  1342. NdrUserMarshalUnmarshall(
  1343. PMIDL_STUB_MESSAGE pStubMsg,
  1344. unsigned char * * ppMemory,
  1345. PFORMAT_STRING pFormat,
  1346. unsigned char fMustAlloc
  1347. );
  1348. /* Interface pointer */
  1349. RPCRTAPI
  1350. unsigned char *
  1351. RPC_ENTRY
  1352. NdrInterfacePointerUnmarshall(
  1353. PMIDL_STUB_MESSAGE pStubMsg,
  1354. unsigned char * * ppMemory,
  1355. PFORMAT_STRING pFormat,
  1356. unsigned char fMustAlloc
  1357. );
  1358. /* Context handles */
  1359. RPCRTAPI
  1360. void
  1361. RPC_ENTRY
  1362. NdrClientContextUnmarshall(
  1363. PMIDL_STUB_MESSAGE pStubMsg,
  1364. NDR_CCONTEXT * pContextHandle,
  1365. RPC_BINDING_HANDLE BindHandle
  1366. );
  1367. RPCRTAPI
  1368. NDR_SCONTEXT
  1369. RPC_ENTRY
  1370. NdrServerContextUnmarshall(
  1371. PMIDL_STUB_MESSAGE pStubMsg
  1372. );
  1373. /* New context handle flavors */
  1374. RPCRTAPI
  1375. NDR_SCONTEXT
  1376. RPC_ENTRY
  1377. NdrContextHandleInitialize(
  1378. __in PMIDL_STUB_MESSAGE pStubMsg,
  1379. __in PFORMAT_STRING pFormat
  1380. );
  1381. RPCRTAPI
  1382. NDR_SCONTEXT
  1383. RPC_ENTRY
  1384. NdrServerContextNewUnmarshall(
  1385. __in PMIDL_STUB_MESSAGE pStubMsg,
  1386. __in PFORMAT_STRING pFormat
  1387. );
  1388. /*
  1389. * Buffer sizing routines
  1390. */
  1391. RPCRTAPI
  1392. void
  1393. RPC_ENTRY
  1394. NdrPointerBufferSize(
  1395. PMIDL_STUB_MESSAGE pStubMsg,
  1396. unsigned char * pMemory,
  1397. PFORMAT_STRING pFormat
  1398. );
  1399. RPCRTAPI
  1400. void
  1401. RPC_ENTRY
  1402. NdrCsArrayBufferSize(
  1403. PMIDL_STUB_MESSAGE pStubMsg,
  1404. unsigned char * pMemory,
  1405. PFORMAT_STRING pFormat
  1406. );
  1407. RPCRTAPI
  1408. void
  1409. RPC_ENTRY
  1410. NdrCsTagBufferSize(
  1411. PMIDL_STUB_MESSAGE pStubMsg,
  1412. unsigned char * pMemory,
  1413. PFORMAT_STRING pFormat
  1414. );
  1415. /* Structures */
  1416. RPCRTAPI
  1417. void
  1418. RPC_ENTRY
  1419. NdrSimpleStructBufferSize(
  1420. PMIDL_STUB_MESSAGE pStubMsg,
  1421. unsigned char * pMemory,
  1422. PFORMAT_STRING pFormat
  1423. );
  1424. RPCRTAPI
  1425. void
  1426. RPC_ENTRY
  1427. NdrConformantStructBufferSize(
  1428. PMIDL_STUB_MESSAGE pStubMsg,
  1429. unsigned char * pMemory,
  1430. PFORMAT_STRING pFormat
  1431. );
  1432. RPCRTAPI
  1433. void
  1434. RPC_ENTRY
  1435. NdrConformantVaryingStructBufferSize(
  1436. PMIDL_STUB_MESSAGE pStubMsg,
  1437. unsigned char * pMemory,
  1438. PFORMAT_STRING pFormat
  1439. );
  1440. RPCRTAPI
  1441. void
  1442. RPC_ENTRY
  1443. NdrComplexStructBufferSize(
  1444. PMIDL_STUB_MESSAGE pStubMsg,
  1445. unsigned char * pMemory,
  1446. PFORMAT_STRING pFormat
  1447. );
  1448. /* Arrays */
  1449. RPCRTAPI
  1450. void
  1451. RPC_ENTRY
  1452. NdrFixedArrayBufferSize(
  1453. PMIDL_STUB_MESSAGE pStubMsg,
  1454. unsigned char * pMemory,
  1455. PFORMAT_STRING pFormat
  1456. );
  1457. RPCRTAPI
  1458. void
  1459. RPC_ENTRY
  1460. NdrConformantArrayBufferSize(
  1461. PMIDL_STUB_MESSAGE pStubMsg,
  1462. unsigned char * pMemory,
  1463. PFORMAT_STRING pFormat
  1464. );
  1465. RPCRTAPI
  1466. void
  1467. RPC_ENTRY
  1468. NdrConformantVaryingArrayBufferSize(
  1469. PMIDL_STUB_MESSAGE pStubMsg,
  1470. unsigned char * pMemory,
  1471. PFORMAT_STRING pFormat
  1472. );
  1473. RPCRTAPI
  1474. void
  1475. RPC_ENTRY
  1476. NdrVaryingArrayBufferSize(
  1477. PMIDL_STUB_MESSAGE pStubMsg,
  1478. unsigned char * pMemory,
  1479. PFORMAT_STRING pFormat
  1480. );
  1481. RPCRTAPI
  1482. void
  1483. RPC_ENTRY
  1484. NdrComplexArrayBufferSize(
  1485. PMIDL_STUB_MESSAGE pStubMsg,
  1486. unsigned char * pMemory,
  1487. PFORMAT_STRING pFormat
  1488. );
  1489. /* Strings */
  1490. RPCRTAPI
  1491. void
  1492. RPC_ENTRY
  1493. NdrConformantStringBufferSize(
  1494. PMIDL_STUB_MESSAGE pStubMsg,
  1495. unsigned char * pMemory,
  1496. PFORMAT_STRING pFormat
  1497. );
  1498. RPCRTAPI
  1499. void
  1500. RPC_ENTRY
  1501. NdrNonConformantStringBufferSize(
  1502. PMIDL_STUB_MESSAGE pStubMsg,
  1503. unsigned char * pMemory,
  1504. PFORMAT_STRING pFormat
  1505. );
  1506. /* Unions */
  1507. RPCRTAPI
  1508. void
  1509. RPC_ENTRY
  1510. NdrEncapsulatedUnionBufferSize(
  1511. PMIDL_STUB_MESSAGE pStubMsg,
  1512. unsigned char * pMemory,
  1513. PFORMAT_STRING pFormat
  1514. );
  1515. RPCRTAPI
  1516. void
  1517. RPC_ENTRY
  1518. NdrNonEncapsulatedUnionBufferSize(
  1519. PMIDL_STUB_MESSAGE pStubMsg,
  1520. unsigned char * pMemory,
  1521. PFORMAT_STRING pFormat
  1522. );
  1523. /* Byte count pointer */
  1524. RPCRTAPI
  1525. void
  1526. RPC_ENTRY
  1527. NdrByteCountPointerBufferSize(
  1528. PMIDL_STUB_MESSAGE pStubMsg,
  1529. unsigned char * pMemory,
  1530. PFORMAT_STRING pFormat
  1531. );
  1532. /* Transmit as and represent as*/
  1533. RPCRTAPI
  1534. void
  1535. RPC_ENTRY
  1536. NdrXmitOrRepAsBufferSize(
  1537. PMIDL_STUB_MESSAGE pStubMsg,
  1538. unsigned char * pMemory,
  1539. PFORMAT_STRING pFormat
  1540. );
  1541. /* User_marshal */
  1542. RPCRTAPI
  1543. void
  1544. RPC_ENTRY
  1545. NdrUserMarshalBufferSize(
  1546. PMIDL_STUB_MESSAGE pStubMsg,
  1547. unsigned char * pMemory,
  1548. PFORMAT_STRING pFormat
  1549. );
  1550. /* Interface pointer */
  1551. RPCRTAPI
  1552. void
  1553. RPC_ENTRY
  1554. NdrInterfacePointerBufferSize(
  1555. PMIDL_STUB_MESSAGE pStubMsg,
  1556. unsigned char * pMemory,
  1557. PFORMAT_STRING pFormat
  1558. );
  1559. // Context Handle size
  1560. //
  1561. RPCRTAPI
  1562. void
  1563. RPC_ENTRY
  1564. NdrContextHandleSize(
  1565. PMIDL_STUB_MESSAGE pStubMsg,
  1566. unsigned char * pMemory,
  1567. PFORMAT_STRING pFormat
  1568. );
  1569. /*
  1570. * Memory sizing routines
  1571. */
  1572. RPCRTAPI
  1573. unsigned long
  1574. RPC_ENTRY
  1575. NdrPointerMemorySize(
  1576. PMIDL_STUB_MESSAGE pStubMsg,
  1577. PFORMAT_STRING pFormat
  1578. );
  1579. RPCRTAPI
  1580. unsigned long
  1581. RPC_ENTRY
  1582. NdrContextHandleMemorySize(
  1583. PMIDL_STUB_MESSAGE pStubMsg,
  1584. PFORMAT_STRING pFormat
  1585. );
  1586. /* cs_char things */
  1587. RPCRTAPI
  1588. unsigned long
  1589. RPC_ENTRY
  1590. NdrCsArrayMemorySize(
  1591. PMIDL_STUB_MESSAGE pStubMsg,
  1592. PFORMAT_STRING pFormat
  1593. );
  1594. RPCRTAPI
  1595. unsigned long
  1596. RPC_ENTRY
  1597. NdrCsTagMemorySize(
  1598. PMIDL_STUB_MESSAGE pStubMsg,
  1599. PFORMAT_STRING pFormat
  1600. );
  1601. /* Structures */
  1602. RPCRTAPI
  1603. unsigned long
  1604. RPC_ENTRY
  1605. NdrSimpleStructMemorySize(
  1606. PMIDL_STUB_MESSAGE pStubMsg,
  1607. PFORMAT_STRING pFormat
  1608. );
  1609. RPCRTAPI
  1610. unsigned long
  1611. RPC_ENTRY
  1612. NdrConformantStructMemorySize(
  1613. PMIDL_STUB_MESSAGE pStubMsg,
  1614. PFORMAT_STRING pFormat
  1615. );
  1616. RPCRTAPI
  1617. unsigned long
  1618. RPC_ENT

Large files files are truncated, but you can click here to view the full file