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 #ifndef _ERROR_STATUS_T_DEFINED
75 typedef ULONG error_status_t
;
76 #define _ERROR_STATUS_T_DEFINED
79 #define __RPC_CALLEE WINAPI
80 #define RPC_VAR_ENTRY WINAPIV
81 #define NDR_SHAREABLE static
83 #define MIDL_ascii_strlen(s) strlen(s)
84 #define MIDL_ascii_strcpy(d,s) strcpy(d,s)
85 #define MIDL_memset(d,v,n) memset(d,v,n)
86 #define midl_user_free MIDL_user_free
87 #define midl_user_allocate MIDL_user_allocate
89 void __RPC_USER
MIDL_user_free(void *);
90 void * __RPC_USER
MIDL_user_allocate(SIZE_T
) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(MIDL_user_free
) __WINE_MALLOC
;
92 #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
93 #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
94 (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
96 #define RPC_BAD_STUB_DATA_EXCEPTION_FILTER \
97 ((RpcExceptionCode() == STATUS_ACCESS_VIOLATION) || \
98 (RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || \
99 (RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
100 (RpcExceptionCode() == RPC_S_INVALID_BOUND))
102 typedef struct _NDR_SCONTEXT
108 #define NDRSContextValue(hContext) (&(hContext)->userContext)
109 #define cbNDRContext 20
111 typedef void (__RPC_USER
*NDR_RUNDOWN
)(void *context
);
112 typedef void (__RPC_USER
*NDR_NOTIFY_ROUTINE
)(void);
113 typedef void (__RPC_USER
*NDR_NOTIFY2_ROUTINE
)(boolean flag
);
115 #define DECLSPEC_UUID(x)
116 #define MIDL_INTERFACE(x) struct
118 struct _MIDL_STUB_MESSAGE
;
119 struct _MIDL_STUB_DESC
;
120 struct _FULL_PTR_XLAT_TABLES
;
121 struct NDR_ALLOC_ALL_NODES_CONTEXT
;
122 struct NDR_POINTER_QUEUE_STATE
;
124 typedef unsigned char *RPC_BUFPTR
;
125 typedef ULONG RPC_LENGTH
;
126 typedef void (__RPC_USER
*EXPR_EVAL
)(struct _MIDL_STUB_MESSAGE
*);
127 typedef const unsigned char *PFORMAT_STRING
;
132 ULONG
*BufferConformanceMark
;
133 ULONG
*BufferVarianceMark
;
134 ULONG
*MaxCountArray
;
136 ULONG
*ActualCountArray
;
137 } ARRAY_INFO
, *PARRAY_INFO
;
142 ULONG DesiredReceivingCodeset
;
146 typedef struct _NDR_PIPE_DESC
*PNDR_PIPE_DESC
;
147 typedef struct _NDR_PIPE_MESSAGE
*PNDR_PIPE_MESSAGE
;
148 typedef struct _NDR_ASYNC_MESSAGE
*PNDR_ASYNC_MESSAGE
;
149 typedef struct _NDR_CORRELATION_INFO
*PNDR_CORRELATION_INFO
;
151 typedef struct _MIDL_STUB_MESSAGE
154 unsigned char *Buffer
;
155 unsigned char *BufferStart
;
156 unsigned char *BufferEnd
;
157 unsigned char *BufferMark
;
160 unsigned char *Memory
;
161 unsigned char IsClient
;
163 unsigned short uFlags2
;
165 struct NDR_ALLOC_ALL_NODES_CONTEXT
*pAllocAllNodesContext
;
166 struct NDR_POINTER_QUEUE_STATE
*pPointerQueueState
;
167 int IgnoreEmbeddedPointers
;
168 unsigned char *PointerBufferMark
;
169 unsigned char CorrDespIncrement
;
170 unsigned char uFlags
;
171 unsigned short UniquePtrCount
;
175 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
176 void (__RPC_API
*pfnFree
)(void *);
177 unsigned char *StackTop
;
178 unsigned char *pPresentedType
;
179 unsigned char *pTransmitType
;
180 handle_t SavedHandle
;
181 const struct _MIDL_STUB_DESC
*StubDesc
;
182 struct _FULL_PTR_XLAT_TABLES
*FullPtrXlatTables
;
185 unsigned int fInDontFree
:1;
186 unsigned int fDontCallFreeInst
:1;
187 unsigned int fUnused1
:1;
188 unsigned int fHasReturn
:1;
189 unsigned int fHasExtensions
:1;
190 unsigned int fHasNewCorrDesc
:1;
191 unsigned int fIsIn
:1;
192 unsigned int fIsOut
:1;
193 unsigned int fIsOicf
:1;
194 unsigned int fBufferValid
:1;
195 unsigned int fHasMemoryValidateCallback
:1;
196 unsigned int fInFree
:1;
197 unsigned int fNeedMCCP
:1;
202 NDR_SCONTEXT
*SavedContextHandles
;
204 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
205 PARRAY_INFO pArrayInfo
;
206 ULONG
*SizePtrCountArray
;
207 ULONG
*SizePtrOffsetArray
;
208 ULONG
*SizePtrLengthArray
;
212 PNDR_ASYNC_MESSAGE pAsyncMsg
;
213 PNDR_CORRELATION_INFO pCorrInfo
;
214 unsigned char *pCorrMemory
;
216 CS_STUB_INFO
*pCSInfo
;
217 unsigned char *ConformanceMark
;
218 unsigned char *VarianceMark
;
219 INT_PTR Unused
; /* BackingStoreLowMark on IA64 */
220 struct _NDR_PROC_CONTEXT
*pContext
;
221 void* ContextHandleHash
;
222 void* pUserMarshalList
;
223 INT_PTR Reserved51_3
;
224 INT_PTR Reserved51_4
;
225 INT_PTR Reserved51_5
;
226 } MIDL_STUB_MESSAGE
, *PMIDL_STUB_MESSAGE
;
228 typedef void * (__RPC_API
* GENERIC_BINDING_ROUTINE
)(void *);
229 typedef void (__RPC_API
* GENERIC_UNBIND_ROUTINE
)(void *, unsigned char *);
231 typedef struct _GENERIC_BINDING_ROUTINE_PAIR
233 GENERIC_BINDING_ROUTINE pfnBind
;
234 GENERIC_UNBIND_ROUTINE pfnUnbind
;
235 } GENERIC_BINDING_ROUTINE_PAIR
, *PGENERIC_BINDING_ROUTINE_PAIR
;
237 typedef struct __GENERIC_BINDING_INFO
241 GENERIC_BINDING_ROUTINE pfnBind
;
242 GENERIC_UNBIND_ROUTINE pfnUnbind
;
243 } GENERIC_BINDING_INFO
, *PGENERIC_BINDING_INFO
;
245 typedef void (__RPC_USER
*XMIT_HELPER_ROUTINE
)(PMIDL_STUB_MESSAGE
);
247 typedef struct _XMIT_ROUTINE_QUINTUPLE
249 XMIT_HELPER_ROUTINE pfnTranslateToXmit
;
250 XMIT_HELPER_ROUTINE pfnTranslateFromXmit
;
251 XMIT_HELPER_ROUTINE pfnFreeXmit
;
252 XMIT_HELPER_ROUTINE pfnFreeInst
;
253 } XMIT_ROUTINE_QUINTUPLE
, *PXMIT_ROUTINE_QUINTUPLE
;
255 typedef ULONG (__RPC_USER
*USER_MARSHAL_SIZING_ROUTINE
)(ULONG
*, ULONG
, void *);
256 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_MARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
257 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_UNMARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
258 typedef void (__RPC_USER
*USER_MARSHAL_FREEING_ROUTINE
)(ULONG
*, void *);
260 typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
262 USER_MARSHAL_SIZING_ROUTINE pfnBufferSize
;
263 USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall
;
264 USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall
;
265 USER_MARSHAL_FREEING_ROUTINE pfnFree
;
266 } USER_MARSHAL_ROUTINE_QUADRUPLE
;
269 #define USER_MARSHAL_CB_SIGNATURE \
270 ( ( (DWORD)'U' << 24 ) | ( (DWORD)'S' << 16 ) | \
271 ( (DWORD)'R' << 8 ) | ( (DWORD)'C' ) )
275 USER_MARSHAL_CB_BUFFER_SIZE
,
276 USER_MARSHAL_CB_MARSHALL
,
277 USER_MARSHAL_CB_UNMARSHALL
,
279 } USER_MARSHAL_CB_TYPE
;
281 typedef struct _USER_MARSHAL_CB
284 PMIDL_STUB_MESSAGE pStubMsg
;
285 PFORMAT_STRING pReserve
;
287 USER_MARSHAL_CB_TYPE CBType
;
288 PFORMAT_STRING pFormat
;
289 PFORMAT_STRING pTypeFormat
;
292 #define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
293 #define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
294 #define GET_USER_DATA_REP(f) HIWORD(f)
296 #define USER_CALL_IS_ASYNC 0x0100
297 #define USER_CALL_NEW_CORRELATION_DESC 0x0200
299 typedef struct _MALLOC_FREE_STRUCT
301 void * (__WINE_ALLOC_SIZE(1) __RPC_USER
*pfnAllocate
)(SIZE_T
);
302 void (__RPC_USER
*pfnFree
)(void *);
303 } MALLOC_FREE_STRUCT
;
305 typedef struct _COMM_FAULT_OFFSETS
309 } COMM_FAULT_OFFSETS
;
311 typedef enum _IDL_CS_CONVERT
314 IDL_CS_IN_PLACE_CONVERT
,
315 IDL_CS_NEW_BUFFER_CONVERT
318 typedef void (__RPC_USER
* CS_TYPE_NET_SIZE_ROUTINE
)(RPC_BINDING_HANDLE
,ULONG
,ULONG
,IDL_CS_CONVERT
*,ULONG
*,error_status_t
*);
319 typedef void (__RPC_USER
* CS_TYPE_TO_NETCS_ROUTINE
)(RPC_BINDING_HANDLE
,ULONG
,void*,ULONG
,byte
*,ULONG
*,error_status_t
*);
320 typedef void (__RPC_USER
* CS_TYPE_LOCAL_SIZE_ROUTINE
)(RPC_BINDING_HANDLE
,ULONG
,ULONG
,IDL_CS_CONVERT
*,ULONG
*,error_status_t
*);
321 typedef void (__RPC_USER
* CS_TYPE_FROM_NETCS_ROUTINE
)(RPC_BINDING_HANDLE
,ULONG
,byte
*,ULONG
,ULONG
,void*,ULONG
*,error_status_t
*);
322 typedef void (__RPC_USER
* CS_TAG_GETTING_ROUTINE
)(RPC_BINDING_HANDLE
,int,ULONG
*,ULONG
*,ULONG
*,error_status_t
*);
324 typedef struct _NDR_CS_SIZE_CONVERT_ROUTINES
326 CS_TYPE_NET_SIZE_ROUTINE pfnNetSize
;
327 CS_TYPE_TO_NETCS_ROUTINE pfnToNetCs
;
328 CS_TYPE_LOCAL_SIZE_ROUTINE pfnLocalSize
;
329 CS_TYPE_FROM_NETCS_ROUTINE pfnFromNetCs
;
330 } NDR_CS_SIZE_CONVERT_ROUTINES
;
332 typedef struct _NDR_CS_ROUTINES
334 NDR_CS_SIZE_CONVERT_ROUTINES
*pSizeConvertRoutines
;
335 CS_TAG_GETTING_ROUTINE
*pTagGettingRoutines
;
338 typedef struct _NDR_EXPR_DESC
340 const unsigned short *pOffset
;
341 PFORMAT_STRING pFormatExpr
;
344 typedef struct _MIDL_STUB_DESC
346 void *RpcInterfaceInformation
;
347 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
348 void (__RPC_API
*pfnFree
)(void *);
350 handle_t
*pAutoHandle
;
351 handle_t
*pPrimitiveHandle
;
352 PGENERIC_BINDING_INFO pGenericBindingInfo
;
353 } IMPLICIT_HANDLE_INFO
;
354 const NDR_RUNDOWN
*apfnNdrRundownRoutines
;
355 const GENERIC_BINDING_ROUTINE_PAIR
*aGenericBindingRoutinePairs
;
356 const EXPR_EVAL
*apfnExprEval
;
357 const XMIT_ROUTINE_QUINTUPLE
*aXmitQuintuple
;
358 const unsigned char *pFormatTypes
;
361 MALLOC_FREE_STRUCT
*pMallocFreeStruct
;
363 const COMM_FAULT_OFFSETS
*CommFaultOffsets
;
364 const USER_MARSHAL_ROUTINE_QUADRUPLE
*aUserMarshalQuadruple
;
365 const NDR_NOTIFY_ROUTINE
*NotifyRoutineTable
;
367 const NDR_CS_ROUTINES
*CsRoutineTables
;
368 void *ProxyServerInfo
;
369 const NDR_EXPR_DESC
*pExprInfo
;
371 typedef const MIDL_STUB_DESC
*PMIDL_STUB_DESC
;
373 typedef struct _MIDL_FORMAT_STRING
376 unsigned char Format
[];
377 } MIDL_FORMAT_STRING
;
379 typedef struct _MIDL_METHOD_PROPERTY
383 } MIDL_METHOD_PROPERTY
, *PMIDL_METHOD_PROPERTY
;
385 typedef struct _MIDL_METHOD_PROPERTY_MAP
388 const MIDL_METHOD_PROPERTY
*Properties
;
389 } MIDL_METHOD_PROPERTY_MAP
, *PMIDL_METHOD_PROPERTY_MAP
;
391 typedef struct _MIDL_INTERFACE_METHOD_PROPERTIES
393 unsigned short MethodCount
;
394 const MIDL_METHOD_PROPERTY_MAP
* const *MethodProperties
;
395 } MIDL_INTERFACE_METHOD_PROPERTIES
;
397 typedef struct _MIDL_SYNTAX_INFO
399 RPC_SYNTAX_IDENTIFIER TransferSyntax
;
400 RPC_DISPATCH_TABLE
* DispatchTable
;
401 PFORMAT_STRING ProcString
;
402 const unsigned short* FmtStringOffset
;
403 PFORMAT_STRING TypeString
;
404 const void* aUserMarshalQuadruple
;
405 const MIDL_INTERFACE_METHOD_PROPERTIES
*pMethodProperties
;
406 ULONG_PTR pReserved2
;
407 } MIDL_SYNTAX_INFO
, *PMIDL_SYNTAX_INFO
;
409 typedef void (__RPC_API
*STUB_THUNK
)( PMIDL_STUB_MESSAGE
);
411 #ifndef WINE_NO_STRICT_PROTOTYPES
412 typedef LONG (__RPC_API
*SERVER_ROUTINE
)(void);
414 typedef LONG (__RPC_API
*SERVER_ROUTINE
)();
417 typedef struct _MIDL_SERVER_INFO_
419 PMIDL_STUB_DESC pStubDesc
;
420 const SERVER_ROUTINE
*DispatchTable
;
421 PFORMAT_STRING ProcString
;
422 const unsigned short *FmtStringOffset
;
423 const STUB_THUNK
*ThunkTable
;
424 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
426 PMIDL_SYNTAX_INFO pSyntaxInfo
;
427 } MIDL_SERVER_INFO
, *PMIDL_SERVER_INFO
;
429 typedef struct _MIDL_STUBLESS_PROXY_INFO
431 PMIDL_STUB_DESC pStubDesc
;
432 PFORMAT_STRING ProcFormatString
;
433 const unsigned short *FormatStringOffset
;
434 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
436 PMIDL_SYNTAX_INFO pSyntaxInfo
;
437 } MIDL_STUBLESS_PROXY_INFO
, *PMIDL_STUBLESS_PROXY_INFO
;
440 #if defined(__i386__) && !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__CYGWIN__)
441 /* Calling convention for returning structures/unions is different between Windows and gcc on i386 */
442 typedef LONG_PTR CLIENT_CALL_RETURN
;
444 typedef union _CLIENT_CALL_RETURN
448 } CLIENT_CALL_RETURN
;
455 STUB_CALL_SERVER_NO_HRESULT
471 typedef struct _FULL_PTR_TO_REFID_ELEMENT
{
472 struct _FULL_PTR_TO_REFID_ELEMENT
*Next
;
476 } FULL_PTR_TO_REFID_ELEMENT
, *PFULL_PTR_TO_REFID_ELEMENT
;
478 /* Full pointer translation tables */
479 typedef struct _FULL_PTR_XLAT_TABLES
{
482 unsigned char *StateTable
;
483 ULONG NumberOfEntries
;
487 PFULL_PTR_TO_REFID_ELEMENT
*XlatTable
;
488 ULONG NumberOfBuckets
;
494 } FULL_PTR_XLAT_TABLES
, *PFULL_PTR_XLAT_TABLES
;
496 struct IRpcStubBuffer
;
498 typedef void * NDR_CCONTEXT
;
500 typedef struct _SCONTEXT_QUEUE
{
501 ULONG NumberOfObjects
;
502 NDR_SCONTEXT
*ArrayOfObjects
;
503 } SCONTEXT_QUEUE
, *PSCONTEXT_QUEUE
;
505 typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
509 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
510 void (__RPC_API
*pfnFree
)(void *);
511 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
512 ULONG_PTR Reserved
[5];
513 } NDR_USER_MARSHAL_INFO_LEVEL1
;
515 typedef struct _NDR_USER_MARSHAL_INFO
517 ULONG InformationLevel
;
520 NDR_USER_MARSHAL_INFO_LEVEL1 Level1
;
522 } NDR_USER_MARSHAL_INFO
;
524 /* Context Handles */
526 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
527 NDRCContextBinding( NDR_CCONTEXT CContext
);
529 RPCRTAPI
void RPC_ENTRY
530 NDRCContextMarshall( NDR_CCONTEXT CContext
, void *pBuff
);
532 RPCRTAPI
void RPC_ENTRY
533 NDRCContextUnmarshall( NDR_CCONTEXT
*pCContext
, RPC_BINDING_HANDLE hBinding
,
534 void *pBuff
, ULONG DataRepresentation
);
536 RPCRTAPI
void RPC_ENTRY
537 NDRSContextMarshall( NDR_SCONTEXT CContext
, void *pBuff
, NDR_RUNDOWN userRunDownIn
);
539 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
540 NDRSContextUnmarshall( void *pBuff
, ULONG DataRepresentation
);
542 RPCRTAPI
void RPC_ENTRY
543 NDRSContextMarshallEx( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
544 void *pBuff
, NDR_RUNDOWN userRunDownIn
);
546 RPCRTAPI
void RPC_ENTRY
547 NDRSContextMarshall2( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
548 void *pBuff
, NDR_RUNDOWN userRunDownIn
, void * CtxGuard
,
551 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
552 NDRSContextUnmarshallEx( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
553 ULONG DataRepresentation
);
555 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
556 NDRSContextUnmarshall2( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
557 ULONG DataRepresentation
, void *CtxGuard
,
560 RPCRTAPI
void RPC_ENTRY
561 NdrClientContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT ContextHandle
, int fCheck
);
563 RPCRTAPI
void RPC_ENTRY
564 NdrClientContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT
* pContextHandle
,
565 RPC_BINDING_HANDLE BindHandle
);
567 RPCRTAPI
void RPC_ENTRY
568 NdrServerContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
, NDR_RUNDOWN RundownRoutine
);
570 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
571 NdrServerContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
);
573 RPCRTAPI
void RPC_ENTRY
574 NdrContextHandleSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
576 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
577 NdrContextHandleInitialize( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
579 RPCRTAPI
void RPC_ENTRY
580 NdrServerContextNewMarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
,
581 NDR_RUNDOWN RundownRoutine
, PFORMAT_STRING pFormat
);
583 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
584 NdrServerContextNewUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
586 RPCRTAPI RPC_STATUS RPC_ENTRY
587 RpcSmDestroyClientContext( void **ContextHandle
);
589 RPCRTAPI
void RPC_ENTRY
590 RpcSsDestroyClientContext( void **ContextHandle
);
592 RPCRTAPI
void RPC_ENTRY
593 NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
594 RPCRTAPI
void RPC_ENTRY
595 NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
597 RPCRTAPI
unsigned char* RPC_ENTRY
598 NdrByteCountPointerMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
599 RPCRTAPI
unsigned char* RPC_ENTRY
600 NdrByteCountPointerUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
601 RPCRTAPI
void RPC_ENTRY
602 NdrByteCountPointerBufferSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
603 RPCRTAPI
void RPC_ENTRY
604 NdrByteCountPointerFree( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
606 RPCRTAPI
unsigned char* RPC_ENTRY
607 NdrRangeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
609 /* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
610 #define SIMPLE_TYPE_MARSHAL(type) \
611 RPCRTAPI unsigned char* RPC_ENTRY \
612 Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
613 RPCRTAPI unsigned char* RPC_ENTRY \
614 Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
615 RPCRTAPI void RPC_ENTRY \
616 Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
617 RPCRTAPI ULONG RPC_ENTRY \
618 Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
620 #define TYPE_MARSHAL(type) \
621 SIMPLE_TYPE_MARSHAL(type) \
622 RPCRTAPI void RPC_ENTRY \
623 Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
625 TYPE_MARSHAL(Pointer
)
626 TYPE_MARSHAL(SimpleStruct
)
627 TYPE_MARSHAL(ConformantStruct
)
628 TYPE_MARSHAL(ConformantVaryingStruct
)
629 TYPE_MARSHAL(ComplexStruct
)
630 TYPE_MARSHAL(FixedArray
)
631 TYPE_MARSHAL(ConformantArray
)
632 TYPE_MARSHAL(ConformantVaryingArray
)
633 TYPE_MARSHAL(VaryingArray
)
634 TYPE_MARSHAL(ComplexArray
)
635 TYPE_MARSHAL(EncapsulatedUnion
)
636 TYPE_MARSHAL(NonEncapsulatedUnion
)
637 TYPE_MARSHAL(XmitOrRepAs
)
638 TYPE_MARSHAL(UserMarshal
)
639 TYPE_MARSHAL(InterfacePointer
)
641 SIMPLE_TYPE_MARSHAL(ConformantString
)
642 SIMPLE_TYPE_MARSHAL(NonConformantString
)
645 #undef SIMPLE_TYPE_MARSHAL
647 RPCRTAPI
void RPC_ENTRY
648 NdrCorrelationInitialize( PMIDL_STUB_MESSAGE pStubMsg
, void *pMemory
, ULONG CacheSize
, ULONG flags
);
649 RPCRTAPI
void RPC_ENTRY
650 NdrCorrelationPass( PMIDL_STUB_MESSAGE pStubMsg
);
651 RPCRTAPI
void RPC_ENTRY
652 NdrCorrelationFree( PMIDL_STUB_MESSAGE pStubMsg
);
654 RPCRTAPI
void RPC_ENTRY
655 NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, LONG NumberParams
);
656 RPCRTAPI
void RPC_ENTRY
657 NdrConvert( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
659 #define USER_MARSHAL_FC_BYTE 1
660 #define USER_MARSHAL_FC_CHAR 2
661 #define USER_MARSHAL_FC_SMALL 3
662 #define USER_MARSHAL_FC_USMALL 4
663 #define USER_MARSHAL_FC_WCHAR 5
664 #define USER_MARSHAL_FC_SHORT 6
665 #define USER_MARSHAL_FC_USHORT 7
666 #define USER_MARSHAL_FC_LONG 8
667 #define USER_MARSHAL_FC_ULONG 9
668 #define USER_MARSHAL_FC_FLOAT 10
669 #define USER_MARSHAL_FC_HYPER 11
670 #define USER_MARSHAL_FC_DOUBLE 12
672 RPCRTAPI
unsigned char* RPC_ENTRY
673 NdrUserMarshalSimpleTypeConvert( ULONG
*pFlags
, unsigned char *pBuffer
, unsigned char FormatChar
);
675 CLIENT_CALL_RETURN RPC_VAR_ENTRY
676 NdrClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
677 CLIENT_CALL_RETURN RPC_VAR_ENTRY
678 NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
679 CLIENT_CALL_RETURN RPC_VAR_ENTRY
680 NdrClientCall3( MIDL_STUBLESS_PROXY_INFO
*info
, ULONG proc
, void *retval
, ... );
681 CLIENT_CALL_RETURN RPC_VAR_ENTRY
682 NdrAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
683 CLIENT_CALL_RETURN RPC_VAR_ENTRY
684 Ndr64AsyncClientCall( MIDL_STUBLESS_PROXY_INFO
*info
, ULONG proc
, void *retval
, ... );
685 CLIENT_CALL_RETURN RPC_VAR_ENTRY
686 NdrDcomAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
688 RPCRTAPI
void RPC_ENTRY
689 NdrServerCall2( PRPC_MESSAGE pRpcMsg
);
690 RPCRTAPI
void RPC_ENTRY
691 NdrServerCall( PRPC_MESSAGE pRpcMsg
);
692 RPCRTAPI
void RPC_ENTRY
693 NdrServerCallAll( PRPC_MESSAGE pRpcMsg
);
694 RPCRTAPI
void RPC_ENTRY
695 NdrAsyncServerCall( PRPC_MESSAGE pRpcMsg
);
697 RPCRTAPI LONG RPC_ENTRY
698 NdrStubCall2( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
699 RPCRTAPI LONG RPC_ENTRY
700 NdrStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
701 RPCRTAPI LONG RPC_ENTRY
702 NdrAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
703 RPCRTAPI LONG RPC_ENTRY
704 NdrDcomAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
706 RPCRTAPI
void* RPC_ENTRY
707 NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg
, SIZE_T Len
) __WINE_ALLOC_SIZE(2) __WINE_MALLOC
;
709 RPCRTAPI
void RPC_ENTRY
710 NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, void *ArgAddr
);
712 RPCRTAPI RPC_STATUS RPC_ENTRY
713 NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg
, ULONG
*pCommStatus
,
714 ULONG
*pFaultStatus
, RPC_STATUS Status_
);
716 RPCRTAPI
void RPC_ENTRY
717 NdrOleFree( void* NodeToFree
);
718 RPCRTAPI
void* RPC_ENTRY
719 NdrOleAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrOleFree
) __WINE_MALLOC
;
721 RPCRTAPI
void RPC_ENTRY
722 NdrClientInitialize( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
723 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
724 RPCRTAPI
void RPC_ENTRY
725 NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
726 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
727 RPCRTAPI
unsigned char* RPC_ENTRY
728 NdrServerInitialize( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
729 RPCRTAPI
unsigned char* RPC_ENTRY
730 NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
731 RPCRTAPI
unsigned char* RPC_ENTRY
732 NdrServerInitializeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
, PRPC_MESSAGE pRpcMsg
);
733 RPCRTAPI
void RPC_ENTRY
734 NdrServerInitializeMarshall( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
);
735 RPCRTAPI
void RPC_ENTRY
736 NdrServerMarshall( struct IRpcStubBuffer
*pThis
, struct IRpcChannelBuffer
*pChannel
, PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
737 RPCRTAPI
void RPC_ENTRY
738 NdrServerUnmarshall( struct IRpcChannelBuffer
*pChannel
, PRPC_MESSAGE pRpcMsg
,
739 PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
,
740 PFORMAT_STRING pFormat
, void *pParamList
);
741 RPCRTAPI
unsigned char* RPC_ENTRY
742 NdrGetBuffer( PMIDL_STUB_MESSAGE stubmsg
, ULONG buflen
, RPC_BINDING_HANDLE handle
)
743 __WINE_ALLOC_SIZE(2) __WINE_MALLOC
;
744 RPCRTAPI
void RPC_ENTRY
745 NdrFreeBuffer( PMIDL_STUB_MESSAGE pStubMsg
);
746 RPCRTAPI
unsigned char* RPC_ENTRY
747 NdrSendReceive( PMIDL_STUB_MESSAGE stubmsg
, unsigned char *buffer
);
749 RPCRTAPI
unsigned char * RPC_ENTRY
750 NdrNsGetBuffer( PMIDL_STUB_MESSAGE pStubMsg
, ULONG BufferLength
, RPC_BINDING_HANDLE Handle
);
751 RPCRTAPI
unsigned char * RPC_ENTRY
752 NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char *pBufferEnd
, RPC_BINDING_HANDLE
*pAutoHandle
);
754 RPCRTAPI RPC_STATUS RPC_ENTRY
755 NdrGetDcomProtocolVersion( PMIDL_STUB_MESSAGE pStubMsg
, RPC_VERSION
*pVersion
);
757 RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY
758 NdrFullPointerXlatInit( ULONG NumberOfPointers
, XLAT_SIDE XlatSide
);
759 RPCRTAPI
void RPC_ENTRY
760 NdrFullPointerXlatFree( PFULL_PTR_XLAT_TABLES pXlatTables
);
761 RPCRTAPI
int RPC_ENTRY
762 NdrFullPointerQueryPointer( PFULL_PTR_XLAT_TABLES pXlatTables
, void *pPointer
,
763 unsigned char QueryType
, ULONG
*pRefId
);
764 RPCRTAPI
int RPC_ENTRY
765 NdrFullPointerQueryRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
,
766 unsigned char QueryType
, void **ppPointer
);
767 RPCRTAPI
void RPC_ENTRY
768 NdrFullPointerInsertRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
, void *pPointer
);
769 RPCRTAPI
int RPC_ENTRY
770 NdrFullPointerFree( PFULL_PTR_XLAT_TABLES pXlatTables
, void *Pointer
);
772 RPCRTAPI
void RPC_ENTRY
773 NdrRpcSsEnableAllocate( PMIDL_STUB_MESSAGE pMessage
);
774 RPCRTAPI
void RPC_ENTRY
775 NdrRpcSsDisableAllocate( PMIDL_STUB_MESSAGE pMessage
);
776 RPCRTAPI
void RPC_ENTRY
777 NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage
);
778 RPCRTAPI
void RPC_ENTRY
779 NdrRpcSmClientFree( void *NodeToFree
);
780 RPCRTAPI
void * RPC_ENTRY
781 NdrRpcSmClientAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrRpcSmClientFree
) __WINE_MALLOC
;
782 RPCRTAPI
void RPC_ENTRY
783 NdrRpcSsDefaultFree( void *NodeToFree
);
784 RPCRTAPI
void * RPC_ENTRY
785 NdrRpcSsDefaultAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrRpcSsDefaultFree
) __WINE_MALLOC
;
787 RPCRTAPI RPC_STATUS RPC_ENTRY
788 NdrGetUserMarshalInfo( ULONG
*pFlags
, ULONG InformationLevel
, NDR_USER_MARSHAL_INFO
*pMarshalInfo
);
793 #endif /*__WINE_RPCNDR_H */