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
45 /* stupid #if can't handle casts... this __stupidity
46 is just a workaround for that limitation */
48 #define __NDR_CHAR_REP_MASK 0x000fL
49 #define __NDR_INT_REP_MASK 0x00f0L
50 #define __NDR_FLOAT_REP_MASK 0xff00L
52 #define __NDR_IEEE_FLOAT 0x0000L
53 #define __NDR_VAX_FLOAT 0x0100L
54 #define __NDR_IBM_FLOAT 0x0300L
56 #define __NDR_ASCII_CHAR 0x0000L
57 #define __NDR_EBCDIC_CHAR 0x0001L
59 #define __NDR_LITTLE_ENDIAN 0x0010L
60 #define __NDR_BIG_ENDIAN 0x0000L
62 /* Mac's are special */
63 #if defined(__RPC_MAC__)
64 # define __NDR_LOCAL_DATA_REPRESENTATION \
65 (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_BIG_ENDIAN)
67 # define __NDR_LOCAL_DATA_REPRESENTATION \
68 (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_LITTLE_ENDIAN)
71 #define __NDR_LOCAL_ENDIAN \
72 (__NDR_LOCAL_DATA_REPRESENTATION & __NDR_INT_REP_MASK)
74 /* for convenience, define NDR_LOCAL_IS_BIG_ENDIAN iff it is */
75 #if __NDR_LOCAL_ENDIAN == __NDR_BIG_ENDIAN
76 # define NDR_LOCAL_IS_BIG_ENDIAN
77 #elif __NDR_LOCAL_ENDIAN == __NDR_LITTLE_ENDIAN
78 # undef NDR_LOCAL_IS_BIG_ENDIAN
80 # error alien NDR_LOCAL_ENDIAN - Greg botched the defines again, please report
83 /* finally, do the casts like Microsoft */
85 #define NDR_CHAR_REP_MASK ((ULONG) __NDR_CHAR_REP_MASK)
86 #define NDR_INT_REP_MASK ((ULONG) __NDR_INT_REP_MASK)
87 #define NDR_FLOAT_REP_MASK ((ULONG) __NDR_FLOAT_REP_MASK)
88 #define NDR_IEEE_FLOAT ((ULONG) __NDR_IEEE_FLOAT)
89 #define NDR_VAX_FLOAT ((ULONG) __NDR_VAX_FLOAT)
90 #define NDR_IBM_FLOAT ((ULONG) __NDR_IBM_FLOAT)
91 #define NDR_ASCII_CHAR ((ULONG) __NDR_ASCII_CHAR)
92 #define NDR_EBCDIC_CHAR ((ULONG) __NDR_EBCDIC_CHAR)
93 #define NDR_LITTLE_ENDIAN ((ULONG) __NDR_LITTLE_ENDIAN)
94 #define NDR_BIG_ENDIAN ((ULONG) __NDR_BIG_ENDIAN)
95 #define NDR_LOCAL_DATA_REPRESENTATION ((ULONG) __NDR_LOCAL_DATA_REPRESENTATION)
96 #define NDR_LOCAL_ENDIAN ((ULONG) __NDR_LOCAL_ENDIAN)
99 #define TARGET_IS_NT50_OR_LATER 1
100 #define TARGET_IS_NT40_OR_LATER 1
101 #define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
104 typedef unsigned char byte
;
106 typedef UINT64 MIDL_uhyper
;
107 typedef unsigned char boolean
;
109 #define __RPC_CALLEE WINAPI
110 #define RPC_VAR_ENTRY __cdecl
111 #define NDR_SHAREABLE static
113 #define MIDL_ascii_strlen(s) strlen(s)
114 #define MIDL_ascii_strcpy(d,s) strcpy(d,s)
115 #define MIDL_memset(d,v,n) memset(d,v,n)
116 #define midl_user_free MIDL_user_free
117 #define midl_user_allocate MIDL_user_allocate
119 void * __RPC_USER
MIDL_user_allocate(SIZE_T
);
120 void __RPC_USER
MIDL_user_free(void *);
122 #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
123 #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
124 (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
126 #define RPC_BAD_STUB_DATA_EXCEPTION_FILTER \
127 ((RpcExceptionCode() == STATUS_ACCESS_VIOLATION) || \
128 (RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || \
129 (RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
130 (RpcExceptionCode() == RPC_S_INVALID_BOUND))
132 typedef struct tagNDR_SCONTEXT
138 #define NDRSContextValue(hContext) (&(hContext)->userContext)
139 #define cbNDRContext 20
141 typedef void (__RPC_USER
*NDR_RUNDOWN
)(void *context
);
142 typedef void (__RPC_USER
*NDR_NOTIFY_ROUTINE
)(void);
143 typedef void (__RPC_USER
*NDR_NOTIFY2_ROUTINE
)(boolean flag
);
145 #define DECLSPEC_UUID(x)
146 #define MIDL_INTERFACE(x) struct
148 struct _MIDL_STUB_MESSAGE
;
149 struct _MIDL_STUB_DESC
;
150 struct _FULL_PTR_XLAT_TABLES
;
151 struct NDR_ALLOC_ALL_NODES_CONTEXT
;
152 struct NDR_POINTER_QUEUE_STATE
;
154 typedef unsigned char *RPC_BUFPTR
;
155 typedef ULONG RPC_LENGTH
;
156 typedef void (__RPC_USER
*EXPR_EVAL
)(struct _MIDL_STUB_MESSAGE
*);
157 typedef const unsigned char *PFORMAT_STRING
;
162 ULONG
*BufferConformanceMark
;
163 ULONG
*BufferVarianceMark
;
164 ULONG
*MaxCountArray
;
166 ULONG
*ActualCountArray
;
167 } ARRAY_INFO
, *PARRAY_INFO
;
172 ULONG DesiredReceivingCodeset
;
176 typedef struct _NDR_PIPE_DESC
*PNDR_PIPE_DESC
;
177 typedef struct _NDR_PIPE_MESSAGE
*PNDR_PIPE_MESSAGE
;
178 typedef struct _NDR_ASYNC_MESSAGE
*PNDR_ASYNC_MESSAGE
;
179 typedef struct _NDR_CORRELATION_INFO
*PNDR_CORRELATION_INFO
;
181 typedef struct _MIDL_STUB_MESSAGE
184 unsigned char *Buffer
;
185 unsigned char *BufferStart
;
186 unsigned char *BufferEnd
;
187 unsigned char *BufferMark
;
190 unsigned char *Memory
;
191 unsigned char IsClient
;
193 unsigned short uFlags2
;
195 struct NDR_ALLOC_ALL_NODES_CONTEXT
*pAllocAllNodesContext
;
196 struct NDR_POINTER_QUEUE_STATE
*pPointerQueueState
;
197 int IgnoreEmbeddedPointers
;
198 unsigned char *PointerBufferMark
;
199 unsigned char CorrDespIncrement
;
200 unsigned char uFlags
;
201 unsigned short UniquePtrCount
;
205 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
206 void (__RPC_API
*pfnFree
)(void *);
207 unsigned char *StackTop
;
208 unsigned char *pPresentedType
;
209 unsigned char *pTransmitType
;
210 handle_t SavedHandle
;
211 const struct _MIDL_STUB_DESC
*StubDesc
;
212 struct _FULL_PTR_XLAT_TABLES
*FullPtrXlatTables
;
215 unsigned int fInDontFree
:1;
216 unsigned int fDontCallFreeInst
:1;
217 unsigned int fInOnlyParam
:1;
218 unsigned int fHasReturn
:1;
219 unsigned int fHasExtensions
:1;
220 unsigned int fHasNewCorrDesc
:1;
221 unsigned int fIsIn
:1;
222 unsigned int fIsOut
:1;
223 unsigned int fIsOicf
:1;
224 unsigned int fBufferValid
:1;
225 unsigned int fHasMemoryValidateCallback
:1;
226 unsigned int fInFree
:1;
227 unsigned int fNeedMCCP
:1;
232 NDR_SCONTEXT
*SavedContextHandles
;
234 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
235 PARRAY_INFO pArrayInfo
;
236 ULONG
*SizePtrCountArray
;
237 ULONG
*SizePtrOffsetArray
;
238 ULONG
*SizePtrLengthArray
;
242 PNDR_ASYNC_MESSAGE pAsyncMsg
;
243 PNDR_CORRELATION_INFO pCorrInfo
;
244 unsigned char *pCorrMemory
;
246 CS_STUB_INFO
*pCSInfo
;
247 unsigned char *ConformanceMark
;
248 unsigned char *VarianceMark
;
249 INT_PTR Unused
; /* BackingStoreLowMark on IA64 */
250 struct _NDR_PROC_CONTEXT
*pContext
;
251 void* ContextHandleHash
;
252 void* pUserMarshalList
;
253 INT_PTR Reserved51_3
;
254 INT_PTR Reserved51_4
;
255 INT_PTR Reserved51_5
;
256 } MIDL_STUB_MESSAGE
, *PMIDL_STUB_MESSAGE
;
258 typedef void * (__RPC_API
* GENERIC_BINDING_ROUTINE
)(void *);
259 typedef void (__RPC_API
* GENERIC_UNBIND_ROUTINE
)(void *, unsigned char *);
261 typedef struct _GENERIC_BINDING_ROUTINE_PAIR
263 GENERIC_BINDING_ROUTINE pfnBind
;
264 GENERIC_UNBIND_ROUTINE pfnUnbind
;
265 } GENERIC_BINDING_ROUTINE_PAIR
, *PGENERIC_BINDING_ROUTINE_PAIR
;
267 typedef struct __GENERIC_BINDING_INFO
271 GENERIC_BINDING_ROUTINE pfnBind
;
272 GENERIC_UNBIND_ROUTINE pfnUnbind
;
273 } GENERIC_BINDING_INFO
, *PGENERIC_BINDING_INFO
;
275 typedef void (__RPC_USER
*XMIT_HELPER_ROUTINE
)(PMIDL_STUB_MESSAGE
);
277 typedef struct _XMIT_ROUTINE_QUINTUPLE
279 XMIT_HELPER_ROUTINE pfnTranslateToXmit
;
280 XMIT_HELPER_ROUTINE pfnTranslateFromXmit
;
281 XMIT_HELPER_ROUTINE pfnFreeXmit
;
282 XMIT_HELPER_ROUTINE pfnFreeInst
;
283 } XMIT_ROUTINE_QUINTUPLE
, *PXMIT_ROUTINE_QUINTUPLE
;
285 typedef ULONG (__RPC_USER
*USER_MARSHAL_SIZING_ROUTINE
)(ULONG
*, ULONG
, void *);
286 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_MARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
287 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_UNMARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
288 typedef void (__RPC_USER
*USER_MARSHAL_FREEING_ROUTINE
)(ULONG
*, void *);
290 typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
292 USER_MARSHAL_SIZING_ROUTINE pfnBufferSize
;
293 USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall
;
294 USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall
;
295 USER_MARSHAL_FREEING_ROUTINE pfnFree
;
296 } USER_MARSHAL_ROUTINE_QUADRUPLE
;
299 #define USER_MARSHAL_CB_SIGNATURE \
300 ( ( (DWORD)'U' << 24 ) | ( (DWORD)'S' << 16 ) | \
301 ( (DWORD)'R' << 8 ) | ( (DWORD)'C' ) )
305 USER_MARSHAL_CB_BUFFER_SIZE
,
306 USER_MARSHAL_CB_MARSHALL
,
307 USER_MARSHAL_CB_UNMARSHALL
,
309 } USER_MARSHAL_CB_TYPE
;
311 typedef struct _USER_MARSHAL_CB
314 PMIDL_STUB_MESSAGE pStubMsg
;
315 PFORMAT_STRING pReserve
;
317 USER_MARSHAL_CB_TYPE CBType
;
318 PFORMAT_STRING pFormat
;
319 PFORMAT_STRING pTypeFormat
;
322 #define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
323 #define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
324 #define GET_USER_DATA_REP(f) HIWORD(f)
326 #define USER_CALL_IS_ASYNC 0x0100
327 #define USER_CALL_NEW_CORRELATION_DESC 0x0200
329 typedef struct _MALLOC_FREE_STRUCT
331 void * (__WINE_ALLOC_SIZE(1) __RPC_USER
*pfnAllocate
)(SIZE_T
);
332 void (__RPC_USER
*pfnFree
)(void *);
333 } MALLOC_FREE_STRUCT
;
335 typedef struct _COMM_FAULT_OFFSETS
339 } COMM_FAULT_OFFSETS
;
341 typedef struct _MIDL_STUB_DESC
343 void *RpcInterfaceInformation
;
344 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
345 void (__RPC_API
*pfnFree
)(void *);
347 handle_t
*pAutoHandle
;
348 handle_t
*pPrimitiveHandle
;
349 PGENERIC_BINDING_INFO pGenericBindingInfo
;
350 } IMPLICIT_HANDLE_INFO
;
351 const NDR_RUNDOWN
*apfnNdrRundownRoutines
;
352 const GENERIC_BINDING_ROUTINE_PAIR
*aGenericBindingRoutinePairs
;
353 const EXPR_EVAL
*apfnExprEval
;
354 const XMIT_ROUTINE_QUINTUPLE
*aXmitQuintuple
;
355 const unsigned char *pFormatTypes
;
358 MALLOC_FREE_STRUCT
*pMallocFreeStruct
;
360 const COMM_FAULT_OFFSETS
*CommFaultOffsets
;
361 const USER_MARSHAL_ROUTINE_QUADRUPLE
*aUserMarshalQuadruple
;
362 const NDR_NOTIFY_ROUTINE
*NotifyRoutineTable
;
368 typedef const MIDL_STUB_DESC
*PMIDL_STUB_DESC
;
370 typedef struct _MIDL_FORMAT_STRING
373 #if defined(__GNUC__)
374 unsigned char Format
[0];
376 unsigned char Format
[1];
378 } MIDL_FORMAT_STRING
;
380 typedef struct _MIDL_SYNTAX_INFO
382 RPC_SYNTAX_IDENTIFIER TransferSyntax
;
383 RPC_DISPATCH_TABLE
* DispatchTable
;
384 PFORMAT_STRING ProcString
;
385 const unsigned short* FmtStringOffset
;
386 PFORMAT_STRING TypeString
;
387 const void* aUserMarshalQuadruple
;
388 ULONG_PTR pReserved1
;
389 ULONG_PTR pReserved2
;
390 } MIDL_SYNTAX_INFO
, *PMIDL_SYNTAX_INFO
;
392 typedef void (__RPC_API
*STUB_THUNK
)( PMIDL_STUB_MESSAGE
);
394 #ifdef WINE_STRICT_PROTOTYPES
395 typedef LONG (__RPC_API
*SERVER_ROUTINE
)(void);
397 typedef LONG (__RPC_API
*SERVER_ROUTINE
)();
400 typedef struct _MIDL_SERVER_INFO_
402 PMIDL_STUB_DESC pStubDesc
;
403 const SERVER_ROUTINE
*DispatchTable
;
404 PFORMAT_STRING ProcString
;
405 const unsigned short *FmtStringOffset
;
406 const STUB_THUNK
*ThunkTable
;
407 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
409 PMIDL_SYNTAX_INFO pSyntaxInfo
;
410 } MIDL_SERVER_INFO
, *PMIDL_SERVER_INFO
;
412 typedef struct _MIDL_STUBLESS_PROXY_INFO
414 PMIDL_STUB_DESC pStubDesc
;
415 PFORMAT_STRING ProcFormatString
;
416 const unsigned short *FormatStringOffset
;
417 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
419 PMIDL_SYNTAX_INFO pSyntaxInfo
;
420 } MIDL_STUBLESS_PROXY_INFO
, *PMIDL_STUBLESS_PROXY_INFO
;
422 typedef union _CLIENT_CALL_RETURN
426 } CLIENT_CALL_RETURN
;
432 STUB_CALL_SERVER_NO_HRESULT
448 typedef struct _FULL_PTR_TO_REFID_ELEMENT
{
449 struct _FULL_PTR_TO_REFID_ELEMENT
*Next
;
453 } FULL_PTR_TO_REFID_ELEMENT
, *PFULL_PTR_TO_REFID_ELEMENT
;
455 /* Full pointer translation tables */
456 typedef struct _FULL_PTR_XLAT_TABLES
{
459 unsigned char *StateTable
;
460 ULONG NumberOfEntries
;
464 PFULL_PTR_TO_REFID_ELEMENT
*XlatTable
;
465 ULONG NumberOfBuckets
;
471 } FULL_PTR_XLAT_TABLES
, *PFULL_PTR_XLAT_TABLES
;
473 struct IRpcStubBuffer
;
475 typedef ULONG error_status_t
;
476 typedef void * NDR_CCONTEXT
;
478 typedef struct _SCONTEXT_QUEUE
{
479 ULONG NumberOfObjects
;
480 NDR_SCONTEXT
*ArrayOfObjects
;
481 } SCONTEXT_QUEUE
, *PSCONTEXT_QUEUE
;
483 typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
487 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
488 void (__RPC_API
*pfnFree
)(void *);
489 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
490 ULONG_PTR Reserved
[5];
491 } NDR_USER_MARSHAL_INFO_LEVEL1
;
493 typedef struct _NDR_USER_MARSHAL_INFO
495 ULONG InformationLevel
;
498 NDR_USER_MARSHAL_INFO_LEVEL1 Level1
;
500 } NDR_USER_MARSHAL_INFO
;
502 /* Context Handles */
504 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
505 NDRCContextBinding( NDR_CCONTEXT CContext
);
507 RPCRTAPI
void RPC_ENTRY
508 NDRCContextMarshall( NDR_CCONTEXT CContext
, void *pBuff
);
510 RPCRTAPI
void RPC_ENTRY
511 NDRCContextUnmarshall( NDR_CCONTEXT
*pCContext
, RPC_BINDING_HANDLE hBinding
,
512 void *pBuff
, ULONG DataRepresentation
);
514 RPCRTAPI
void RPC_ENTRY
515 NDRSContextMarshall( NDR_SCONTEXT CContext
, void *pBuff
, NDR_RUNDOWN userRunDownIn
);
517 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
518 NDRSContextUnmarshall( void *pBuff
, ULONG DataRepresentation
);
520 RPCRTAPI
void RPC_ENTRY
521 NDRSContextMarshallEx( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
522 void *pBuff
, NDR_RUNDOWN userRunDownIn
);
524 RPCRTAPI
void RPC_ENTRY
525 NDRSContextMarshall2( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
526 void *pBuff
, NDR_RUNDOWN userRunDownIn
, void * CtxGuard
,
529 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
530 NDRSContextUnmarshallEx( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
531 ULONG DataRepresentation
);
533 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
534 NDRSContextUnmarshall2( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
535 ULONG DataRepresentation
, void *CtxGuard
,
538 RPCRTAPI
void RPC_ENTRY
539 NdrClientContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT ContextHandle
, int fCheck
);
541 RPCRTAPI
void RPC_ENTRY
542 NdrClientContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT
* pContextHandle
,
543 RPC_BINDING_HANDLE BindHandle
);
545 RPCRTAPI
void RPC_ENTRY
546 NdrServerContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
, NDR_RUNDOWN RundownRoutine
);
548 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
549 NdrServerContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
);
551 RPCRTAPI
void RPC_ENTRY
552 NdrContextHandleSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
554 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
555 NdrContextHandleInitialize( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
557 RPCRTAPI
void RPC_ENTRY
558 NdrServerContextNewMarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
,
559 NDR_RUNDOWN RundownRoutine
, PFORMAT_STRING pFormat
);
561 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
562 NdrServerContextNewUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
564 RPCRTAPI RPC_STATUS RPC_ENTRY
565 RpcSmDestroyClientContext( void **ContextHandle
);
567 RPCRTAPI
void RPC_ENTRY
568 RpcSsDestroyClientContext( void **ContextHandle
);
570 RPCRTAPI
void RPC_ENTRY
571 NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
572 RPCRTAPI
void RPC_ENTRY
573 NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
575 RPCRTAPI
unsigned char* RPC_ENTRY
576 NdrByteCountPointerMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
577 RPCRTAPI
unsigned char* RPC_ENTRY
578 NdrByteCountPointerUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
579 RPCRTAPI
void RPC_ENTRY
580 NdrByteCountPointerBufferSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
581 RPCRTAPI
void RPC_ENTRY
582 NdrByteCountPointerFree( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
584 RPCRTAPI
unsigned char* RPC_ENTRY
585 NdrRangeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
587 /* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
588 #define SIMPLE_TYPE_MARSHAL(type) \
589 RPCRTAPI unsigned char* RPC_ENTRY \
590 Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
591 RPCRTAPI unsigned char* RPC_ENTRY \
592 Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
593 RPCRTAPI void RPC_ENTRY \
594 Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
595 RPCRTAPI ULONG RPC_ENTRY \
596 Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
598 #define TYPE_MARSHAL(type) \
599 SIMPLE_TYPE_MARSHAL(type) \
600 RPCRTAPI void RPC_ENTRY \
601 Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
603 TYPE_MARSHAL(Pointer
)
604 TYPE_MARSHAL(SimpleStruct
)
605 TYPE_MARSHAL(ConformantStruct
)
606 TYPE_MARSHAL(ConformantVaryingStruct
)
607 TYPE_MARSHAL(ComplexStruct
)
608 TYPE_MARSHAL(FixedArray
)
609 TYPE_MARSHAL(ConformantArray
)
610 TYPE_MARSHAL(ConformantVaryingArray
)
611 TYPE_MARSHAL(VaryingArray
)
612 TYPE_MARSHAL(ComplexArray
)
613 TYPE_MARSHAL(EncapsulatedUnion
)
614 TYPE_MARSHAL(NonEncapsulatedUnion
)
615 TYPE_MARSHAL(XmitOrRepAs
)
616 TYPE_MARSHAL(UserMarshal
)
617 TYPE_MARSHAL(InterfacePointer
)
619 SIMPLE_TYPE_MARSHAL(ConformantString
)
620 SIMPLE_TYPE_MARSHAL(NonConformantString
)
623 #undef SIMPLE_TYPE_MARSHAL
625 RPCRTAPI
void RPC_ENTRY
626 NdrCorrelationInitialize( PMIDL_STUB_MESSAGE pStubMsg
, void *pMemory
, ULONG CacheSize
, ULONG flags
);
627 RPCRTAPI
void RPC_ENTRY
628 NdrCorrelationPass( PMIDL_STUB_MESSAGE pStubMsg
);
629 RPCRTAPI
void RPC_ENTRY
630 NdrCorrelationFree( PMIDL_STUB_MESSAGE pStubMsg
);
632 RPCRTAPI
void RPC_ENTRY
633 NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, LONG NumberParams
);
634 RPCRTAPI
void RPC_ENTRY
635 NdrConvert( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
637 #define USER_MARSHAL_FC_BYTE 1
638 #define USER_MARSHAL_FC_CHAR 2
639 #define USER_MARSHAL_FC_SMALL 3
640 #define USER_MARSHAL_FC_USMALL 4
641 #define USER_MARSHAL_FC_WCHAR 5
642 #define USER_MARSHAL_FC_SHORT 6
643 #define USER_MARSHAL_FC_USHORT 7
644 #define USER_MARSHAL_FC_LONG 8
645 #define USER_MARSHAL_FC_ULONG 9
646 #define USER_MARSHAL_FC_FLOAT 10
647 #define USER_MARSHAL_FC_HYPER 11
648 #define USER_MARSHAL_FC_DOUBLE 12
650 RPCRTAPI
unsigned char* RPC_ENTRY
651 NdrUserMarshalSimpleTypeConvert( ULONG
*pFlags
, unsigned char *pBuffer
, unsigned char FormatChar
);
653 /* Note: this should return a CLIENT_CALL_RETURN, but calling convention for
654 * returning structures/unions is different between Windows and gcc on i386. */
655 LONG_PTR RPC_VAR_ENTRY
656 NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
657 LONG_PTR RPC_VAR_ENTRY
658 NdrClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
659 LONG_PTR RPC_VAR_ENTRY
660 NdrAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
661 LONG_PTR RPC_VAR_ENTRY
662 NdrDcomAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
664 RPCRTAPI
void RPC_ENTRY
665 NdrServerCall2( PRPC_MESSAGE pRpcMsg
);
666 RPCRTAPI
void RPC_ENTRY
667 NdrServerCall( PRPC_MESSAGE pRpcMsg
);
668 RPCRTAPI
void RPC_ENTRY
669 NdrAsyncServerCall( PRPC_MESSAGE pRpcMsg
);
671 RPCRTAPI LONG RPC_ENTRY
672 NdrStubCall2( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
673 RPCRTAPI LONG RPC_ENTRY
674 NdrStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
675 RPCRTAPI LONG RPC_ENTRY
676 NdrAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
677 RPCRTAPI LONG RPC_ENTRY
678 NdrDcomAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
680 RPCRTAPI
void* RPC_ENTRY
681 NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg
, SIZE_T Len
) __WINE_ALLOC_SIZE(2);
683 RPCRTAPI
void RPC_ENTRY
684 NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, void *ArgAddr
);
686 RPCRTAPI RPC_STATUS RPC_ENTRY
687 NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg
, ULONG
*pCommStatus
,
688 ULONG
*pFaultStatus
, RPC_STATUS Status_
);
690 RPCRTAPI
void* RPC_ENTRY
691 NdrOleAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1);
692 RPCRTAPI
void RPC_ENTRY
693 NdrOleFree( void* NodeToFree
);
695 RPCRTAPI
void RPC_ENTRY
696 NdrClientInitialize( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
697 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
698 RPCRTAPI
void RPC_ENTRY
699 NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
700 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
701 RPCRTAPI
unsigned char* RPC_ENTRY
702 NdrServerInitialize( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
703 RPCRTAPI
unsigned char* RPC_ENTRY
704 NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
705 RPCRTAPI
unsigned char* RPC_ENTRY
706 NdrServerInitializeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
, PRPC_MESSAGE pRpcMsg
);
707 RPCRTAPI
void RPC_ENTRY
708 NdrServerInitializeMarshall( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
);
709 RPCRTAPI
void RPC_ENTRY
710 NdrServerMarshall( struct IRpcStubBuffer
*pThis
, struct IRpcChannelBuffer
*pChannel
, PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
711 RPCRTAPI
void RPC_ENTRY
712 NdrServerUnmarshall( struct IRpcChannelBuffer
*pChannel
, PRPC_MESSAGE pRpcMsg
,
713 PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
,
714 PFORMAT_STRING pFormat
, void *pParamList
);
715 RPCRTAPI
unsigned char* RPC_ENTRY
716 NdrGetBuffer( PMIDL_STUB_MESSAGE stubmsg
, ULONG buflen
, RPC_BINDING_HANDLE handle
);
717 RPCRTAPI
void RPC_ENTRY
718 NdrFreeBuffer( PMIDL_STUB_MESSAGE pStubMsg
);
719 RPCRTAPI
unsigned char* RPC_ENTRY
720 NdrSendReceive( PMIDL_STUB_MESSAGE stubmsg
, unsigned char *buffer
);
722 RPCRTAPI
unsigned char * RPC_ENTRY
723 NdrNsGetBuffer( PMIDL_STUB_MESSAGE pStubMsg
, ULONG BufferLength
, RPC_BINDING_HANDLE Handle
);
724 RPCRTAPI
unsigned char * RPC_ENTRY
725 NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char *pBufferEnd
, RPC_BINDING_HANDLE
*pAutoHandle
);
727 RPCRTAPI RPC_STATUS RPC_ENTRY
728 NdrGetDcomProtocolVersion( PMIDL_STUB_MESSAGE pStubMsg
, RPC_VERSION
*pVersion
);
730 RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY
731 NdrFullPointerXlatInit( ULONG NumberOfPointers
, XLAT_SIDE XlatSide
);
732 RPCRTAPI
void RPC_ENTRY
733 NdrFullPointerXlatFree( PFULL_PTR_XLAT_TABLES pXlatTables
);
734 RPCRTAPI
int RPC_ENTRY
735 NdrFullPointerQueryPointer( PFULL_PTR_XLAT_TABLES pXlatTables
, void *pPointer
,
736 unsigned char QueryType
, ULONG
*pRefId
);
737 RPCRTAPI
int RPC_ENTRY
738 NdrFullPointerQueryRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
,
739 unsigned char QueryType
, void **ppPointer
);
740 RPCRTAPI
void RPC_ENTRY
741 NdrFullPointerInsertRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
, void *pPointer
);
742 RPCRTAPI
int RPC_ENTRY
743 NdrFullPointerFree( PFULL_PTR_XLAT_TABLES pXlatTables
, void *Pointer
);
745 RPCRTAPI
void RPC_ENTRY
746 NdrRpcSsEnableAllocate( PMIDL_STUB_MESSAGE pMessage
);
747 RPCRTAPI
void RPC_ENTRY
748 NdrRpcSsDisableAllocate( PMIDL_STUB_MESSAGE pMessage
);
749 RPCRTAPI
void RPC_ENTRY
750 NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage
);
751 RPCRTAPI
void * RPC_ENTRY
752 NdrRpcSmClientAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1);
753 RPCRTAPI
void RPC_ENTRY
754 NdrRpcSmClientFree( void *NodeToFree
);
755 RPCRTAPI
void * RPC_ENTRY
756 NdrRpcSsDefaultAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1);
757 RPCRTAPI
void RPC_ENTRY
758 NdrRpcSsDefaultFree( void *NodeToFree
);
760 RPCRTAPI RPC_STATUS RPC_ENTRY
761 NdrGetUserMarshalInfo( ULONG
*pFlags
, ULONG InformationLevel
, NDR_USER_MARSHAL_INFO
*pMarshalInfo
);
770 #endif /*__WINE_RPCNDR_H */