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 /* FIXME: What version? Perhaps something is better than nothing, however incorrect */
21 #define __RPCNDR_H_VERSION__ ( 399 )
24 #ifndef __WINE_RPCNDR_H
25 #define __WINE_RPCNDR_H
35 # define CONST_VTBL const
40 /* stupid #if can't handle casts... this __stupidity
41 is just a workaround for that limitation */
43 #define __NDR_CHAR_REP_MASK 0x000fL
44 #define __NDR_INT_REP_MASK 0x00f0L
45 #define __NDR_FLOAT_REP_MASK 0xff00L
47 #define __NDR_IEEE_FLOAT 0x0000L
48 #define __NDR_VAX_FLOAT 0x0100L
49 #define __NDR_IBM_FLOAT 0x0300L
51 #define __NDR_ASCII_CHAR 0x0000L
52 #define __NDR_EBCDIC_CHAR 0x0001L
54 #define __NDR_LITTLE_ENDIAN 0x0010L
55 #define __NDR_BIG_ENDIAN 0x0000L
57 /* Mac's are special */
58 #if defined(__RPC_MAC__)
59 # define __NDR_LOCAL_DATA_REPRESENTATION \
60 (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_BIG_ENDIAN)
62 # define __NDR_LOCAL_DATA_REPRESENTATION \
63 (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_LITTLE_ENDIAN)
66 #define __NDR_LOCAL_ENDIAN \
67 (__NDR_LOCAL_DATA_REPRESENTATION & __NDR_INT_REP_MASK)
69 /* for convenience, define NDR_LOCAL_IS_BIG_ENDIAN iff it is */
70 #if __NDR_LOCAL_ENDIAN == __NDR_BIG_ENDIAN
71 # define NDR_LOCAL_IS_BIG_ENDIAN
72 #elif __NDR_LOCAL_ENDIAN == __NDR_LITTLE_ENDIAN
73 # undef NDR_LOCAL_IS_BIG_ENDIAN
75 # error alien NDR_LOCAL_ENDIAN - Greg botched the defines again, please report
78 /* finally, do the casts like Microsoft */
80 #define NDR_CHAR_REP_MASK ((ULONG) __NDR_CHAR_REP_MASK)
81 #define NDR_INT_REP_MASK ((ULONG) __NDR_INT_REP_MASK)
82 #define NDR_FLOAT_REP_MASK ((ULONG) __NDR_FLOAT_REP_MASK)
83 #define NDR_IEEE_FLOAT ((ULONG) __NDR_IEEE_FLOAT)
84 #define NDR_VAX_FLOAT ((ULONG) __NDR_VAX_FLOAT)
85 #define NDR_IBM_FLOAT ((ULONG) __NDR_IBM_FLOAT)
86 #define NDR_ASCII_CHAR ((ULONG) __NDR_ASCII_CHAR)
87 #define NDR_EBCDIC_CHAR ((ULONG) __NDR_EBCDIC_CHAR)
88 #define NDR_LITTLE_ENDIAN ((ULONG) __NDR_LITTLE_ENDIAN)
89 #define NDR_BIG_ENDIAN ((ULONG) __NDR_BIG_ENDIAN)
90 #define NDR_LOCAL_DATA_REPRESENTATION ((ULONG) __NDR_LOCAL_DATA_REPRESENTATION)
91 #define NDR_LOCAL_ENDIAN ((ULONG) __NDR_LOCAL_ENDIAN)
94 #define TARGET_IS_NT50_OR_LATER 1
95 #define TARGET_IS_NT40_OR_LATER 1
96 #define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
99 typedef unsigned char byte
;
100 #define hyper __int64
101 #define MIDL_uhyper unsigned __int64
102 typedef unsigned char boolean
;
104 #define __RPC_CALLEE WINAPI
105 #define RPC_VAR_ENTRY __cdecl
106 #define NDR_SHAREABLE static
108 #define MIDL_ascii_strlen(s) strlen(s)
109 #define MIDL_ascii_strcpy(d,s) strcpy(d,s)
110 #define MIDL_memset(d,v,n) memset(d,v,n)
111 #define midl_user_free MIDL_user_free
112 #define midl_user_allocate MIDL_user_allocate
114 #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
115 #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
116 (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
124 #define NDRSContextValue(hContext) (&(hContext)->userContext)
125 #define cbNDRContext 20
127 typedef void (__RPC_USER
*NDR_RUNDOWN
)(void *context
);
128 typedef void (__RPC_USER
*NDR_NOTIFY_ROUTINE
)(void);
129 typedef void (__RPC_USER
*NDR_NOTIFY2_ROUTINE
)(boolean flag
);
131 #define DECLSPEC_UUID(x)
132 #define MIDL_INTERFACE(x) struct
134 struct _MIDL_STUB_MESSAGE
;
135 struct _MIDL_STUB_DESC
;
136 struct _FULL_PTR_XLAT_TABLES
;
137 struct NDR_ALLOC_ALL_NODES_CONTEXT
;
138 struct NDR_POINTER_QUEUE_STATE
;
140 typedef unsigned char *RPC_BUFPTR
;
141 typedef unsigned long RPC_LENGTH
;
142 typedef void (__RPC_USER
*EXPR_EVAL
)(struct _MIDL_STUB_MESSAGE
*);
143 typedef const unsigned char *PFORMAT_STRING
;
148 ULONG
*BufferConformanceMark
;
149 ULONG
*BufferVarianceMark
;
150 ULONG
*MaxCountArray
;
152 ULONG
*ActualCountArray
;
153 } ARRAY_INFO
, *PARRAY_INFO
;
158 ULONG DesiredReceivingCodeset
;
162 typedef struct _NDR_PIPE_DESC
*PNDR_PIPE_DESC
;
163 typedef struct _NDR_PIPE_MESSAGE
*PNDR_PIPE_MESSAGE
;
164 typedef struct _NDR_ASYNC_MESSAGE
*PNDR_ASYNC_MESSAGE
;
165 typedef struct _NDR_CORRELATION_INFO
*PNDR_CORRELATION_INFO
;
167 #include <pshpack4.h>
168 typedef struct _MIDL_STUB_MESSAGE
171 unsigned char *Buffer
;
172 unsigned char *BufferStart
;
173 unsigned char *BufferEnd
;
174 unsigned char *BufferMark
;
177 unsigned char *Memory
;
180 struct NDR_ALLOC_ALL_NODES_CONTEXT
*pAllocAllNodesContext
;
181 struct NDR_POINTER_QUEUE_STATE
*pPointerQueueState
;
182 int IgnoreEmbeddedPointers
;
183 unsigned char *PointerBufferMark
;
184 unsigned char fBufferValid
;
185 unsigned char uFlags
;
186 unsigned short UniquePtrCount
;
190 void * (__RPC_API
*pfnAllocate
)(size_t);
191 void (__RPC_API
*pfnFree
)(void *);
192 unsigned char *StackTop
;
193 unsigned char *pPresentedType
;
194 unsigned char *pTransmitType
;
195 handle_t SavedHandle
;
196 const struct _MIDL_STUB_DESC
*StubDesc
;
197 struct _FULL_PTR_XLAT_TABLES
*FullPtrXlatTables
;
201 int fDontCallFreeInst
:1;
204 int fHasExtensions
:1;
205 int fHasNewCorrDesc
:1;
210 NDR_SCONTEXT
*SavedContextHandles
;
212 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
213 PARRAY_INFO pArrayInfo
;
214 ULONG
*SizePtrCountArray
;
215 ULONG
*SizePtrOffsetArray
;
216 ULONG
*SizePtrLengthArray
;
220 PNDR_ASYNC_MESSAGE pAsyncMsg
;
221 PNDR_CORRELATION_INFO pCorrInfo
;
222 unsigned char *pCorrMemory
;
224 CS_STUB_INFO
*pCSInfo
;
225 unsigned char *ConformanceMark
;
226 unsigned char *VarianceMark
;
227 INT_PTR Unused
; /* BackingStoreLowMark on IA64 */
228 struct _NDR_PROC_CONTEXT
*pContext
;
229 void* ContextHandleHash
;
230 void* pUserMarshalList
;
231 INT_PTR Reserved51_3
;
232 INT_PTR Reserved51_4
;
233 INT_PTR Reserved51_5
;
234 } MIDL_STUB_MESSAGE
, *PMIDL_STUB_MESSAGE
;
237 typedef void * (__RPC_API
* GENERIC_BINDING_ROUTINE
)(void *);
238 typedef void (__RPC_API
* GENERIC_UNBIND_ROUTINE
)(void *, unsigned char *);
240 typedef struct _GENERIC_BINDING_ROUTINE_PAIR
242 GENERIC_BINDING_ROUTINE pfnBind
;
243 GENERIC_UNBIND_ROUTINE pfnUnbind
;
244 } GENERIC_BINDING_ROUTINE_PAIR
, *PGENERIC_BINDING_ROUTINE_PAIR
;
246 typedef struct __GENERIC_BINDING_INFO
250 GENERIC_BINDING_ROUTINE pfnBind
;
251 GENERIC_UNBIND_ROUTINE pfnUnbind
;
252 } GENERIC_BINDING_INFO
, *PGENERIC_BINDING_INFO
;
254 typedef void (__RPC_USER
*XMIT_HELPER_ROUTINE
)(PMIDL_STUB_MESSAGE
);
256 typedef struct _XMIT_ROUTINE_QUINTUPLE
258 XMIT_HELPER_ROUTINE pfnTranslateToXmit
;
259 XMIT_HELPER_ROUTINE pfnTranslateFromXmit
;
260 XMIT_HELPER_ROUTINE pfnFreeXmit
;
261 XMIT_HELPER_ROUTINE pfnFreeInst
;
262 } XMIT_ROUTINE_QUINTUPLE
, *PXMIT_ROUTINE_QUINTUPLE
;
264 typedef ULONG (__RPC_USER
*USER_MARSHAL_SIZING_ROUTINE
)(ULONG
*, ULONG
, void *);
265 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_MARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
266 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_UNMARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
267 typedef void (__RPC_USER
*USER_MARSHAL_FREEING_ROUTINE
)(ULONG
*, void *);
269 typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
271 USER_MARSHAL_SIZING_ROUTINE pfnBufferSize
;
272 USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall
;
273 USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall
;
274 USER_MARSHAL_FREEING_ROUTINE pfnFree
;
275 } USER_MARSHAL_ROUTINE_QUADRUPLE
;
278 #define USER_MARSHAL_CB_SIGNATURE \
279 ( ( (DWORD)'U' << 24 ) | ( (DWORD)'S' << 16 ) | \
280 ( (DWORD)'R' << 8 ) | ( (DWORD)'C' ) )
284 USER_MARSHAL_CB_BUFFER_SIZE
,
285 USER_MARSHAL_CB_MARSHALL
,
286 USER_MARSHAL_CB_UNMARSHALL
,
288 } USER_MARSHAL_CB_TYPE
;
290 typedef struct _USER_MARSHAL_CB
293 PMIDL_STUB_MESSAGE pStubMsg
;
294 PFORMAT_STRING pReserve
;
296 USER_MARSHAL_CB_TYPE CBType
;
297 PFORMAT_STRING pFormat
;
298 PFORMAT_STRING pTypeFormat
;
301 #define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
302 #define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
303 #define GET_USER_DATA_REP(f) HIWORD(f)
305 #define USER_CALL_IS_ASYNC 0x0100
306 #define USER_CALL_NEW_CORRELATION_DESC 0x0200
308 typedef struct _MALLOC_FREE_STRUCT
310 void * (__RPC_USER
*pfnAllocate
)(size_t);
311 void (__RPC_USER
*pfnFree
)(void *);
312 } MALLOC_FREE_STRUCT
;
314 typedef struct _COMM_FAULT_OFFSETS
318 } COMM_FAULT_OFFSETS
;
320 typedef struct _MIDL_STUB_DESC
322 void *RpcInterfaceInformation
;
323 void * (__RPC_API
*pfnAllocate
)(size_t);
324 void (__RPC_API
*pfnFree
)(void *);
326 handle_t
*pAutoHandle
;
327 handle_t
*pPrimitiveHandle
;
328 PGENERIC_BINDING_INFO pGenericBindingInfo
;
329 } IMPLICIT_HANDLE_INFO
;
330 const NDR_RUNDOWN
*apfnNdrRundownRoutines
;
331 const GENERIC_BINDING_ROUTINE_PAIR
*aGenericBindingRoutinePairs
;
332 const EXPR_EVAL
*apfnExprEval
;
333 const XMIT_ROUTINE_QUINTUPLE
*aXmitQuintuple
;
334 const unsigned char *pFormatTypes
;
337 MALLOC_FREE_STRUCT
*pMallocFreeStruct
;
339 const COMM_FAULT_OFFSETS
*CommFaultOffsets
;
340 const USER_MARSHAL_ROUTINE_QUADRUPLE
*aUserMarshalQuadruple
;
341 const NDR_NOTIFY_ROUTINE
*NotifyRoutineTable
;
347 typedef const MIDL_STUB_DESC
*PMIDL_STUB_DESC
;
349 typedef struct _MIDL_FORMAT_STRING
352 #if defined(__GNUC__)
353 unsigned char Format
[0];
355 unsigned char Format
[1];
357 } MIDL_FORMAT_STRING
;
359 typedef struct _MIDL_SYNTAX_INFO
361 RPC_SYNTAX_IDENTIFIER TransferSyntax
;
362 RPC_DISPATCH_TABLE
* DispatchTable
;
363 PFORMAT_STRING ProcString
;
364 const unsigned short* FmtStringOffset
;
365 PFORMAT_STRING TypeString
;
366 const void* aUserMarshalQuadruple
;
367 ULONG_PTR pReserved1
;
368 ULONG_PTR pReserved2
;
369 } MIDL_SYNTAX_INFO
, *PMIDL_SYNTAX_INFO
;
371 typedef void (__RPC_API
*STUB_THUNK
)( PMIDL_STUB_MESSAGE
);
373 typedef LONG (__RPC_API
*SERVER_ROUTINE
)();
375 typedef struct _MIDL_SERVER_INFO_
377 PMIDL_STUB_DESC pStubDesc
;
378 const SERVER_ROUTINE
*DispatchTable
;
379 PFORMAT_STRING ProcString
;
380 const unsigned short *FmtStringOffset
;
381 const STUB_THUNK
*ThunkTable
;
382 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
384 PMIDL_SYNTAX_INFO pSyntaxInfo
;
385 } MIDL_SERVER_INFO
, *PMIDL_SERVER_INFO
;
387 typedef struct _MIDL_STUBLESS_PROXY_INFO
389 PMIDL_STUB_DESC pStubDesc
;
390 PFORMAT_STRING ProcFormatString
;
391 const unsigned short *FormatStringOffset
;
392 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
394 PMIDL_SYNTAX_INFO pSyntaxInfo
;
395 } MIDL_STUBLESS_PROXY_INFO
, *PMIDL_STUBLESS_PROXY_INFO
;
397 typedef union _CLIENT_CALL_RETURN
401 } CLIENT_CALL_RETURN
;
407 STUB_CALL_SERVER_NO_HRESULT
423 typedef struct _FULL_PTR_TO_REFID_ELEMENT
{
424 struct _FULL_PTR_TO_REFID_ELEMENT
*Next
;
428 } FULL_PTR_TO_REFID_ELEMENT
, *PFULL_PTR_TO_REFID_ELEMENT
;
430 /* Full pointer translation tables */
431 typedef struct _FULL_PTR_XLAT_TABLES
{
434 unsigned char *StateTable
;
435 ULONG NumberOfEntries
;
439 PFULL_PTR_TO_REFID_ELEMENT
*XlatTable
;
440 ULONG NumberOfBuckets
;
446 } FULL_PTR_XLAT_TABLES
, *PFULL_PTR_XLAT_TABLES
;
448 struct IRpcStubBuffer
;
450 typedef ULONG error_status_t
;
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 * (__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 /* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
551 #define SIMPLE_TYPE_MARSHAL(type) \
552 RPCRTAPI unsigned char* RPC_ENTRY \
553 Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
554 RPCRTAPI unsigned char* RPC_ENTRY \
555 Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
556 RPCRTAPI void RPC_ENTRY \
557 Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
558 RPCRTAPI ULONG RPC_ENTRY \
559 Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
561 #define TYPE_MARSHAL(type) \
562 SIMPLE_TYPE_MARSHAL(type) \
563 RPCRTAPI void RPC_ENTRY \
564 Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
566 TYPE_MARSHAL(Pointer
)
567 TYPE_MARSHAL(SimpleStruct
)
568 TYPE_MARSHAL(ConformantStruct
)
569 TYPE_MARSHAL(ConformantVaryingStruct
)
570 TYPE_MARSHAL(ComplexStruct
)
571 TYPE_MARSHAL(FixedArray
)
572 TYPE_MARSHAL(ConformantArray
)
573 TYPE_MARSHAL(ConformantVaryingArray
)
574 TYPE_MARSHAL(VaryingArray
)
575 TYPE_MARSHAL(ComplexArray
)
576 TYPE_MARSHAL(EncapsulatedUnion
)
577 TYPE_MARSHAL(NonEncapsulatedUnion
)
578 TYPE_MARSHAL(ByteCountPointer
)
579 TYPE_MARSHAL(XmitOrRepAs
)
580 TYPE_MARSHAL(UserMarshal
)
581 TYPE_MARSHAL(InterfacePointer
)
584 SIMPLE_TYPE_MARSHAL(ConformantString
)
585 SIMPLE_TYPE_MARSHAL(NonConformantString
)
588 #undef SIMPLE_TYPE_MARSHAL
590 RPCRTAPI
void RPC_ENTRY
591 NdrCorrelationInitialize( PMIDL_STUB_MESSAGE pStubMsg
, void *pMemory
, ULONG CacheSize
, ULONG flags
);
592 RPCRTAPI
void RPC_ENTRY
593 NdrCorrelationPass( PMIDL_STUB_MESSAGE pStubMsg
);
594 RPCRTAPI
void RPC_ENTRY
595 NdrCorrelationFree( PMIDL_STUB_MESSAGE pStubMsg
);
597 RPCRTAPI
void RPC_ENTRY
598 NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, LONG NumberParams
);
599 RPCRTAPI
void RPC_ENTRY
600 NdrConvert( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
602 #define USER_MARSHAL_FC_BYTE 1
603 #define USER_MARSHAL_FC_CHAR 2
604 #define USER_MARSHAL_FC_SMALL 3
605 #define USER_MARSHAL_FC_USMALL 4
606 #define USER_MARSHAL_FC_WCHAR 5
607 #define USER_MARSHAL_FC_SHORT 6
608 #define USER_MARSHAL_FC_USHORT 7
609 #define USER_MARSHAL_FC_LONG 8
610 #define USER_MARSHAL_FC_ULONG 9
611 #define USER_MARSHAL_FC_FLOAT 10
612 #define USER_MARSHAL_FC_HYPER 11
613 #define USER_MARSHAL_FC_DOUBLE 12
615 RPCRTAPI
unsigned char* RPC_ENTRY
616 NdrUserMarshalSimpleTypeConvert( ULONG
*pFlags
, unsigned char *pBuffer
, unsigned char FormatChar
);
618 /* Note: this should return a CLIENT_CALL_RETURN, but calling convention for
619 * returning structures/unions is different between Windows and gcc on i386. */
620 LONG_PTR RPC_VAR_ENTRY
621 NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
622 LONG_PTR RPC_VAR_ENTRY
623 NdrClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
624 LONG_PTR RPC_VAR_ENTRY
625 NdrAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
626 LONG_PTR RPC_VAR_ENTRY
627 NdrDcomAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
629 RPCRTAPI
void RPC_ENTRY
630 NdrServerCall2( PRPC_MESSAGE pRpcMsg
);
631 RPCRTAPI
void RPC_ENTRY
632 NdrServerCall( PRPC_MESSAGE pRpcMsg
);
633 RPCRTAPI
void RPC_ENTRY
634 NdrAsyncServerCall( PRPC_MESSAGE pRpcMsg
);
636 RPCRTAPI LONG RPC_ENTRY
637 NdrStubCall2( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
638 RPCRTAPI LONG RPC_ENTRY
639 NdrStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
640 RPCRTAPI LONG RPC_ENTRY
641 NdrAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
642 RPCRTAPI LONG RPC_ENTRY
643 NdrDcomAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
645 RPCRTAPI
void* RPC_ENTRY
646 NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg
, size_t Len
);
648 RPCRTAPI
void RPC_ENTRY
649 NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, void *ArgAddr
);
651 RPCRTAPI RPC_STATUS RPC_ENTRY
652 NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg
, ULONG
*pCommStatus
,
653 ULONG
*pFaultStatus
, RPC_STATUS Status_
);
655 RPCRTAPI
void* RPC_ENTRY
656 NdrOleAllocate( size_t Size
);
657 RPCRTAPI
void RPC_ENTRY
658 NdrOleFree( void* NodeToFree
);
660 RPCRTAPI
void RPC_ENTRY
661 NdrClientInitialize( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
662 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
663 RPCRTAPI
void RPC_ENTRY
664 NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
665 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
666 RPCRTAPI
unsigned char* RPC_ENTRY
667 NdrServerInitialize( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
668 RPCRTAPI
unsigned char* RPC_ENTRY
669 NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
670 RPCRTAPI
unsigned char* RPC_ENTRY
671 NdrServerInitializeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
, PRPC_MESSAGE pRpcMsg
);
672 RPCRTAPI
void RPC_ENTRY
673 NdrServerInitializeMarshall( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
);
674 RPCRTAPI
void RPC_ENTRY
675 NdrServerMarshall( struct IRpcStubBuffer
*pThis
, struct IRpcChannelBuffer
*pChannel
, PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
676 RPCRTAPI
void RPC_ENTRY
677 NdrServerUnmarshall( struct IRpcChannelBuffer
*pChannel
, PRPC_MESSAGE pRpcMsg
,
678 PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
,
679 PFORMAT_STRING pFormat
, void *pParamList
);
680 RPCRTAPI
unsigned char* RPC_ENTRY
681 NdrGetBuffer( PMIDL_STUB_MESSAGE stubmsg
, ULONG buflen
, RPC_BINDING_HANDLE handle
);
682 RPCRTAPI
void RPC_ENTRY
683 NdrFreeBuffer( PMIDL_STUB_MESSAGE pStubMsg
);
684 RPCRTAPI
unsigned char* RPC_ENTRY
685 NdrSendReceive( PMIDL_STUB_MESSAGE stubmsg
, unsigned char *buffer
);
687 RPCRTAPI
unsigned char * RPC_ENTRY
688 NdrNsGetBuffer( PMIDL_STUB_MESSAGE pStubMsg
, ULONG BufferLength
, RPC_BINDING_HANDLE Handle
);
689 RPCRTAPI
unsigned char * RPC_ENTRY
690 NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char *pBufferEnd
, RPC_BINDING_HANDLE
*pAutoHandle
);
692 RPCRTAPI RPC_STATUS RPC_ENTRY
693 NdrGetDcomProtocolVersion( PMIDL_STUB_MESSAGE pStubMsg
, RPC_VERSION
*pVersion
);
695 RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY
696 NdrFullPointerXlatInit( ULONG NumberOfPointers
, XLAT_SIDE XlatSide
);
697 RPCRTAPI
void RPC_ENTRY
698 NdrFullPointerXlatFree( PFULL_PTR_XLAT_TABLES pXlatTables
);
699 RPCRTAPI
int RPC_ENTRY
700 NdrFullPointerQueryPointer( PFULL_PTR_XLAT_TABLES pXlatTables
, void *pPointer
,
701 unsigned char QueryType
, ULONG
*pRefId
);
702 RPCRTAPI
int RPC_ENTRY
703 NdrFullPointerQueryRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
,
704 unsigned char QueryType
, void **ppPointer
);
705 RPCRTAPI
void RPC_ENTRY
706 NdrFullPointerInsertRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
, void *pPointer
);
707 RPCRTAPI
int RPC_ENTRY
708 NdrFullPointerFree( PFULL_PTR_XLAT_TABLES pXlatTables
, void *Pointer
);
710 RPCRTAPI
void RPC_ENTRY
711 NdrRpcSsEnableAllocate( PMIDL_STUB_MESSAGE pMessage
);
712 RPCRTAPI
void RPC_ENTRY
713 NdrRpcSsDisableAllocate( PMIDL_STUB_MESSAGE pMessage
);
714 RPCRTAPI
void RPC_ENTRY
715 NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage
);
716 RPCRTAPI
void * RPC_ENTRY
717 NdrRpcSmClientAllocate( size_t Size
);
718 RPCRTAPI
void RPC_ENTRY
719 NdrRpcSmClientFree( void *NodeToFree
);
720 RPCRTAPI
void * RPC_ENTRY
721 NdrRpcSsDefaultAllocate( size_t Size
);
722 RPCRTAPI
void RPC_ENTRY
723 NdrRpcSsDefaultFree( void *NodeToFree
);
725 RPCRTAPI RPC_STATUS RPC_ENTRY
726 NdrGetUserMarshalInfo( ULONG
*pFlags
, ULONG InformationLevel
, NDR_USER_MARSHAL_INFO
*pMarshalInfo
);
731 #endif /*__WINE_RPCNDR_H */