2 * Copyright (C) 2000 Francois Gouget
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __RPCNDR_H_VERSION__
20 #define __RPCNDR_H_VERSION__ ( 500 )
23 #ifndef __WINE_RPCNDR_H
24 #define __WINE_RPCNDR_H
35 # define CONST_VTBL const
42 #define EXTERN_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
43 EXTERN_C const GUID DECLSPEC_SELECTANY name = \
44 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
46 #define EXTERN_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
47 EXTERN_C const GUID name
51 #define NDR_CHAR_REP_MASK ((ULONG)0x000f)
52 #define NDR_INT_REP_MASK ((ULONG)0x00f0)
53 #define NDR_FLOAT_REP_MASK ((ULONG)0xff00)
54 #define NDR_IEEE_FLOAT ((ULONG)0x0000)
55 #define NDR_VAX_FLOAT ((ULONG)0x0100)
56 #define NDR_IBM_FLOAT ((ULONG)0x0300)
57 #define NDR_ASCII_CHAR ((ULONG)0x0000)
58 #define NDR_EBCDIC_CHAR ((ULONG)0x0001)
59 #define NDR_LITTLE_ENDIAN ((ULONG)0x0010)
60 #define NDR_BIG_ENDIAN ((ULONG)0x0000)
61 #define NDR_LOCAL_DATA_REPRESENTATION NDR_LITTLE_ENDIAN
62 #define NDR_LOCAL_ENDIAN NDR_LITTLE_ENDIAN
64 #define TARGET_IS_NT50_OR_LATER 1
65 #define TARGET_IS_NT40_OR_LATER 1
66 #define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
69 typedef unsigned char byte
;
71 typedef UINT64 MIDL_uhyper
;
72 typedef unsigned char boolean
;
74 #define __RPC_CALLEE WINAPI
75 #define RPC_VAR_ENTRY WINAPIV
76 #define NDR_SHAREABLE static
78 #define MIDL_ascii_strlen(s) strlen(s)
79 #define MIDL_ascii_strcpy(d,s) strcpy(d,s)
80 #define MIDL_memset(d,v,n) memset(d,v,n)
81 #define midl_user_free MIDL_user_free
82 #define midl_user_allocate MIDL_user_allocate
84 void __RPC_USER
MIDL_user_free(void *);
85 void * __RPC_USER
MIDL_user_allocate(SIZE_T
) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(MIDL_user_free
) __WINE_MALLOC
;
87 #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
88 #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
89 (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
91 #define RPC_BAD_STUB_DATA_EXCEPTION_FILTER \
92 ((RpcExceptionCode() == STATUS_ACCESS_VIOLATION) || \
93 (RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || \
94 (RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
95 (RpcExceptionCode() == RPC_S_INVALID_BOUND))
97 typedef struct _NDR_SCONTEXT
103 #define NDRSContextValue(hContext) (&(hContext)->userContext)
104 #define cbNDRContext 20
106 typedef void (__RPC_USER
*NDR_RUNDOWN
)(void *context
);
107 typedef void (__RPC_USER
*NDR_NOTIFY_ROUTINE
)(void);
108 typedef void (__RPC_USER
*NDR_NOTIFY2_ROUTINE
)(boolean flag
);
110 #define DECLSPEC_UUID(x)
111 #define MIDL_INTERFACE(x) struct
113 struct _MIDL_STUB_MESSAGE
;
114 struct _MIDL_STUB_DESC
;
115 struct _FULL_PTR_XLAT_TABLES
;
116 struct NDR_ALLOC_ALL_NODES_CONTEXT
;
117 struct NDR_POINTER_QUEUE_STATE
;
119 typedef unsigned char *RPC_BUFPTR
;
120 typedef ULONG RPC_LENGTH
;
121 typedef void (__RPC_USER
*EXPR_EVAL
)(struct _MIDL_STUB_MESSAGE
*);
122 typedef const unsigned char *PFORMAT_STRING
;
127 ULONG
*BufferConformanceMark
;
128 ULONG
*BufferVarianceMark
;
129 ULONG
*MaxCountArray
;
131 ULONG
*ActualCountArray
;
132 } ARRAY_INFO
, *PARRAY_INFO
;
137 ULONG DesiredReceivingCodeset
;
141 typedef struct _NDR_PIPE_DESC
*PNDR_PIPE_DESC
;
142 typedef struct _NDR_PIPE_MESSAGE
*PNDR_PIPE_MESSAGE
;
143 typedef struct _NDR_ASYNC_MESSAGE
*PNDR_ASYNC_MESSAGE
;
144 typedef struct _NDR_CORRELATION_INFO
*PNDR_CORRELATION_INFO
;
146 typedef struct _MIDL_STUB_MESSAGE
149 unsigned char *Buffer
;
150 unsigned char *BufferStart
;
151 unsigned char *BufferEnd
;
152 unsigned char *BufferMark
;
155 unsigned char *Memory
;
156 unsigned char IsClient
;
158 unsigned short uFlags2
;
160 struct NDR_ALLOC_ALL_NODES_CONTEXT
*pAllocAllNodesContext
;
161 struct NDR_POINTER_QUEUE_STATE
*pPointerQueueState
;
162 int IgnoreEmbeddedPointers
;
163 unsigned char *PointerBufferMark
;
164 unsigned char CorrDespIncrement
;
165 unsigned char uFlags
;
166 unsigned short UniquePtrCount
;
170 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
171 void (__RPC_API
*pfnFree
)(void *);
172 unsigned char *StackTop
;
173 unsigned char *pPresentedType
;
174 unsigned char *pTransmitType
;
175 handle_t SavedHandle
;
176 const struct _MIDL_STUB_DESC
*StubDesc
;
177 struct _FULL_PTR_XLAT_TABLES
*FullPtrXlatTables
;
180 unsigned int fInDontFree
:1;
181 unsigned int fDontCallFreeInst
:1;
182 unsigned int fInOnlyParam
:1;
183 unsigned int fHasReturn
:1;
184 unsigned int fHasExtensions
:1;
185 unsigned int fHasNewCorrDesc
:1;
186 unsigned int fIsIn
:1;
187 unsigned int fIsOut
:1;
188 unsigned int fIsOicf
:1;
189 unsigned int fBufferValid
:1;
190 unsigned int fHasMemoryValidateCallback
:1;
191 unsigned int fInFree
:1;
192 unsigned int fNeedMCCP
:1;
197 NDR_SCONTEXT
*SavedContextHandles
;
199 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
200 PARRAY_INFO pArrayInfo
;
201 ULONG
*SizePtrCountArray
;
202 ULONG
*SizePtrOffsetArray
;
203 ULONG
*SizePtrLengthArray
;
207 PNDR_ASYNC_MESSAGE pAsyncMsg
;
208 PNDR_CORRELATION_INFO pCorrInfo
;
209 unsigned char *pCorrMemory
;
211 CS_STUB_INFO
*pCSInfo
;
212 unsigned char *ConformanceMark
;
213 unsigned char *VarianceMark
;
214 INT_PTR Unused
; /* BackingStoreLowMark on IA64 */
215 struct _NDR_PROC_CONTEXT
*pContext
;
216 void* ContextHandleHash
;
217 void* pUserMarshalList
;
218 INT_PTR Reserved51_3
;
219 INT_PTR Reserved51_4
;
220 INT_PTR Reserved51_5
;
221 } MIDL_STUB_MESSAGE
, *PMIDL_STUB_MESSAGE
;
223 typedef void * (__RPC_API
* GENERIC_BINDING_ROUTINE
)(void *);
224 typedef void (__RPC_API
* GENERIC_UNBIND_ROUTINE
)(void *, unsigned char *);
226 typedef struct _GENERIC_BINDING_ROUTINE_PAIR
228 GENERIC_BINDING_ROUTINE pfnBind
;
229 GENERIC_UNBIND_ROUTINE pfnUnbind
;
230 } GENERIC_BINDING_ROUTINE_PAIR
, *PGENERIC_BINDING_ROUTINE_PAIR
;
232 typedef struct __GENERIC_BINDING_INFO
236 GENERIC_BINDING_ROUTINE pfnBind
;
237 GENERIC_UNBIND_ROUTINE pfnUnbind
;
238 } GENERIC_BINDING_INFO
, *PGENERIC_BINDING_INFO
;
240 typedef void (__RPC_USER
*XMIT_HELPER_ROUTINE
)(PMIDL_STUB_MESSAGE
);
242 typedef struct _XMIT_ROUTINE_QUINTUPLE
244 XMIT_HELPER_ROUTINE pfnTranslateToXmit
;
245 XMIT_HELPER_ROUTINE pfnTranslateFromXmit
;
246 XMIT_HELPER_ROUTINE pfnFreeXmit
;
247 XMIT_HELPER_ROUTINE pfnFreeInst
;
248 } XMIT_ROUTINE_QUINTUPLE
, *PXMIT_ROUTINE_QUINTUPLE
;
250 typedef ULONG (__RPC_USER
*USER_MARSHAL_SIZING_ROUTINE
)(ULONG
*, ULONG
, void *);
251 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_MARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
252 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_UNMARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
253 typedef void (__RPC_USER
*USER_MARSHAL_FREEING_ROUTINE
)(ULONG
*, void *);
255 typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
257 USER_MARSHAL_SIZING_ROUTINE pfnBufferSize
;
258 USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall
;
259 USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall
;
260 USER_MARSHAL_FREEING_ROUTINE pfnFree
;
261 } USER_MARSHAL_ROUTINE_QUADRUPLE
;
264 #define USER_MARSHAL_CB_SIGNATURE \
265 ( ( (DWORD)'U' << 24 ) | ( (DWORD)'S' << 16 ) | \
266 ( (DWORD)'R' << 8 ) | ( (DWORD)'C' ) )
270 USER_MARSHAL_CB_BUFFER_SIZE
,
271 USER_MARSHAL_CB_MARSHALL
,
272 USER_MARSHAL_CB_UNMARSHALL
,
274 } USER_MARSHAL_CB_TYPE
;
276 typedef struct _USER_MARSHAL_CB
279 PMIDL_STUB_MESSAGE pStubMsg
;
280 PFORMAT_STRING pReserve
;
282 USER_MARSHAL_CB_TYPE CBType
;
283 PFORMAT_STRING pFormat
;
284 PFORMAT_STRING pTypeFormat
;
287 #define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
288 #define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
289 #define GET_USER_DATA_REP(f) HIWORD(f)
291 #define USER_CALL_IS_ASYNC 0x0100
292 #define USER_CALL_NEW_CORRELATION_DESC 0x0200
294 typedef struct _MALLOC_FREE_STRUCT
296 void * (__WINE_ALLOC_SIZE(1) __RPC_USER
*pfnAllocate
)(SIZE_T
);
297 void (__RPC_USER
*pfnFree
)(void *);
298 } MALLOC_FREE_STRUCT
;
300 typedef struct _COMM_FAULT_OFFSETS
304 } COMM_FAULT_OFFSETS
;
306 typedef struct _MIDL_STUB_DESC
308 void *RpcInterfaceInformation
;
309 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
310 void (__RPC_API
*pfnFree
)(void *);
312 handle_t
*pAutoHandle
;
313 handle_t
*pPrimitiveHandle
;
314 PGENERIC_BINDING_INFO pGenericBindingInfo
;
315 } IMPLICIT_HANDLE_INFO
;
316 const NDR_RUNDOWN
*apfnNdrRundownRoutines
;
317 const GENERIC_BINDING_ROUTINE_PAIR
*aGenericBindingRoutinePairs
;
318 const EXPR_EVAL
*apfnExprEval
;
319 const XMIT_ROUTINE_QUINTUPLE
*aXmitQuintuple
;
320 const unsigned char *pFormatTypes
;
323 MALLOC_FREE_STRUCT
*pMallocFreeStruct
;
325 const COMM_FAULT_OFFSETS
*CommFaultOffsets
;
326 const USER_MARSHAL_ROUTINE_QUADRUPLE
*aUserMarshalQuadruple
;
327 const NDR_NOTIFY_ROUTINE
*NotifyRoutineTable
;
333 typedef const MIDL_STUB_DESC
*PMIDL_STUB_DESC
;
335 typedef struct _MIDL_FORMAT_STRING
338 #if defined(__GNUC__)
339 unsigned char Format
[0];
341 unsigned char Format
[1];
343 } MIDL_FORMAT_STRING
;
345 typedef struct _MIDL_SYNTAX_INFO
347 RPC_SYNTAX_IDENTIFIER TransferSyntax
;
348 RPC_DISPATCH_TABLE
* DispatchTable
;
349 PFORMAT_STRING ProcString
;
350 const unsigned short* FmtStringOffset
;
351 PFORMAT_STRING TypeString
;
352 const void* aUserMarshalQuadruple
;
353 ULONG_PTR pReserved1
;
354 ULONG_PTR pReserved2
;
355 } MIDL_SYNTAX_INFO
, *PMIDL_SYNTAX_INFO
;
357 typedef void (__RPC_API
*STUB_THUNK
)( PMIDL_STUB_MESSAGE
);
359 #ifdef WINE_STRICT_PROTOTYPES
360 typedef LONG (__RPC_API
*SERVER_ROUTINE
)(void);
362 typedef LONG (__RPC_API
*SERVER_ROUTINE
)();
365 typedef struct _MIDL_SERVER_INFO_
367 PMIDL_STUB_DESC pStubDesc
;
368 const SERVER_ROUTINE
*DispatchTable
;
369 PFORMAT_STRING ProcString
;
370 const unsigned short *FmtStringOffset
;
371 const STUB_THUNK
*ThunkTable
;
372 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
374 PMIDL_SYNTAX_INFO pSyntaxInfo
;
375 } MIDL_SERVER_INFO
, *PMIDL_SERVER_INFO
;
377 typedef struct _MIDL_STUBLESS_PROXY_INFO
379 PMIDL_STUB_DESC pStubDesc
;
380 PFORMAT_STRING ProcFormatString
;
381 const unsigned short *FormatStringOffset
;
382 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
384 PMIDL_SYNTAX_INFO pSyntaxInfo
;
385 } MIDL_STUBLESS_PROXY_INFO
, *PMIDL_STUBLESS_PROXY_INFO
;
388 #if defined(__i386__) && !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__CYGWIN__)
389 /* Calling convention for returning structures/unions is different between Windows and gcc on i386 */
390 typedef LONG_PTR CLIENT_CALL_RETURN
;
392 typedef union _CLIENT_CALL_RETURN
396 } CLIENT_CALL_RETURN
;
403 STUB_CALL_SERVER_NO_HRESULT
419 typedef struct _FULL_PTR_TO_REFID_ELEMENT
{
420 struct _FULL_PTR_TO_REFID_ELEMENT
*Next
;
424 } FULL_PTR_TO_REFID_ELEMENT
, *PFULL_PTR_TO_REFID_ELEMENT
;
426 /* Full pointer translation tables */
427 typedef struct _FULL_PTR_XLAT_TABLES
{
430 unsigned char *StateTable
;
431 ULONG NumberOfEntries
;
435 PFULL_PTR_TO_REFID_ELEMENT
*XlatTable
;
436 ULONG NumberOfBuckets
;
442 } FULL_PTR_XLAT_TABLES
, *PFULL_PTR_XLAT_TABLES
;
444 struct IRpcStubBuffer
;
446 #ifndef _ERROR_STATUS_T_DEFINED
447 typedef ULONG error_status_t
;
448 #define _ERROR_STATUS_T_DEFINED
451 typedef void * NDR_CCONTEXT
;
453 typedef struct _SCONTEXT_QUEUE
{
454 ULONG NumberOfObjects
;
455 NDR_SCONTEXT
*ArrayOfObjects
;
456 } SCONTEXT_QUEUE
, *PSCONTEXT_QUEUE
;
458 typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
462 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
463 void (__RPC_API
*pfnFree
)(void *);
464 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
465 ULONG_PTR Reserved
[5];
466 } NDR_USER_MARSHAL_INFO_LEVEL1
;
468 typedef struct _NDR_USER_MARSHAL_INFO
470 ULONG InformationLevel
;
473 NDR_USER_MARSHAL_INFO_LEVEL1 Level1
;
475 } NDR_USER_MARSHAL_INFO
;
477 /* Context Handles */
479 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
480 NDRCContextBinding( NDR_CCONTEXT CContext
);
482 RPCRTAPI
void RPC_ENTRY
483 NDRCContextMarshall( NDR_CCONTEXT CContext
, void *pBuff
);
485 RPCRTAPI
void RPC_ENTRY
486 NDRCContextUnmarshall( NDR_CCONTEXT
*pCContext
, RPC_BINDING_HANDLE hBinding
,
487 void *pBuff
, ULONG DataRepresentation
);
489 RPCRTAPI
void RPC_ENTRY
490 NDRSContextMarshall( NDR_SCONTEXT CContext
, void *pBuff
, NDR_RUNDOWN userRunDownIn
);
492 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
493 NDRSContextUnmarshall( void *pBuff
, ULONG DataRepresentation
);
495 RPCRTAPI
void RPC_ENTRY
496 NDRSContextMarshallEx( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
497 void *pBuff
, NDR_RUNDOWN userRunDownIn
);
499 RPCRTAPI
void RPC_ENTRY
500 NDRSContextMarshall2( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
501 void *pBuff
, NDR_RUNDOWN userRunDownIn
, void * CtxGuard
,
504 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
505 NDRSContextUnmarshallEx( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
506 ULONG DataRepresentation
);
508 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
509 NDRSContextUnmarshall2( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
510 ULONG DataRepresentation
, void *CtxGuard
,
513 RPCRTAPI
void RPC_ENTRY
514 NdrClientContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT ContextHandle
, int fCheck
);
516 RPCRTAPI
void RPC_ENTRY
517 NdrClientContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT
* pContextHandle
,
518 RPC_BINDING_HANDLE BindHandle
);
520 RPCRTAPI
void RPC_ENTRY
521 NdrServerContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
, NDR_RUNDOWN RundownRoutine
);
523 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
524 NdrServerContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
);
526 RPCRTAPI
void RPC_ENTRY
527 NdrContextHandleSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
529 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
530 NdrContextHandleInitialize( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
532 RPCRTAPI
void RPC_ENTRY
533 NdrServerContextNewMarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
,
534 NDR_RUNDOWN RundownRoutine
, PFORMAT_STRING pFormat
);
536 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
537 NdrServerContextNewUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
539 RPCRTAPI RPC_STATUS RPC_ENTRY
540 RpcSmDestroyClientContext( void **ContextHandle
);
542 RPCRTAPI
void RPC_ENTRY
543 RpcSsDestroyClientContext( void **ContextHandle
);
545 RPCRTAPI
void RPC_ENTRY
546 NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
547 RPCRTAPI
void RPC_ENTRY
548 NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
550 RPCRTAPI
unsigned char* RPC_ENTRY
551 NdrByteCountPointerMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
552 RPCRTAPI
unsigned char* RPC_ENTRY
553 NdrByteCountPointerUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
554 RPCRTAPI
void RPC_ENTRY
555 NdrByteCountPointerBufferSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
556 RPCRTAPI
void RPC_ENTRY
557 NdrByteCountPointerFree( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
559 RPCRTAPI
unsigned char* RPC_ENTRY
560 NdrRangeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
562 /* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
563 #define SIMPLE_TYPE_MARSHAL(type) \
564 RPCRTAPI unsigned char* RPC_ENTRY \
565 Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
566 RPCRTAPI unsigned char* RPC_ENTRY \
567 Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
568 RPCRTAPI void RPC_ENTRY \
569 Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
570 RPCRTAPI ULONG RPC_ENTRY \
571 Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
573 #define TYPE_MARSHAL(type) \
574 SIMPLE_TYPE_MARSHAL(type) \
575 RPCRTAPI void RPC_ENTRY \
576 Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
578 TYPE_MARSHAL(Pointer
)
579 TYPE_MARSHAL(SimpleStruct
)
580 TYPE_MARSHAL(ConformantStruct
)
581 TYPE_MARSHAL(ConformantVaryingStruct
)
582 TYPE_MARSHAL(ComplexStruct
)
583 TYPE_MARSHAL(FixedArray
)
584 TYPE_MARSHAL(ConformantArray
)
585 TYPE_MARSHAL(ConformantVaryingArray
)
586 TYPE_MARSHAL(VaryingArray
)
587 TYPE_MARSHAL(ComplexArray
)
588 TYPE_MARSHAL(EncapsulatedUnion
)
589 TYPE_MARSHAL(NonEncapsulatedUnion
)
590 TYPE_MARSHAL(XmitOrRepAs
)
591 TYPE_MARSHAL(UserMarshal
)
592 TYPE_MARSHAL(InterfacePointer
)
594 SIMPLE_TYPE_MARSHAL(ConformantString
)
595 SIMPLE_TYPE_MARSHAL(NonConformantString
)
598 #undef SIMPLE_TYPE_MARSHAL
600 RPCRTAPI
void RPC_ENTRY
601 NdrCorrelationInitialize( PMIDL_STUB_MESSAGE pStubMsg
, void *pMemory
, ULONG CacheSize
, ULONG flags
);
602 RPCRTAPI
void RPC_ENTRY
603 NdrCorrelationPass( PMIDL_STUB_MESSAGE pStubMsg
);
604 RPCRTAPI
void RPC_ENTRY
605 NdrCorrelationFree( PMIDL_STUB_MESSAGE pStubMsg
);
607 RPCRTAPI
void RPC_ENTRY
608 NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, LONG NumberParams
);
609 RPCRTAPI
void RPC_ENTRY
610 NdrConvert( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
612 #define USER_MARSHAL_FC_BYTE 1
613 #define USER_MARSHAL_FC_CHAR 2
614 #define USER_MARSHAL_FC_SMALL 3
615 #define USER_MARSHAL_FC_USMALL 4
616 #define USER_MARSHAL_FC_WCHAR 5
617 #define USER_MARSHAL_FC_SHORT 6
618 #define USER_MARSHAL_FC_USHORT 7
619 #define USER_MARSHAL_FC_LONG 8
620 #define USER_MARSHAL_FC_ULONG 9
621 #define USER_MARSHAL_FC_FLOAT 10
622 #define USER_MARSHAL_FC_HYPER 11
623 #define USER_MARSHAL_FC_DOUBLE 12
625 RPCRTAPI
unsigned char* RPC_ENTRY
626 NdrUserMarshalSimpleTypeConvert( ULONG
*pFlags
, unsigned char *pBuffer
, unsigned char FormatChar
);
628 CLIENT_CALL_RETURN RPC_VAR_ENTRY
629 NdrClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
630 CLIENT_CALL_RETURN RPC_VAR_ENTRY
631 NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
632 CLIENT_CALL_RETURN RPC_VAR_ENTRY
633 NdrClientCall3( MIDL_STUBLESS_PROXY_INFO
*info
, ULONG proc
, void *retval
, ... );
634 CLIENT_CALL_RETURN RPC_VAR_ENTRY
635 NdrAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
636 CLIENT_CALL_RETURN RPC_VAR_ENTRY
637 Ndr64AsyncClientCall( MIDL_STUBLESS_PROXY_INFO
*info
, ULONG proc
, void *retval
, ... );
638 CLIENT_CALL_RETURN RPC_VAR_ENTRY
639 NdrDcomAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
641 RPCRTAPI
void RPC_ENTRY
642 NdrServerCall2( PRPC_MESSAGE pRpcMsg
);
643 RPCRTAPI
void RPC_ENTRY
644 NdrServerCall( PRPC_MESSAGE pRpcMsg
);
645 RPCRTAPI
void RPC_ENTRY
646 NdrServerCallAll( PRPC_MESSAGE pRpcMsg
);
647 RPCRTAPI
void RPC_ENTRY
648 NdrAsyncServerCall( PRPC_MESSAGE pRpcMsg
);
650 RPCRTAPI LONG RPC_ENTRY
651 NdrStubCall2( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
652 RPCRTAPI LONG RPC_ENTRY
653 NdrStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
654 RPCRTAPI LONG RPC_ENTRY
655 NdrAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
656 RPCRTAPI LONG RPC_ENTRY
657 NdrDcomAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
659 RPCRTAPI
void* RPC_ENTRY
660 NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg
, SIZE_T Len
) __WINE_ALLOC_SIZE(2) __WINE_MALLOC
;
662 RPCRTAPI
void RPC_ENTRY
663 NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, void *ArgAddr
);
665 RPCRTAPI RPC_STATUS RPC_ENTRY
666 NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg
, ULONG
*pCommStatus
,
667 ULONG
*pFaultStatus
, RPC_STATUS Status_
);
669 RPCRTAPI
void RPC_ENTRY
670 NdrOleFree( void* NodeToFree
);
671 RPCRTAPI
void* RPC_ENTRY
672 NdrOleAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrOleFree
) __WINE_MALLOC
;
674 RPCRTAPI
void RPC_ENTRY
675 NdrClientInitialize( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
676 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
677 RPCRTAPI
void RPC_ENTRY
678 NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
679 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
680 RPCRTAPI
unsigned char* RPC_ENTRY
681 NdrServerInitialize( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
682 RPCRTAPI
unsigned char* RPC_ENTRY
683 NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
684 RPCRTAPI
unsigned char* RPC_ENTRY
685 NdrServerInitializeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
, PRPC_MESSAGE pRpcMsg
);
686 RPCRTAPI
void RPC_ENTRY
687 NdrServerInitializeMarshall( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
);
688 RPCRTAPI
void RPC_ENTRY
689 NdrServerMarshall( struct IRpcStubBuffer
*pThis
, struct IRpcChannelBuffer
*pChannel
, PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
690 RPCRTAPI
void RPC_ENTRY
691 NdrServerUnmarshall( struct IRpcChannelBuffer
*pChannel
, PRPC_MESSAGE pRpcMsg
,
692 PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
,
693 PFORMAT_STRING pFormat
, void *pParamList
);
694 RPCRTAPI
unsigned char* RPC_ENTRY
695 NdrGetBuffer( PMIDL_STUB_MESSAGE stubmsg
, ULONG buflen
, RPC_BINDING_HANDLE handle
);
696 RPCRTAPI
void RPC_ENTRY
697 NdrFreeBuffer( PMIDL_STUB_MESSAGE pStubMsg
);
698 RPCRTAPI
unsigned char* RPC_ENTRY
699 NdrSendReceive( PMIDL_STUB_MESSAGE stubmsg
, unsigned char *buffer
);
701 RPCRTAPI
unsigned char * RPC_ENTRY
702 NdrNsGetBuffer( PMIDL_STUB_MESSAGE pStubMsg
, ULONG BufferLength
, RPC_BINDING_HANDLE Handle
);
703 RPCRTAPI
unsigned char * RPC_ENTRY
704 NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char *pBufferEnd
, RPC_BINDING_HANDLE
*pAutoHandle
);
706 RPCRTAPI RPC_STATUS RPC_ENTRY
707 NdrGetDcomProtocolVersion( PMIDL_STUB_MESSAGE pStubMsg
, RPC_VERSION
*pVersion
);
709 RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY
710 NdrFullPointerXlatInit( ULONG NumberOfPointers
, XLAT_SIDE XlatSide
);
711 RPCRTAPI
void RPC_ENTRY
712 NdrFullPointerXlatFree( PFULL_PTR_XLAT_TABLES pXlatTables
);
713 RPCRTAPI
int RPC_ENTRY
714 NdrFullPointerQueryPointer( PFULL_PTR_XLAT_TABLES pXlatTables
, void *pPointer
,
715 unsigned char QueryType
, ULONG
*pRefId
);
716 RPCRTAPI
int RPC_ENTRY
717 NdrFullPointerQueryRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
,
718 unsigned char QueryType
, void **ppPointer
);
719 RPCRTAPI
void RPC_ENTRY
720 NdrFullPointerInsertRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
, void *pPointer
);
721 RPCRTAPI
int RPC_ENTRY
722 NdrFullPointerFree( PFULL_PTR_XLAT_TABLES pXlatTables
, void *Pointer
);
724 RPCRTAPI
void RPC_ENTRY
725 NdrRpcSsEnableAllocate( PMIDL_STUB_MESSAGE pMessage
);
726 RPCRTAPI
void RPC_ENTRY
727 NdrRpcSsDisableAllocate( PMIDL_STUB_MESSAGE pMessage
);
728 RPCRTAPI
void RPC_ENTRY
729 NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage
);
730 RPCRTAPI
void RPC_ENTRY
731 NdrRpcSmClientFree( void *NodeToFree
);
732 RPCRTAPI
void * RPC_ENTRY
733 NdrRpcSmClientAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrRpcSmClientFree
) __WINE_MALLOC
;
734 RPCRTAPI
void RPC_ENTRY
735 NdrRpcSsDefaultFree( void *NodeToFree
);
736 RPCRTAPI
void * RPC_ENTRY
737 NdrRpcSsDefaultAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrRpcSsDefaultFree
) __WINE_MALLOC
;
739 RPCRTAPI RPC_STATUS RPC_ENTRY
740 NdrGetUserMarshalInfo( ULONG
*pFlags
, ULONG InformationLevel
, NDR_USER_MARSHAL_INFO
*pMarshalInfo
);
745 #endif /*__WINE_RPCNDR_H */