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
34 #pragma warning(disable:4201)
35 #pragma warning(disable:4255)
36 #pragma warning(disable:4820)
40 # define CONST_VTBL const
47 #define EXTERN_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
48 EXTERN_C const GUID DECLSPEC_SELECTANY name DECLSPEC_HIDDEN; \
49 EXTERN_C const GUID DECLSPEC_SELECTANY name = \
50 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
52 #define EXTERN_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
53 EXTERN_C const GUID name
57 /* stupid #if can't handle casts... this __stupidity
58 is just a workaround for that limitation */
60 #define __NDR_CHAR_REP_MASK 0x000f
61 #define __NDR_INT_REP_MASK 0x00f0
62 #define __NDR_FLOAT_REP_MASK 0xff00
64 #define __NDR_IEEE_FLOAT 0x0000
65 #define __NDR_VAX_FLOAT 0x0100
66 #define __NDR_IBM_FLOAT 0x0300
68 #define __NDR_ASCII_CHAR 0x0000
69 #define __NDR_EBCDIC_CHAR 0x0001
71 #define __NDR_LITTLE_ENDIAN 0x0010
72 #define __NDR_BIG_ENDIAN 0x0000
74 /* Mac's are special */
75 #if defined(__RPC_MAC__)
76 # define __NDR_LOCAL_DATA_REPRESENTATION \
77 (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_BIG_ENDIAN)
79 # define __NDR_LOCAL_DATA_REPRESENTATION \
80 (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_LITTLE_ENDIAN)
83 #define __NDR_LOCAL_ENDIAN \
84 (__NDR_LOCAL_DATA_REPRESENTATION & __NDR_INT_REP_MASK)
86 /* for convenience, define NDR_LOCAL_IS_BIG_ENDIAN iff it is */
87 #if __NDR_LOCAL_ENDIAN == __NDR_BIG_ENDIAN
88 # define NDR_LOCAL_IS_BIG_ENDIAN
89 #elif __NDR_LOCAL_ENDIAN == __NDR_LITTLE_ENDIAN
90 # undef NDR_LOCAL_IS_BIG_ENDIAN
92 # error alien NDR_LOCAL_ENDIAN - Greg botched the defines again, please report
95 /* finally, do the casts like Microsoft */
97 #define NDR_CHAR_REP_MASK ((ULONG) __NDR_CHAR_REP_MASK)
98 #define NDR_INT_REP_MASK ((ULONG) __NDR_INT_REP_MASK)
99 #define NDR_FLOAT_REP_MASK ((ULONG) __NDR_FLOAT_REP_MASK)
100 #define NDR_IEEE_FLOAT ((ULONG) __NDR_IEEE_FLOAT)
101 #define NDR_VAX_FLOAT ((ULONG) __NDR_VAX_FLOAT)
102 #define NDR_IBM_FLOAT ((ULONG) __NDR_IBM_FLOAT)
103 #define NDR_ASCII_CHAR ((ULONG) __NDR_ASCII_CHAR)
104 #define NDR_EBCDIC_CHAR ((ULONG) __NDR_EBCDIC_CHAR)
105 #define NDR_LITTLE_ENDIAN ((ULONG) __NDR_LITTLE_ENDIAN)
106 #define NDR_BIG_ENDIAN ((ULONG) __NDR_BIG_ENDIAN)
107 #define NDR_LOCAL_DATA_REPRESENTATION ((ULONG) __NDR_LOCAL_DATA_REPRESENTATION)
108 #define NDR_LOCAL_ENDIAN ((ULONG) __NDR_LOCAL_ENDIAN)
111 #define TARGET_IS_NT50_OR_LATER 1
112 #define TARGET_IS_NT40_OR_LATER 1
113 #define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
116 typedef unsigned char byte
;
118 typedef UINT64 MIDL_uhyper
;
119 typedef unsigned char boolean
;
121 #define __RPC_CALLEE WINAPI
122 #define RPC_VAR_ENTRY __cdecl
123 #define NDR_SHAREABLE static
125 #define MIDL_ascii_strlen(s) strlen(s)
126 #define MIDL_ascii_strcpy(d,s) strcpy(d,s)
127 #define MIDL_memset(d,v,n) memset(d,v,n)
128 #define midl_user_free MIDL_user_free
129 #define midl_user_allocate MIDL_user_allocate
131 void * __RPC_USER
MIDL_user_allocate(SIZE_T
);
132 void __RPC_USER
MIDL_user_free(void *);
134 #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
135 #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
136 (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
138 #define RPC_BAD_STUB_DATA_EXCEPTION_FILTER \
139 ((RpcExceptionCode() == STATUS_ACCESS_VIOLATION) || \
140 (RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || \
141 (RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
142 (RpcExceptionCode() == RPC_S_INVALID_BOUND))
144 typedef struct tagNDR_SCONTEXT
150 #define NDRSContextValue(hContext) (&(hContext)->userContext)
151 #define cbNDRContext 20
153 typedef void (__RPC_USER
*NDR_RUNDOWN
)(void *context
);
154 typedef void (__RPC_USER
*NDR_NOTIFY_ROUTINE
)(void);
155 typedef void (__RPC_USER
*NDR_NOTIFY2_ROUTINE
)(boolean flag
);
157 #ifndef DECLSPEC_UUID
158 #if defined(_MSC_VER) && defined(__cplusplus)
159 #define DECLSPEC_UUID(x) __declspec(uuid(x))
161 #define DECLSPEC_UUID(x)
163 #endif /* DECLSPEC_UUID */
165 #define MIDL_INTERFACE(x) struct
167 struct _MIDL_STUB_MESSAGE
;
168 struct _MIDL_STUB_DESC
;
169 struct _FULL_PTR_XLAT_TABLES
;
170 struct NDR_ALLOC_ALL_NODES_CONTEXT
;
171 struct NDR_POINTER_QUEUE_STATE
;
173 typedef unsigned char *RPC_BUFPTR
;
174 typedef ULONG RPC_LENGTH
;
175 typedef void (__RPC_USER
*EXPR_EVAL
)(struct _MIDL_STUB_MESSAGE
*);
176 typedef const unsigned char *PFORMAT_STRING
;
181 ULONG
*BufferConformanceMark
;
182 ULONG
*BufferVarianceMark
;
183 ULONG
*MaxCountArray
;
185 ULONG
*ActualCountArray
;
186 } ARRAY_INFO
, *PARRAY_INFO
;
191 ULONG DesiredReceivingCodeset
;
195 typedef struct _NDR_PIPE_DESC
*PNDR_PIPE_DESC
;
196 typedef struct _NDR_PIPE_MESSAGE
*PNDR_PIPE_MESSAGE
;
197 typedef struct _NDR_ASYNC_MESSAGE
*PNDR_ASYNC_MESSAGE
;
198 typedef struct _NDR_CORRELATION_INFO
*PNDR_CORRELATION_INFO
;
200 typedef struct _MIDL_STUB_MESSAGE
203 unsigned char *Buffer
;
204 unsigned char *BufferStart
;
205 unsigned char *BufferEnd
;
206 unsigned char *BufferMark
;
209 unsigned char *Memory
;
210 unsigned char IsClient
;
212 unsigned short uFlags2
;
214 struct NDR_ALLOC_ALL_NODES_CONTEXT
*pAllocAllNodesContext
;
215 struct NDR_POINTER_QUEUE_STATE
*pPointerQueueState
;
216 int IgnoreEmbeddedPointers
;
217 unsigned char *PointerBufferMark
;
218 unsigned char CorrDespIncrement
;
219 unsigned char uFlags
;
220 unsigned short UniquePtrCount
;
224 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
225 void (__RPC_API
*pfnFree
)(void *);
226 unsigned char *StackTop
;
227 unsigned char *pPresentedType
;
228 unsigned char *pTransmitType
;
229 handle_t SavedHandle
;
230 const struct _MIDL_STUB_DESC
*StubDesc
;
231 struct _FULL_PTR_XLAT_TABLES
*FullPtrXlatTables
;
234 unsigned int fInDontFree
:1;
235 unsigned int fDontCallFreeInst
:1;
236 unsigned int fInOnlyParam
:1;
237 unsigned int fHasReturn
:1;
238 unsigned int fHasExtensions
:1;
239 unsigned int fHasNewCorrDesc
:1;
240 unsigned int fIsIn
:1;
241 unsigned int fIsOut
:1;
242 unsigned int fIsOicf
:1;
243 unsigned int fBufferValid
:1;
244 unsigned int fHasMemoryValidateCallback
:1;
245 unsigned int fInFree
:1;
246 unsigned int fNeedMCCP
:1;
251 NDR_SCONTEXT
*SavedContextHandles
;
253 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
254 PARRAY_INFO pArrayInfo
;
255 ULONG
*SizePtrCountArray
;
256 ULONG
*SizePtrOffsetArray
;
257 ULONG
*SizePtrLengthArray
;
261 PNDR_ASYNC_MESSAGE pAsyncMsg
;
262 PNDR_CORRELATION_INFO pCorrInfo
;
263 unsigned char *pCorrMemory
;
265 CS_STUB_INFO
*pCSInfo
;
266 unsigned char *ConformanceMark
;
267 unsigned char *VarianceMark
;
268 INT_PTR Unused
; /* BackingStoreLowMark on IA64 */
269 struct _NDR_PROC_CONTEXT
*pContext
;
270 void* ContextHandleHash
;
271 void* pUserMarshalList
;
272 INT_PTR Reserved51_3
;
273 INT_PTR Reserved51_4
;
274 INT_PTR Reserved51_5
;
275 } MIDL_STUB_MESSAGE
, *PMIDL_STUB_MESSAGE
;
277 typedef void * (__RPC_API
* GENERIC_BINDING_ROUTINE
)(void *);
278 typedef void (__RPC_API
* GENERIC_UNBIND_ROUTINE
)(void *, unsigned char *);
280 typedef struct _GENERIC_BINDING_ROUTINE_PAIR
282 GENERIC_BINDING_ROUTINE pfnBind
;
283 GENERIC_UNBIND_ROUTINE pfnUnbind
;
284 } GENERIC_BINDING_ROUTINE_PAIR
, *PGENERIC_BINDING_ROUTINE_PAIR
;
286 typedef struct __GENERIC_BINDING_INFO
290 GENERIC_BINDING_ROUTINE pfnBind
;
291 GENERIC_UNBIND_ROUTINE pfnUnbind
;
292 } GENERIC_BINDING_INFO
, *PGENERIC_BINDING_INFO
;
294 typedef void (__RPC_USER
*XMIT_HELPER_ROUTINE
)(PMIDL_STUB_MESSAGE
);
296 typedef struct _XMIT_ROUTINE_QUINTUPLE
298 XMIT_HELPER_ROUTINE pfnTranslateToXmit
;
299 XMIT_HELPER_ROUTINE pfnTranslateFromXmit
;
300 XMIT_HELPER_ROUTINE pfnFreeXmit
;
301 XMIT_HELPER_ROUTINE pfnFreeInst
;
302 } XMIT_ROUTINE_QUINTUPLE
, *PXMIT_ROUTINE_QUINTUPLE
;
304 typedef ULONG (__RPC_USER
*USER_MARSHAL_SIZING_ROUTINE
)(ULONG
*, ULONG
, void *);
305 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_MARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
306 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_UNMARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
307 typedef void (__RPC_USER
*USER_MARSHAL_FREEING_ROUTINE
)(ULONG
*, void *);
309 typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
311 USER_MARSHAL_SIZING_ROUTINE pfnBufferSize
;
312 USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall
;
313 USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall
;
314 USER_MARSHAL_FREEING_ROUTINE pfnFree
;
315 } USER_MARSHAL_ROUTINE_QUADRUPLE
;
318 #define USER_MARSHAL_CB_SIGNATURE \
319 ( ( (DWORD)'U' << 24 ) | ( (DWORD)'S' << 16 ) | \
320 ( (DWORD)'R' << 8 ) | ( (DWORD)'C' ) )
324 USER_MARSHAL_CB_BUFFER_SIZE
,
325 USER_MARSHAL_CB_MARSHALL
,
326 USER_MARSHAL_CB_UNMARSHALL
,
328 } USER_MARSHAL_CB_TYPE
;
330 typedef struct _USER_MARSHAL_CB
333 PMIDL_STUB_MESSAGE pStubMsg
;
334 PFORMAT_STRING pReserve
;
336 USER_MARSHAL_CB_TYPE CBType
;
337 PFORMAT_STRING pFormat
;
338 PFORMAT_STRING pTypeFormat
;
341 #define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
342 #define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
343 #define GET_USER_DATA_REP(f) HIWORD(f)
345 #define USER_CALL_IS_ASYNC 0x0100
346 #define USER_CALL_NEW_CORRELATION_DESC 0x0200
348 typedef struct _MALLOC_FREE_STRUCT
350 void * (__WINE_ALLOC_SIZE(1) __RPC_USER
*pfnAllocate
)(SIZE_T
);
351 void (__RPC_USER
*pfnFree
)(void *);
352 } MALLOC_FREE_STRUCT
;
354 typedef struct _COMM_FAULT_OFFSETS
358 } COMM_FAULT_OFFSETS
;
360 typedef struct _MIDL_STUB_DESC
362 void *RpcInterfaceInformation
;
363 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
364 void (__RPC_API
*pfnFree
)(void *);
366 handle_t
*pAutoHandle
;
367 handle_t
*pPrimitiveHandle
;
368 PGENERIC_BINDING_INFO pGenericBindingInfo
;
369 } IMPLICIT_HANDLE_INFO
;
370 const NDR_RUNDOWN
*apfnNdrRundownRoutines
;
371 const GENERIC_BINDING_ROUTINE_PAIR
*aGenericBindingRoutinePairs
;
372 const EXPR_EVAL
*apfnExprEval
;
373 const XMIT_ROUTINE_QUINTUPLE
*aXmitQuintuple
;
374 const unsigned char *pFormatTypes
;
377 MALLOC_FREE_STRUCT
*pMallocFreeStruct
;
379 const COMM_FAULT_OFFSETS
*CommFaultOffsets
;
380 const USER_MARSHAL_ROUTINE_QUADRUPLE
*aUserMarshalQuadruple
;
381 const NDR_NOTIFY_ROUTINE
*NotifyRoutineTable
;
387 typedef const MIDL_STUB_DESC
*PMIDL_STUB_DESC
;
389 typedef struct _MIDL_FORMAT_STRING
392 #if defined(__GNUC__)
393 unsigned char Format
[0];
395 unsigned char Format
[1];
397 } MIDL_FORMAT_STRING
;
399 typedef struct _MIDL_SYNTAX_INFO
401 RPC_SYNTAX_IDENTIFIER TransferSyntax
;
402 RPC_DISPATCH_TABLE
* DispatchTable
;
403 PFORMAT_STRING ProcString
;
404 const unsigned short* FmtStringOffset
;
405 PFORMAT_STRING TypeString
;
406 const void* aUserMarshalQuadruple
;
407 ULONG_PTR pReserved1
;
408 ULONG_PTR pReserved2
;
409 } MIDL_SYNTAX_INFO
, *PMIDL_SYNTAX_INFO
;
411 typedef void (__RPC_API
*STUB_THUNK
)( PMIDL_STUB_MESSAGE
);
413 #ifdef WINE_STRICT_PROTOTYPES
414 typedef LONG (__RPC_API
*SERVER_ROUTINE
)(void);
416 typedef LONG (__RPC_API
*SERVER_ROUTINE
)();
419 typedef struct _MIDL_SERVER_INFO_
421 PMIDL_STUB_DESC pStubDesc
;
422 const SERVER_ROUTINE
*DispatchTable
;
423 PFORMAT_STRING ProcString
;
424 const unsigned short *FmtStringOffset
;
425 const STUB_THUNK
*ThunkTable
;
426 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
428 PMIDL_SYNTAX_INFO pSyntaxInfo
;
429 } MIDL_SERVER_INFO
, *PMIDL_SERVER_INFO
;
431 typedef struct _MIDL_STUBLESS_PROXY_INFO
433 PMIDL_STUB_DESC pStubDesc
;
434 PFORMAT_STRING ProcFormatString
;
435 const unsigned short *FormatStringOffset
;
436 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
438 PMIDL_SYNTAX_INFO pSyntaxInfo
;
439 } MIDL_STUBLESS_PROXY_INFO
, *PMIDL_STUBLESS_PROXY_INFO
;
441 typedef union _CLIENT_CALL_RETURN
445 } CLIENT_CALL_RETURN
;
451 STUB_CALL_SERVER_NO_HRESULT
467 typedef struct _FULL_PTR_TO_REFID_ELEMENT
{
468 struct _FULL_PTR_TO_REFID_ELEMENT
*Next
;
472 } FULL_PTR_TO_REFID_ELEMENT
, *PFULL_PTR_TO_REFID_ELEMENT
;
474 /* Full pointer translation tables */
475 typedef struct _FULL_PTR_XLAT_TABLES
{
478 unsigned char *StateTable
;
479 ULONG NumberOfEntries
;
483 PFULL_PTR_TO_REFID_ELEMENT
*XlatTable
;
484 ULONG NumberOfBuckets
;
490 } FULL_PTR_XLAT_TABLES
, *PFULL_PTR_XLAT_TABLES
;
492 struct IRpcStubBuffer
;
494 typedef ULONG error_status_t
;
495 typedef void * NDR_CCONTEXT
;
497 typedef struct _SCONTEXT_QUEUE
{
498 ULONG NumberOfObjects
;
499 NDR_SCONTEXT
*ArrayOfObjects
;
500 } SCONTEXT_QUEUE
, *PSCONTEXT_QUEUE
;
502 typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
506 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
507 void (__RPC_API
*pfnFree
)(void *);
508 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
509 ULONG_PTR Reserved
[5];
510 } NDR_USER_MARSHAL_INFO_LEVEL1
;
512 typedef struct _NDR_USER_MARSHAL_INFO
514 ULONG InformationLevel
;
517 NDR_USER_MARSHAL_INFO_LEVEL1 Level1
;
519 } NDR_USER_MARSHAL_INFO
;
521 /* Context Handles */
523 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
524 NDRCContextBinding( NDR_CCONTEXT CContext
);
526 RPCRTAPI
void RPC_ENTRY
527 NDRCContextMarshall( NDR_CCONTEXT CContext
, void *pBuff
);
529 RPCRTAPI
void RPC_ENTRY
530 NDRCContextUnmarshall( NDR_CCONTEXT
*pCContext
, RPC_BINDING_HANDLE hBinding
,
531 void *pBuff
, ULONG DataRepresentation
);
533 RPCRTAPI
void RPC_ENTRY
534 NDRSContextMarshall( NDR_SCONTEXT CContext
, void *pBuff
, NDR_RUNDOWN userRunDownIn
);
536 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
537 NDRSContextUnmarshall( void *pBuff
, ULONG DataRepresentation
);
539 RPCRTAPI
void RPC_ENTRY
540 NDRSContextMarshallEx( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
541 void *pBuff
, NDR_RUNDOWN userRunDownIn
);
543 RPCRTAPI
void RPC_ENTRY
544 NDRSContextMarshall2( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
545 void *pBuff
, NDR_RUNDOWN userRunDownIn
, void * CtxGuard
,
548 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
549 NDRSContextUnmarshallEx( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
550 ULONG DataRepresentation
);
552 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
553 NDRSContextUnmarshall2( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
554 ULONG DataRepresentation
, void *CtxGuard
,
557 RPCRTAPI
void RPC_ENTRY
558 NdrClientContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT ContextHandle
, int fCheck
);
560 RPCRTAPI
void RPC_ENTRY
561 NdrClientContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT
* pContextHandle
,
562 RPC_BINDING_HANDLE BindHandle
);
564 RPCRTAPI
void RPC_ENTRY
565 NdrServerContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
, NDR_RUNDOWN RundownRoutine
);
567 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
568 NdrServerContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
);
570 RPCRTAPI
void RPC_ENTRY
571 NdrContextHandleSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
573 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
574 NdrContextHandleInitialize( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
576 RPCRTAPI
void RPC_ENTRY
577 NdrServerContextNewMarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
,
578 NDR_RUNDOWN RundownRoutine
, PFORMAT_STRING pFormat
);
580 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
581 NdrServerContextNewUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
583 RPCRTAPI RPC_STATUS RPC_ENTRY
584 RpcSmDestroyClientContext( void **ContextHandle
);
586 RPCRTAPI
void RPC_ENTRY
587 RpcSsDestroyClientContext( void **ContextHandle
);
589 RPCRTAPI
void RPC_ENTRY
590 NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
591 RPCRTAPI
void RPC_ENTRY
592 NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
594 RPCRTAPI
unsigned char* RPC_ENTRY
595 NdrByteCountPointerMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
596 RPCRTAPI
unsigned char* RPC_ENTRY
597 NdrByteCountPointerUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
598 RPCRTAPI
void RPC_ENTRY
599 NdrByteCountPointerBufferSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
600 RPCRTAPI
void RPC_ENTRY
601 NdrByteCountPointerFree( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
603 RPCRTAPI
unsigned char* RPC_ENTRY
604 NdrRangeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
606 /* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
607 #define SIMPLE_TYPE_MARSHAL(type) \
608 RPCRTAPI unsigned char* RPC_ENTRY \
609 Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
610 RPCRTAPI unsigned char* RPC_ENTRY \
611 Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
612 RPCRTAPI void RPC_ENTRY \
613 Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
614 RPCRTAPI ULONG RPC_ENTRY \
615 Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
617 #define TYPE_MARSHAL(type) \
618 SIMPLE_TYPE_MARSHAL(type) \
619 RPCRTAPI void RPC_ENTRY \
620 Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
622 TYPE_MARSHAL(Pointer
)
623 TYPE_MARSHAL(SimpleStruct
)
624 TYPE_MARSHAL(ConformantStruct
)
625 TYPE_MARSHAL(ConformantVaryingStruct
)
626 TYPE_MARSHAL(ComplexStruct
)
627 TYPE_MARSHAL(FixedArray
)
628 TYPE_MARSHAL(ConformantArray
)
629 TYPE_MARSHAL(ConformantVaryingArray
)
630 TYPE_MARSHAL(VaryingArray
)
631 TYPE_MARSHAL(ComplexArray
)
632 TYPE_MARSHAL(EncapsulatedUnion
)
633 TYPE_MARSHAL(NonEncapsulatedUnion
)
634 TYPE_MARSHAL(XmitOrRepAs
)
635 TYPE_MARSHAL(UserMarshal
)
636 TYPE_MARSHAL(InterfacePointer
)
638 SIMPLE_TYPE_MARSHAL(ConformantString
)
639 SIMPLE_TYPE_MARSHAL(NonConformantString
)
642 #undef SIMPLE_TYPE_MARSHAL
644 RPCRTAPI
void RPC_ENTRY
645 NdrCorrelationInitialize( PMIDL_STUB_MESSAGE pStubMsg
, void *pMemory
, ULONG CacheSize
, ULONG flags
);
646 RPCRTAPI
void RPC_ENTRY
647 NdrCorrelationPass( PMIDL_STUB_MESSAGE pStubMsg
);
648 RPCRTAPI
void RPC_ENTRY
649 NdrCorrelationFree( PMIDL_STUB_MESSAGE pStubMsg
);
651 RPCRTAPI
void RPC_ENTRY
652 NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, LONG NumberParams
);
653 RPCRTAPI
void RPC_ENTRY
654 NdrConvert( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
656 #define USER_MARSHAL_FC_BYTE 1
657 #define USER_MARSHAL_FC_CHAR 2
658 #define USER_MARSHAL_FC_SMALL 3
659 #define USER_MARSHAL_FC_USMALL 4
660 #define USER_MARSHAL_FC_WCHAR 5
661 #define USER_MARSHAL_FC_SHORT 6
662 #define USER_MARSHAL_FC_USHORT 7
663 #define USER_MARSHAL_FC_LONG 8
664 #define USER_MARSHAL_FC_ULONG 9
665 #define USER_MARSHAL_FC_FLOAT 10
666 #define USER_MARSHAL_FC_HYPER 11
667 #define USER_MARSHAL_FC_DOUBLE 12
669 RPCRTAPI
unsigned char* RPC_ENTRY
670 NdrUserMarshalSimpleTypeConvert( ULONG
*pFlags
, unsigned char *pBuffer
, unsigned char FormatChar
);
672 CLIENT_CALL_RETURN RPC_VAR_ENTRY
673 NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
674 CLIENT_CALL_RETURN RPC_VAR_ENTRY
675 NdrClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
676 CLIENT_CALL_RETURN RPC_VAR_ENTRY
677 NdrAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
678 CLIENT_CALL_RETURN RPC_VAR_ENTRY
679 NdrDcomAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
681 RPCRTAPI
void RPC_ENTRY
682 NdrServerCall2( PRPC_MESSAGE pRpcMsg
);
683 RPCRTAPI
void RPC_ENTRY
684 NdrServerCall( PRPC_MESSAGE pRpcMsg
);
685 RPCRTAPI
void RPC_ENTRY
686 NdrAsyncServerCall( PRPC_MESSAGE pRpcMsg
);
688 RPCRTAPI LONG RPC_ENTRY
689 NdrStubCall2( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
690 RPCRTAPI LONG RPC_ENTRY
691 NdrStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
692 RPCRTAPI LONG RPC_ENTRY
693 NdrAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
694 RPCRTAPI LONG RPC_ENTRY
695 NdrDcomAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
697 RPCRTAPI
void* RPC_ENTRY
698 NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg
, SIZE_T Len
) __WINE_ALLOC_SIZE(2);
700 RPCRTAPI
void RPC_ENTRY
701 NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, void *ArgAddr
);
703 RPCRTAPI RPC_STATUS RPC_ENTRY
704 NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg
, ULONG
*pCommStatus
,
705 ULONG
*pFaultStatus
, RPC_STATUS Status_
);
707 RPCRTAPI
void* RPC_ENTRY
708 NdrOleAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1);
709 RPCRTAPI
void RPC_ENTRY
710 NdrOleFree( void* NodeToFree
);
712 RPCRTAPI
void RPC_ENTRY
713 NdrClientInitialize( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
714 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
715 RPCRTAPI
void RPC_ENTRY
716 NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
717 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
718 RPCRTAPI
unsigned char* RPC_ENTRY
719 NdrServerInitialize( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
720 RPCRTAPI
unsigned char* RPC_ENTRY
721 NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
722 RPCRTAPI
unsigned char* RPC_ENTRY
723 NdrServerInitializeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
, PRPC_MESSAGE pRpcMsg
);
724 RPCRTAPI
void RPC_ENTRY
725 NdrServerInitializeMarshall( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
);
726 RPCRTAPI
void RPC_ENTRY
727 NdrServerMarshall( struct IRpcStubBuffer
*pThis
, struct IRpcChannelBuffer
*pChannel
, PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
728 RPCRTAPI
void RPC_ENTRY
729 NdrServerUnmarshall( struct IRpcChannelBuffer
*pChannel
, PRPC_MESSAGE pRpcMsg
,
730 PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
,
731 PFORMAT_STRING pFormat
, void *pParamList
);
732 RPCRTAPI
unsigned char* RPC_ENTRY
733 NdrGetBuffer( PMIDL_STUB_MESSAGE stubmsg
, ULONG buflen
, RPC_BINDING_HANDLE handle
);
734 RPCRTAPI
void RPC_ENTRY
735 NdrFreeBuffer( PMIDL_STUB_MESSAGE pStubMsg
);
736 RPCRTAPI
unsigned char* RPC_ENTRY
737 NdrSendReceive( PMIDL_STUB_MESSAGE stubmsg
, unsigned char *buffer
);
739 RPCRTAPI
unsigned char * RPC_ENTRY
740 NdrNsGetBuffer( PMIDL_STUB_MESSAGE pStubMsg
, ULONG BufferLength
, RPC_BINDING_HANDLE Handle
);
741 RPCRTAPI
unsigned char * RPC_ENTRY
742 NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char *pBufferEnd
, RPC_BINDING_HANDLE
*pAutoHandle
);
744 RPCRTAPI RPC_STATUS RPC_ENTRY
745 NdrGetDcomProtocolVersion( PMIDL_STUB_MESSAGE pStubMsg
, RPC_VERSION
*pVersion
);
747 RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY
748 NdrFullPointerXlatInit( ULONG NumberOfPointers
, XLAT_SIDE XlatSide
);
749 RPCRTAPI
void RPC_ENTRY
750 NdrFullPointerXlatFree( PFULL_PTR_XLAT_TABLES pXlatTables
);
751 RPCRTAPI
int RPC_ENTRY
752 NdrFullPointerQueryPointer( PFULL_PTR_XLAT_TABLES pXlatTables
, void *pPointer
,
753 unsigned char QueryType
, ULONG
*pRefId
);
754 RPCRTAPI
int RPC_ENTRY
755 NdrFullPointerQueryRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
,
756 unsigned char QueryType
, void **ppPointer
);
757 RPCRTAPI
void RPC_ENTRY
758 NdrFullPointerInsertRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
, void *pPointer
);
759 RPCRTAPI
int RPC_ENTRY
760 NdrFullPointerFree( PFULL_PTR_XLAT_TABLES pXlatTables
, void *Pointer
);
762 RPCRTAPI
void RPC_ENTRY
763 NdrRpcSsEnableAllocate( PMIDL_STUB_MESSAGE pMessage
);
764 RPCRTAPI
void RPC_ENTRY
765 NdrRpcSsDisableAllocate( PMIDL_STUB_MESSAGE pMessage
);
766 RPCRTAPI
void RPC_ENTRY
767 NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage
);
768 RPCRTAPI
void * RPC_ENTRY
769 NdrRpcSmClientAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1);
770 RPCRTAPI
void RPC_ENTRY
771 NdrRpcSmClientFree( void *NodeToFree
);
772 RPCRTAPI
void * RPC_ENTRY
773 NdrRpcSsDefaultAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1);
774 RPCRTAPI
void RPC_ENTRY
775 NdrRpcSsDefaultFree( void *NodeToFree
);
777 RPCRTAPI RPC_STATUS RPC_ENTRY
778 NdrGetUserMarshalInfo( ULONG
*pFlags
, ULONG InformationLevel
, NDR_USER_MARSHAL_INFO
*pMarshalInfo
);
787 #endif /*__WINE_RPCNDR_H */