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.

672 lines
19 KiB

  1. /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2. Copyright <c> 1993-2000 Microsoft Corporation
  3. Module Name :
  4. ndrp.h
  5. Abtract :
  6. Contains private definitions for Ndr64 files in this directory. This
  7. file is included by all source files in this directory.
  8. Author :
  9. David Kays dkays October 1993
  10. Revision History :
  11. --------------------------------------------------------------------*/
  12. #ifndef _NDRP_
  13. #define _NDRP_
  14. #include <sysinc.h>
  15. #include "rpc.h"
  16. #include "rpcndr.h"
  17. // Get new token definitions for 64b.
  18. #define RPC_NDR_64
  19. #include "ndrtypes.h"
  20. #include "ndr64types.h"
  21. #include "..\ndr20\ndrpall.h"
  22. // Jump table defines
  23. //
  24. // Marshal jump tables
  25. //
  26. typedef void (* PNDR64_MARSHALL_ROUTINE)(
  27. PMIDL_STUB_MESSAGE,
  28. uchar *,
  29. PNDR64_FORMAT
  30. );
  31. extern PNDR64_MARSHALL_ROUTINE const Ndr64MarshallRoutinesTable[];
  32. extern PNDR64_MARSHALL_ROUTINE const Ndr64EmbeddedMarshallRoutinesTable[];
  33. inline void
  34. Ndr64TopLevelTypeMarshall(
  35. PMIDL_STUB_MESSAGE pStubMsg,
  36. uchar * pMemory,
  37. PNDR64_FORMAT pFormat )
  38. {
  39. (*Ndr64MarshallRoutinesTable[*(PFORMAT_STRING)pFormat] )
  40. ( pStubMsg,
  41. pMemory,
  42. pFormat );
  43. }
  44. inline void
  45. Ndr64EmbeddedTypeMarshall(
  46. PMIDL_STUB_MESSAGE pStubMsg,
  47. uchar * pMemory,
  48. PNDR64_FORMAT pFormat )
  49. {
  50. (*Ndr64EmbeddedMarshallRoutinesTable[*(PFORMAT_STRING)pFormat] )
  51. ( pStubMsg,
  52. pMemory,
  53. pFormat );
  54. }
  55. //
  56. // Buffer size jump tables
  57. //
  58. typedef void (* PNDR64_SIZE_ROUTINE)(
  59. PMIDL_STUB_MESSAGE pStubMsg,
  60. uchar * pMemory,
  61. PNDR64_FORMAT pFormat
  62. );
  63. extern PNDR64_SIZE_ROUTINE const Ndr64SizeRoutinesTable[];
  64. extern PNDR64_SIZE_ROUTINE const Ndr64EmbeddedSizeRoutinesTable[];
  65. inline void
  66. Ndr64TopLevelTypeSize(
  67. PMIDL_STUB_MESSAGE pStubMsg,
  68. uchar * pMemory,
  69. PNDR64_FORMAT pFormat )
  70. {
  71. (*Ndr64SizeRoutinesTable[*(PFORMAT_STRING)pFormat])( pStubMsg,
  72. pMemory,
  73. pFormat );
  74. }
  75. inline void
  76. Ndr64EmbeddedTypeSize(
  77. PMIDL_STUB_MESSAGE pStubMsg,
  78. uchar * pMemory,
  79. PNDR64_FORMAT pFormat )
  80. {
  81. (*Ndr64EmbeddedSizeRoutinesTable[*(PFORMAT_STRING)pFormat])( pStubMsg,
  82. pMemory,
  83. pFormat );
  84. }
  85. void
  86. Ndr64ComplexStructBufferSize(
  87. PMIDL_STUB_MESSAGE pStubMsg,
  88. uchar * pMemory,
  89. PNDR64_FORMAT pFormat );
  90. void
  91. Ndr64ComplexArrayBufferSize(
  92. PMIDL_STUB_MESSAGE pStubMsg,
  93. uchar * pMemory,
  94. PNDR64_FORMAT pFormat );
  95. //
  96. // Memsize jump tables
  97. //
  98. typedef void (* PNDR64_MEM_SIZE_ROUTINE)(
  99. PMIDL_STUB_MESSAGE pStubMsg,
  100. PNDR64_FORMAT pFormat
  101. );
  102. extern PNDR64_MEM_SIZE_ROUTINE const Ndr64MemSizeRoutinesTable[];
  103. extern PNDR64_MEM_SIZE_ROUTINE const Ndr64EmbeddedMemSizeRoutinesTable[];
  104. inline void
  105. Ndr64TopLevelTypeMemorySize(
  106. PMIDL_STUB_MESSAGE pStubMsg,
  107. PNDR64_FORMAT pFormat )
  108. {
  109. (*Ndr64MemSizeRoutinesTable[*(PFORMAT_STRING)pFormat] )
  110. ( pStubMsg,
  111. pFormat );
  112. }
  113. inline void
  114. Ndr64EmbeddedTypeMemorySize(
  115. PMIDL_STUB_MESSAGE pStubMsg,
  116. PNDR64_FORMAT pFormat )
  117. {
  118. (*Ndr64EmbeddedMemSizeRoutinesTable[*(PFORMAT_STRING)pFormat] )
  119. ( pStubMsg,
  120. pFormat );
  121. }
  122. void
  123. Ndr64ComplexStructMemorySize(
  124. PMIDL_STUB_MESSAGE pStubMsg,
  125. PNDR64_FORMAT pFormat );
  126. void
  127. Ndr64ComplexArrayMemorySize(
  128. PMIDL_STUB_MESSAGE pStubMsg,
  129. PNDR64_FORMAT pFormat );
  130. //
  131. // Unmarshal
  132. //
  133. typedef void (* PNDR64_UNMARSHALL_ROUTINE)(
  134. PMIDL_STUB_MESSAGE,
  135. uchar **,
  136. PNDR64_FORMAT,
  137. bool
  138. );
  139. extern PNDR64_UNMARSHALL_ROUTINE const Ndr64UnmarshallRoutinesTable[];
  140. extern PNDR64_UNMARSHALL_ROUTINE const Ndr64EmbeddedUnmarshallRoutinesTable[];
  141. inline void
  142. Ndr64EmbeddedTypeUnmarshall(
  143. PMIDL_STUB_MESSAGE pStubMsg,
  144. uchar ** ppMemory,
  145. PNDR64_FORMAT pFormat )
  146. {
  147. (*Ndr64EmbeddedUnmarshallRoutinesTable[*(PFORMAT_STRING)pFormat])
  148. (pStubMsg,
  149. ppMemory,
  150. pFormat,
  151. false );
  152. }
  153. inline void
  154. Ndr64TopLevelTypeUnmarshall(
  155. PMIDL_STUB_MESSAGE pStubMsg,
  156. uchar ** ppMemory,
  157. PNDR64_FORMAT pFormat,
  158. bool fMustAlloc )
  159. {
  160. (*Ndr64UnmarshallRoutinesTable[*(PFORMAT_STRING)pFormat])
  161. (pStubMsg,
  162. ppMemory,
  163. pFormat,
  164. fMustAlloc );
  165. }
  166. //
  167. // Free routines
  168. //
  169. typedef void (* PNDR64_FREE_ROUTINE)(
  170. PMIDL_STUB_MESSAGE,
  171. uchar *,
  172. PNDR64_FORMAT
  173. );
  174. extern PNDR64_FREE_ROUTINE const Ndr64FreeRoutinesTable[];
  175. extern PNDR64_FREE_ROUTINE const Ndr64EmbeddedFreeRoutinesTable[];
  176. inline void
  177. Ndr64EmbeddedTypeFree(
  178. PMIDL_STUB_MESSAGE pStubMsg,
  179. uchar * pMemory,
  180. PNDR64_FORMAT pFormat )
  181. {
  182. (*Ndr64EmbeddedFreeRoutinesTable[*(PFORMAT_STRING)pFormat])
  183. ( pStubMsg,
  184. pMemory,
  185. pFormat );
  186. }
  187. inline void
  188. Ndr64ToplevelTypeFree(
  189. PMIDL_STUB_MESSAGE pStubMsg,
  190. uchar * pMemory,
  191. PNDR64_FORMAT pFormat )
  192. {
  193. (*Ndr64FreeRoutinesTable[*(PFORMAT_STRING)pFormat])
  194. ( pStubMsg,
  195. pMemory,
  196. pFormat );
  197. }
  198. #include "..\..\ndr20\fullptr.h"
  199. #include "pipendr.h"
  200. #include "mulsyntx.h"
  201. #include "pointer.h"
  202. #include "expr.h"
  203. uchar *
  204. Ndr64pMemoryIncrement(
  205. PMIDL_STUB_MESSAGE pStubMsg,
  206. uchar * pMemory,
  207. PNDR64_FORMAT pFormat,
  208. BOOL fUseBufferConformance
  209. );
  210. inline
  211. NDR64_UINT32
  212. Ndr64pMemorySize(
  213. PMIDL_STUB_MESSAGE pStubMsg,
  214. PNDR64_FORMAT pFormat,
  215. BOOL fUseBufferConformance )
  216. {
  217. return
  218. PtrToUlong(Ndr64pMemoryIncrement( pStubMsg,
  219. NULL,
  220. pFormat,
  221. fUseBufferConformance ) );
  222. }
  223. BOOL
  224. Ndr64pIsStructStringTerminator(
  225. NDR64_UINT8* pMemory,
  226. NDR64_UINT32 ElementSize
  227. );
  228. NDR64_UINT32
  229. Ndr64pStructStringLen(
  230. NDR64_UINT8* pMemory,
  231. NDR64_UINT32 ElementSize
  232. );
  233. NDR64_UINT32
  234. Ndr64pCommonStringSize(
  235. PMIDL_STUB_MESSAGE pStubMsg,
  236. uchar * pMemory,
  237. const NDR64_STRING_HEADER_FORMAT *pStringFormat
  238. );
  239. inline NDR64_UINT32
  240. Ndr64pConvertTo2GB(
  241. NDR64_UINT64 Data64
  242. )
  243. {
  244. if ( Data64 > 0x7FFFFFFF )
  245. {
  246. RpcRaiseException( RPC_X_INVALID_BOUND );
  247. return 0;
  248. }
  249. return (NDR64_UINT32) Data64;
  250. }
  251. void
  252. Ndr64pInitUserMarshalCB(
  253. MIDL_STUB_MESSAGE *pStubMsg,
  254. NDR64_USER_MARSHAL_FORMAT * pUserFormat,
  255. USER_MARSHAL_CB_TYPE CBType,
  256. USER_MARSHAL_CB *pUserMarshalCB
  257. );
  258. CLIENT_CALL_RETURN RPC_ENTRY
  259. NdrpClientCall3(
  260. void * pThis,
  261. MIDL_STUBLESS_PROXY_INFO *pProxyInfo,
  262. unsigned long nProcNum,
  263. void *pReturnValue,
  264. NDR_PROC_CONTEXT * pContext,
  265. unsigned char * StartofStack
  266. );
  267. PNDR64_FORMAT
  268. Ndr64pFindUnionArm(
  269. PMIDL_STUB_MESSAGE pStubMsg,
  270. const NDR64_UNION_ARM_SELECTOR* pArmSelector,
  271. EXPR_VALUE Value
  272. );
  273. EXPR_VALUE
  274. Ndr64pSimpleTypeToExprValue(
  275. NDR64_FORMAT_CHAR FormatChar,
  276. uchar *pSimple);
  277. EXPR_VALUE
  278. Ndr64pCastExprValueToExprValue(
  279. NDR64_FORMAT_CHAR FormatChar,
  280. EXPR_VALUE Value);
  281. // Context Handle Functions
  282. NDR_SCONTEXT
  283. RPC_ENTRY
  284. Ndr64ContextHandleInitialize(
  285. IN PMIDL_STUB_MESSAGE pStubMsg,
  286. IN PFORMAT_STRING pFormat
  287. );
  288. void
  289. RPC_ENTRY
  290. Ndr64ServerContextNewMarshall(
  291. PMIDL_STUB_MESSAGE pStubMsg,
  292. NDR_SCONTEXT ContextHandle,
  293. NDR_RUNDOWN RundownRoutine,
  294. PFORMAT_STRING pFormat
  295. );
  296. NDR_SCONTEXT
  297. RPC_ENTRY
  298. Ndr64ServerContextNewUnmarshall(
  299. IN PMIDL_STUB_MESSAGE pStubMsg,
  300. IN PFORMAT_STRING pFormat
  301. );
  302. void
  303. Ndr64pCleanupServerContextHandles(
  304. MIDL_STUB_MESSAGE * pStubMsg,
  305. long NumberParams,
  306. NDR64_PARAM_FORMAT* Params,
  307. uchar * pArgBuffer,
  308. BOOL fManagerRoutineException
  309. );
  310. // Free
  311. void
  312. RPC_ENTRY
  313. Ndr64PointerFree(
  314. PMIDL_STUB_MESSAGE pStubMsg,
  315. unsigned char __RPC_FAR * pMemory,
  316. PNDR64_FORMAT pFormat
  317. );
  318. // Mrshl
  319. void
  320. RPC_ENTRY
  321. Ndr64SimpleTypeMarshall(
  322. PMIDL_STUB_MESSAGE pStubMsg,
  323. unsigned char __RPC_FAR * pMemory,
  324. unsigned char FormatChar
  325. );
  326. // Unmarshall
  327. void
  328. RPC_ENTRY
  329. Ndr64SimpleTypeUnmarshall(
  330. PMIDL_STUB_MESSAGE pStubMsg,
  331. unsigned char __RPC_FAR * pMemory,
  332. unsigned char FormatChar
  333. );
  334. // Initialization
  335. void
  336. Ndr64ClientInitialize(
  337. PRPC_MESSAGE pRpcMsg,
  338. PMIDL_STUB_MESSAGE pStubMsg,
  339. PMIDL_STUBLESS_PROXY_INFO pProxyInfo,
  340. unsigned int ProcNum
  341. );
  342. unsigned char *
  343. Ndr64ServerInitialize(
  344. PRPC_MESSAGE pRpcMsg,
  345. PMIDL_STUB_MESSAGE pStubMsg,
  346. PMIDL_STUB_DESC pStubDescriptor
  347. );
  348. void
  349. Ndr64ServerInitializePartial(
  350. PRPC_MESSAGE pRpcMsg,
  351. PMIDL_STUB_MESSAGE pStubMsg,
  352. PMIDL_STUB_DESC pStubDescriptor,
  353. unsigned long RequestedBufferSize
  354. );
  355. // Get Buffer variations
  356. unsigned char *
  357. Ndr64GetBuffer(
  358. PMIDL_STUB_MESSAGE pStubMsg,
  359. unsigned long BufferLength );
  360. unsigned char *
  361. Ndr64NsGetBuffer(
  362. PMIDL_STUB_MESSAGE pStubMsg,
  363. unsigned long BufferLength );
  364. unsigned char *
  365. Ndr64GetPipeBuffer(
  366. PMIDL_STUB_MESSAGE pStubMsg,
  367. unsigned long BufferLength );
  368. void
  369. Ndr64ClearOutParameters(
  370. PMIDL_STUB_MESSAGE pStubMsg,
  371. PNDR64_FORMAT pFormat,
  372. uchar * ArgAddr
  373. );
  374. // These end of buffer checks can be performed on a receiving side only.
  375. // The necessary setup is there for memorysize, unmarshal and convert walks.
  376. // This also includes pickling walk.
  377. // Don't use this on the sending side.
  378. // Checks if the pointer is past the end of the buffer. Do not check for wraparound.
  379. #define CHECK_EOB_RAISE_BSD( p ) \
  380. { \
  381. if( (char *)(p) > (char*)pStubMsg->BufferEnd ) \
  382. { \
  383. RpcRaiseException( RPC_X_BAD_STUB_DATA ); \
  384. } \
  385. }
  386. #define CHECK_EOB_RAISE_IB( p ) \
  387. { \
  388. if( (char *)(p) > (char*)pStubMsg->BufferEnd ) \
  389. { \
  390. RpcRaiseException( RPC_X_INVALID_BOUND ); \
  391. } \
  392. }
  393. // Checks if p + incsize is past the end of the bufffer.
  394. //
  395. #define CHECK_EOB_WITH_WRAP_RAISE_BSD( p, incsize ) \
  396. { \
  397. char *NewBuffer = ((char *)(p)) + (SIZE_T)(incsize); \
  398. if( (NewBuffer > (char*)(pStubMsg->BufferEnd)) || (NewBuffer < (char*)(p)) ) \
  399. { \
  400. RpcRaiseException( RPC_X_BAD_STUB_DATA ); \
  401. } \
  402. }
  403. #define CHECK_EOB_WITH_WRAP_RAISE_IB( p, incsize ) \
  404. { \
  405. char *NewBuffer = ((char *)(p)) + (SIZE_T)(incsize); \
  406. if( (NewBuffer > (char*)(pStubMsg->BufferEnd)) || (NewBuffer < (char*)(p)) ) \
  407. { \
  408. RpcRaiseException( RPC_X_INVALID_BOUND ); \
  409. } \
  410. }
  411. // This would be appropriate on the sending side for marshaling.
  412. #define CHECK_SEND_EOB_RAISE_BSD( p ) \
  413. if ( (char*)(pStubMsg->RpcMsg->Buffer + pStubMsg->RpcMsg->BufferLength) < (char*)( p ) ) \
  414. RpcRaiseException( RPC_X_BAD_STUB_DATA )
  415. //
  416. // Defined in global.c
  417. //
  418. extern const unsigned char Ndr64SimpleTypeBufferSize[];
  419. extern const unsigned char Ndr64SimpleTypeMemorySize[];
  420. extern const unsigned long Ndr64TypeFlags[];
  421. // This definition is adjusted for a native platform.
  422. // The wire size is fixed for DCE NDR regardless of platform.
  423. #define PTR_MEM_SIZE sizeof(void *)
  424. #define PTR_MEM_ALIGN (sizeof(void *)-1)
  425. #define PTR_WIRE_REP(p) ((NDR64_PTR_WIRE_TYPE)(p))
  426. #define CONTEXT_HANDLE_WIRE_SIZE 20
  427. #define IGNORED(Param)
  428. //
  429. // Proc info flags macros.
  430. //
  431. #define IS_OLE_INTERFACE(Flags) ((Flags) & Oi_OBJECT_PROC)
  432. #define HAS_RPCFLAGS(Flags) ((Flags) & Oi_HAS_RPCFLAGS)
  433. #define DONT_HANDLE_EXCEPTION(Flags) \
  434. ((Flags) & Oi_IGNORE_OBJECT_EXCEPTION_HANDLING)
  435. //
  436. // Routine index macro.
  437. //
  438. #define NDR64_ROUTINE_INDEX(FC) ( (FC) )
  439. //
  440. // Simple type alignment and size lookup macros.
  441. //
  442. #define NDR64_SIMPLE_TYPE_BUFALIGN(FormatChar) (Ndr64SimpleTypeBufferSize[FormatChar]-1)
  443. #define NDR64_SIMPLE_TYPE_MEMALIGN(FormatChar) (Ndr64SimpleTypeMemorySize[FormatChar]-1)
  444. #define NDR64_SIMPLE_TYPE_BUFSIZE(FormatChar) (Ndr64SimpleTypeBufferSize[FormatChar])
  445. #define NDR64_SIMPLE_TYPE_MEMSIZE(FormatChar) (Ndr64SimpleTypeMemorySize[FormatChar])
  446. #if defined(__RPC_WIN32__)
  447. #define NDR64_USER_MARSHAL_MARKER (0x72657355);
  448. #else
  449. #define NDR64_USER_MARSHAL_MARKER (0x7265735572657355);
  450. #endif
  451. #if defined(__RPC_WIN32__)
  452. #define NDR64_CONTEXT_HANDLE_MARSHAL_MARKER (0xbaadbeef);
  453. #else
  454. #define NDR64_CONTEXT_HANDLE_MARSHAL_MARKER (0xbaadbeefbaadbeef);
  455. #endif
  456. //
  457. // Format character attribute bits used in global Ndr64TypesFlags defined in
  458. // global.c.
  459. //
  460. #define _SIMPLE_TYPE_ 0x0001L
  461. #define _POINTER_ 0x0002L
  462. #define _STRUCT_ 0x0004L
  463. #define _ARRAY_ 0x0008L
  464. #define _STRING_ 0x0010L
  465. #define _UNION_ 0x0020L
  466. #define _XMIT_AS_ 0x0040L
  467. #define _BY_VALUE_ 0x0080L
  468. #define _HANDLE_ 0x0100L
  469. #define _BASIC_POINTER_ 0x0200L
  470. //
  471. // Format character query macros.
  472. //
  473. #define NDR64_IS_SIMPLE_TYPE(FC) (Ndr64TypeFlags[(FC)] & _SIMPLE_TYPE_)
  474. #define NDR64_IS_POINTER_TYPE(FC) (Ndr64TypeFlags[(FC)] & _POINTER_)
  475. #define NDR64_IS_BASIC_POINTER(FC) (Ndr64TypeFlags[(FC)] & _BASIC_POINTER_)
  476. #define NDR64_IS_ARRAY(FC) (Ndr64TypeFlags[(FC)] & _ARRAY_)
  477. #define NDR64_IS_STRUCT(FC) (Ndr64TypeFlags[(FC)] & _STRUCT_)
  478. #define NDR64_IS_UNION(FC) (Ndr64TypeFlags[(FC)] & _UNION_)
  479. #define NDR64_IS_STRING(FC) (Ndr64TypeFlags[(FC)] & _STRING_)
  480. #define NDR64_IS_ARRAY_OR_STRING(FC) (Ndr64TypeFlags[(FC)] & (_STRING_ | _ARRAY_))
  481. #define NDR64_IS_XMIT_AS(FC) (Ndr64TypeFlags[(FC)] & _XMIT_AS_)
  482. #define NDR64_IS_BY_VALUE(FC) (Ndr64TypeFlags[(FC)] & _BY_VALUE_)
  483. #define NDR64_IS_HANDLE(FC) (Ndr64TypeFlags[(FC)] & _HANDLE_)
  484. //
  485. // Pointer attribute extraction and querying macros.
  486. //
  487. #define NDR64_ALLOCATE_ALL_NODES( FC ) ((FC) & FC_ALLOCATE_ALL_NODES)
  488. #define NDR64_DONT_FREE( FC ) ((FC) & FC_DONT_FREE)
  489. #define NDR64_ALLOCED_ON_STACK( FC ) ((FC) & FC_ALLOCED_ON_STACK)
  490. #define NDR64_SIMPLE_POINTER( FC ) ((FC) & FC_SIMPLE_POINTER)
  491. #define NDR64_POINTER_DEREF( FC ) ((FC) & FC_POINTER_DEREF)
  492. //
  493. // Handle query macros.
  494. //
  495. #define NDR64_IS_HANDLE_PTR( FC ) ((FC) & HANDLE_PARAM_IS_VIA_PTR)
  496. #define NDR64_IS_HANDLE_IN( FC ) ((FC) & HANDLE_PARAM_IS_IN)
  497. #define NDR64_IS_HANDLE_OUT( FC ) ((FC) & HANDLE_PARAM_IS_OUT)
  498. #define NDR64_IS_HANDLE_RETURN( FC ) ((FC) & HANDLE_PARAM_IS_RETURN)
  499. #define NDR64_NEW_EMBEDDED_ALLOCATION_FLAG ( ( unsigned char ) 0x01 )
  500. #define NDR64_CONF_MARK_VALID_FLAG ( ( unsigned char ) 0x02 )
  501. #define NDR64_VAR_MARK_VALID_FLAG ( ( unsigned char ) 0x04 )
  502. #define NDR64_WALKIP_FLAG ( ( unsigned char ) 0x08 )
  503. #define NDR64_SKIP_REF_CHECK_FLAG ( ( unsigned char ) 0x40 )
  504. #define NDR64_IS_CONF_MARK_VALID( f ) ( ( f ) & NDR64_CONF_MARK_VALID_FLAG )
  505. #define NDR64_SET_CONF_MARK_VALID( f ) ( ( f ) |= NDR64_CONF_MARK_VALID_FLAG )
  506. #define NDR64_RESET_CONF_MARK_VALID( f ) ( ( f ) &= ~NDR64_CONF_MARK_VALID_FLAG )
  507. #define NDR64_IS_VAR_MARK_VALID( f ) ( ( f ) & NDR64_VAR_MARK_VALID_FLAG )
  508. #define NDR64_SET_VAR_MARK_VALID( f ) ( ( f ) |= NDR64_VAR_MARK_VALID_FLAG )
  509. #define NDR64_RESET_VAR_MARK_VALID( f ) ( ( f ) &= ~NDR64_VAR_MARK_VALID_FLAG )
  510. #define NDR64_IS_NEW_EMBEDDED_ALLOCATION( f ) ( ( f ) & NDR64_NEW_EMBEDDED_ALLOCATION_FLAG )
  511. #define NDR64_SET_NEW_EMBEDDED_ALLOCATION( f ) ( ( f ) |= NDR64_NEW_EMBEDDED_ALLOCATION_FLAG )
  512. #define NDR64_RESET_IS_NEW_EMBEDDED_ALLOCATION( f ) ( ( f ) &= ~NDR64_NEW_EMBEDDED_ALLOCATION_FLAG )
  513. #define NDR64_IS_WALKIP( f ) ( ( f ) & NDR64_WALKIP_FLAG )
  514. #define NDR64_SET_WALKIP( f ) ( ( f ) |= NDR64_WALKIP_FLAG )
  515. #define NDR64_RESET_WALKIP( f ) ( ( f ) &= ~NDR64_WALKIP_FLAG )
  516. #define NDR64_IS_SKIP_REF_CHECK( f ) ( ( f ) & NDR64_SKIP_REF_CHECK_FLAG )
  517. #define NDR64_SET_SKIP_REF_CHECK( f ) ( ( f ) |= NDR64_SKIP_REF_CHECK_FLAG )
  518. #define NDR64_RESET_SKIP_REF_CHECK( f ) ( ( f ) &= ~NDR64_SKIP_REF_CHECK_FLAG )
  519. #define NDR64_RESET_EMBEDDED_FLAGS_TO_STANDALONE( f ) \
  520. ( ( f ) &= ~ ( NDR64_NEW_EMBEDDED_ALLOCATION_FLAG | \
  521. NDR64_CONF_MARK_VALID_FLAG | \
  522. NDR64_VAR_MARK_VALID_FLAG ) )
  523. #define EXCEPTION_FLAG ( pContext->ExceptionFlag )
  524. #endif