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 0x000f
49 #define __NDR_INT_REP_MASK 0x00f0
50 #define __NDR_FLOAT_REP_MASK 0xff00
52 #define __NDR_IEEE_FLOAT 0x0000
53 #define __NDR_VAX_FLOAT 0x0100
54 #define __NDR_IBM_FLOAT 0x0300
56 #define __NDR_ASCII_CHAR 0x0000
57 #define __NDR_EBCDIC_CHAR 0x0001
59 #define __NDR_LITTLE_ENDIAN 0x0010
60 #define __NDR_BIG_ENDIAN 0x0000
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 #ifndef DECLSPEC_UUID
146 #if defined(_MSC_VER) && defined(__cplusplus)
147 #define DECLSPEC_UUID(x) __declspec(uuid(x))
149 #define DECLSPEC_UUID(x)
151 #endif /* DECLSPEC_UUID */
153 #define MIDL_INTERFACE(x) struct
155 struct _MIDL_STUB_MESSAGE
;
156 struct _MIDL_STUB_DESC
;
157 struct _FULL_PTR_XLAT_TABLES
;
158 struct NDR_ALLOC_ALL_NODES_CONTEXT
;
159 struct NDR_POINTER_QUEUE_STATE
;
161 typedef unsigned char *RPC_BUFPTR
;
162 typedef ULONG RPC_LENGTH
;
163 typedef void (__RPC_USER
*EXPR_EVAL
)(struct _MIDL_STUB_MESSAGE
*);
164 typedef const unsigned char *PFORMAT_STRING
;
169 ULONG
*BufferConformanceMark
;
170 ULONG
*BufferVarianceMark
;
171 ULONG
*MaxCountArray
;
173 ULONG
*ActualCountArray
;
174 } ARRAY_INFO
, *PARRAY_INFO
;
179 ULONG DesiredReceivingCodeset
;
183 typedef struct _NDR_PIPE_DESC
*PNDR_PIPE_DESC
;
184 typedef struct _NDR_PIPE_MESSAGE
*PNDR_PIPE_MESSAGE
;
185 typedef struct _NDR_ASYNC_MESSAGE
*PNDR_ASYNC_MESSAGE
;
186 typedef struct _NDR_CORRELATION_INFO
*PNDR_CORRELATION_INFO
;
188 typedef struct _MIDL_STUB_MESSAGE
191 unsigned char *Buffer
;
192 unsigned char *BufferStart
;
193 unsigned char *BufferEnd
;
194 unsigned char *BufferMark
;
197 unsigned char *Memory
;
198 unsigned char IsClient
;
200 unsigned short uFlags2
;
202 struct NDR_ALLOC_ALL_NODES_CONTEXT
*pAllocAllNodesContext
;
203 struct NDR_POINTER_QUEUE_STATE
*pPointerQueueState
;
204 int IgnoreEmbeddedPointers
;
205 unsigned char *PointerBufferMark
;
206 unsigned char CorrDespIncrement
;
207 unsigned char uFlags
;
208 unsigned short UniquePtrCount
;
212 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
213 void (__RPC_API
*pfnFree
)(void *);
214 unsigned char *StackTop
;
215 unsigned char *pPresentedType
;
216 unsigned char *pTransmitType
;
217 handle_t SavedHandle
;
218 const struct _MIDL_STUB_DESC
*StubDesc
;
219 struct _FULL_PTR_XLAT_TABLES
*FullPtrXlatTables
;
222 unsigned int fInDontFree
:1;
223 unsigned int fDontCallFreeInst
:1;
224 unsigned int fInOnlyParam
:1;
225 unsigned int fHasReturn
:1;
226 unsigned int fHasExtensions
:1;
227 unsigned int fHasNewCorrDesc
:1;
228 unsigned int fIsIn
:1;
229 unsigned int fIsOut
:1;
230 unsigned int fIsOicf
:1;
231 unsigned int fBufferValid
:1;
232 unsigned int fHasMemoryValidateCallback
:1;
233 unsigned int fInFree
:1;
234 unsigned int fNeedMCCP
:1;
239 NDR_SCONTEXT
*SavedContextHandles
;
241 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
242 PARRAY_INFO pArrayInfo
;
243 ULONG
*SizePtrCountArray
;
244 ULONG
*SizePtrOffsetArray
;
245 ULONG
*SizePtrLengthArray
;
249 PNDR_ASYNC_MESSAGE pAsyncMsg
;
250 PNDR_CORRELATION_INFO pCorrInfo
;
251 unsigned char *pCorrMemory
;
253 CS_STUB_INFO
*pCSInfo
;
254 unsigned char *ConformanceMark
;
255 unsigned char *VarianceMark
;
256 INT_PTR Unused
; /* BackingStoreLowMark on IA64 */
257 struct _NDR_PROC_CONTEXT
*pContext
;
258 void* ContextHandleHash
;
259 void* pUserMarshalList
;
260 INT_PTR Reserved51_3
;
261 INT_PTR Reserved51_4
;
262 INT_PTR Reserved51_5
;
263 } MIDL_STUB_MESSAGE
, *PMIDL_STUB_MESSAGE
;
265 typedef void * (__RPC_API
* GENERIC_BINDING_ROUTINE
)(void *);
266 typedef void (__RPC_API
* GENERIC_UNBIND_ROUTINE
)(void *, unsigned char *);
268 typedef struct _GENERIC_BINDING_ROUTINE_PAIR
270 GENERIC_BINDING_ROUTINE pfnBind
;
271 GENERIC_UNBIND_ROUTINE pfnUnbind
;
272 } GENERIC_BINDING_ROUTINE_PAIR
, *PGENERIC_BINDING_ROUTINE_PAIR
;
274 typedef struct __GENERIC_BINDING_INFO
278 GENERIC_BINDING_ROUTINE pfnBind
;
279 GENERIC_UNBIND_ROUTINE pfnUnbind
;
280 } GENERIC_BINDING_INFO
, *PGENERIC_BINDING_INFO
;
282 typedef void (__RPC_USER
*XMIT_HELPER_ROUTINE
)(PMIDL_STUB_MESSAGE
);
284 typedef struct _XMIT_ROUTINE_QUINTUPLE
286 XMIT_HELPER_ROUTINE pfnTranslateToXmit
;
287 XMIT_HELPER_ROUTINE pfnTranslateFromXmit
;
288 XMIT_HELPER_ROUTINE pfnFreeXmit
;
289 XMIT_HELPER_ROUTINE pfnFreeInst
;
290 } XMIT_ROUTINE_QUINTUPLE
, *PXMIT_ROUTINE_QUINTUPLE
;
292 typedef ULONG (__RPC_USER
*USER_MARSHAL_SIZING_ROUTINE
)(ULONG
*, ULONG
, void *);
293 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_MARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
294 typedef unsigned char * (__RPC_USER
*USER_MARSHAL_UNMARSHALLING_ROUTINE
)(ULONG
*, unsigned char *, void *);
295 typedef void (__RPC_USER
*USER_MARSHAL_FREEING_ROUTINE
)(ULONG
*, void *);
297 typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
299 USER_MARSHAL_SIZING_ROUTINE pfnBufferSize
;
300 USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall
;
301 USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall
;
302 USER_MARSHAL_FREEING_ROUTINE pfnFree
;
303 } USER_MARSHAL_ROUTINE_QUADRUPLE
;
306 #define USER_MARSHAL_CB_SIGNATURE \
307 ( ( (DWORD)'U' << 24 ) | ( (DWORD)'S' << 16 ) | \
308 ( (DWORD)'R' << 8 ) | ( (DWORD)'C' ) )
312 USER_MARSHAL_CB_BUFFER_SIZE
,
313 USER_MARSHAL_CB_MARSHALL
,
314 USER_MARSHAL_CB_UNMARSHALL
,
316 } USER_MARSHAL_CB_TYPE
;
318 typedef struct _USER_MARSHAL_CB
321 PMIDL_STUB_MESSAGE pStubMsg
;
322 PFORMAT_STRING pReserve
;
324 USER_MARSHAL_CB_TYPE CBType
;
325 PFORMAT_STRING pFormat
;
326 PFORMAT_STRING pTypeFormat
;
329 #define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
330 #define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
331 #define GET_USER_DATA_REP(f) HIWORD(f)
333 #define USER_CALL_IS_ASYNC 0x0100
334 #define USER_CALL_NEW_CORRELATION_DESC 0x0200
336 typedef struct _MALLOC_FREE_STRUCT
338 void * (__WINE_ALLOC_SIZE(1) __RPC_USER
*pfnAllocate
)(SIZE_T
);
339 void (__RPC_USER
*pfnFree
)(void *);
340 } MALLOC_FREE_STRUCT
;
342 typedef struct _COMM_FAULT_OFFSETS
346 } COMM_FAULT_OFFSETS
;
348 typedef struct _MIDL_STUB_DESC
350 void *RpcInterfaceInformation
;
351 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
352 void (__RPC_API
*pfnFree
)(void *);
354 handle_t
*pAutoHandle
;
355 handle_t
*pPrimitiveHandle
;
356 PGENERIC_BINDING_INFO pGenericBindingInfo
;
357 } IMPLICIT_HANDLE_INFO
;
358 const NDR_RUNDOWN
*apfnNdrRundownRoutines
;
359 const GENERIC_BINDING_ROUTINE_PAIR
*aGenericBindingRoutinePairs
;
360 const EXPR_EVAL
*apfnExprEval
;
361 const XMIT_ROUTINE_QUINTUPLE
*aXmitQuintuple
;
362 const unsigned char *pFormatTypes
;
365 MALLOC_FREE_STRUCT
*pMallocFreeStruct
;
367 const COMM_FAULT_OFFSETS
*CommFaultOffsets
;
368 const USER_MARSHAL_ROUTINE_QUADRUPLE
*aUserMarshalQuadruple
;
369 const NDR_NOTIFY_ROUTINE
*NotifyRoutineTable
;
375 typedef const MIDL_STUB_DESC
*PMIDL_STUB_DESC
;
377 typedef struct _MIDL_FORMAT_STRING
380 #if defined(__GNUC__)
381 unsigned char Format
[0];
383 unsigned char Format
[1];
385 } MIDL_FORMAT_STRING
;
387 typedef struct _MIDL_SYNTAX_INFO
389 RPC_SYNTAX_IDENTIFIER TransferSyntax
;
390 RPC_DISPATCH_TABLE
* DispatchTable
;
391 PFORMAT_STRING ProcString
;
392 const unsigned short* FmtStringOffset
;
393 PFORMAT_STRING TypeString
;
394 const void* aUserMarshalQuadruple
;
395 ULONG_PTR pReserved1
;
396 ULONG_PTR pReserved2
;
397 } MIDL_SYNTAX_INFO
, *PMIDL_SYNTAX_INFO
;
399 typedef void (__RPC_API
*STUB_THUNK
)( PMIDL_STUB_MESSAGE
);
401 #ifdef WINE_STRICT_PROTOTYPES
402 typedef LONG (__RPC_API
*SERVER_ROUTINE
)(void);
404 typedef LONG (__RPC_API
*SERVER_ROUTINE
)();
407 typedef struct _MIDL_SERVER_INFO_
409 PMIDL_STUB_DESC pStubDesc
;
410 const SERVER_ROUTINE
*DispatchTable
;
411 PFORMAT_STRING ProcString
;
412 const unsigned short *FmtStringOffset
;
413 const STUB_THUNK
*ThunkTable
;
414 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
416 PMIDL_SYNTAX_INFO pSyntaxInfo
;
417 } MIDL_SERVER_INFO
, *PMIDL_SERVER_INFO
;
419 typedef struct _MIDL_STUBLESS_PROXY_INFO
421 PMIDL_STUB_DESC pStubDesc
;
422 PFORMAT_STRING ProcFormatString
;
423 const unsigned short *FormatStringOffset
;
424 PRPC_SYNTAX_IDENTIFIER pTransferSyntax
;
426 PMIDL_SYNTAX_INFO pSyntaxInfo
;
427 } MIDL_STUBLESS_PROXY_INFO
, *PMIDL_STUBLESS_PROXY_INFO
;
429 typedef union _CLIENT_CALL_RETURN
433 } CLIENT_CALL_RETURN
;
439 STUB_CALL_SERVER_NO_HRESULT
455 typedef struct _FULL_PTR_TO_REFID_ELEMENT
{
456 struct _FULL_PTR_TO_REFID_ELEMENT
*Next
;
460 } FULL_PTR_TO_REFID_ELEMENT
, *PFULL_PTR_TO_REFID_ELEMENT
;
462 /* Full pointer translation tables */
463 typedef struct _FULL_PTR_XLAT_TABLES
{
466 unsigned char *StateTable
;
467 ULONG NumberOfEntries
;
471 PFULL_PTR_TO_REFID_ELEMENT
*XlatTable
;
472 ULONG NumberOfBuckets
;
478 } FULL_PTR_XLAT_TABLES
, *PFULL_PTR_XLAT_TABLES
;
480 struct IRpcStubBuffer
;
482 typedef ULONG error_status_t
;
483 typedef void * NDR_CCONTEXT
;
485 typedef struct _SCONTEXT_QUEUE
{
486 ULONG NumberOfObjects
;
487 NDR_SCONTEXT
*ArrayOfObjects
;
488 } SCONTEXT_QUEUE
, *PSCONTEXT_QUEUE
;
490 typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
494 void * (__WINE_ALLOC_SIZE(1) __RPC_API
*pfnAllocate
)(SIZE_T
);
495 void (__RPC_API
*pfnFree
)(void *);
496 struct IRpcChannelBuffer
*pRpcChannelBuffer
;
497 ULONG_PTR Reserved
[5];
498 } NDR_USER_MARSHAL_INFO_LEVEL1
;
500 typedef struct _NDR_USER_MARSHAL_INFO
502 ULONG InformationLevel
;
505 NDR_USER_MARSHAL_INFO_LEVEL1 Level1
;
507 } NDR_USER_MARSHAL_INFO
;
509 /* Context Handles */
511 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
512 NDRCContextBinding( NDR_CCONTEXT CContext
);
514 RPCRTAPI
void RPC_ENTRY
515 NDRCContextMarshall( NDR_CCONTEXT CContext
, void *pBuff
);
517 RPCRTAPI
void RPC_ENTRY
518 NDRCContextUnmarshall( NDR_CCONTEXT
*pCContext
, RPC_BINDING_HANDLE hBinding
,
519 void *pBuff
, ULONG DataRepresentation
);
521 RPCRTAPI
void RPC_ENTRY
522 NDRSContextMarshall( NDR_SCONTEXT CContext
, void *pBuff
, NDR_RUNDOWN userRunDownIn
);
524 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
525 NDRSContextUnmarshall( void *pBuff
, ULONG DataRepresentation
);
527 RPCRTAPI
void RPC_ENTRY
528 NDRSContextMarshallEx( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
529 void *pBuff
, NDR_RUNDOWN userRunDownIn
);
531 RPCRTAPI
void RPC_ENTRY
532 NDRSContextMarshall2( RPC_BINDING_HANDLE BindingHandle
, NDR_SCONTEXT CContext
,
533 void *pBuff
, NDR_RUNDOWN userRunDownIn
, void * CtxGuard
,
536 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
537 NDRSContextUnmarshallEx( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
538 ULONG DataRepresentation
);
540 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
541 NDRSContextUnmarshall2( RPC_BINDING_HANDLE BindingHandle
, void *pBuff
,
542 ULONG DataRepresentation
, void *CtxGuard
,
545 RPCRTAPI
void RPC_ENTRY
546 NdrClientContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT ContextHandle
, int fCheck
);
548 RPCRTAPI
void RPC_ENTRY
549 NdrClientContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_CCONTEXT
* pContextHandle
,
550 RPC_BINDING_HANDLE BindHandle
);
552 RPCRTAPI
void RPC_ENTRY
553 NdrServerContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
, NDR_RUNDOWN RundownRoutine
);
555 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
556 NdrServerContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
);
558 RPCRTAPI
void RPC_ENTRY
559 NdrContextHandleSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
561 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
562 NdrContextHandleInitialize( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
564 RPCRTAPI
void RPC_ENTRY
565 NdrServerContextNewMarshall( PMIDL_STUB_MESSAGE pStubMsg
, NDR_SCONTEXT ContextHandle
,
566 NDR_RUNDOWN RundownRoutine
, PFORMAT_STRING pFormat
);
568 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
569 NdrServerContextNewUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
571 RPCRTAPI RPC_STATUS RPC_ENTRY
572 RpcSmDestroyClientContext( void **ContextHandle
);
574 RPCRTAPI
void RPC_ENTRY
575 RpcSsDestroyClientContext( void **ContextHandle
);
577 RPCRTAPI
void RPC_ENTRY
578 NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
579 RPCRTAPI
void RPC_ENTRY
580 NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, unsigned char FormatChar
);
582 RPCRTAPI
unsigned char* RPC_ENTRY
583 NdrByteCountPointerMarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
584 RPCRTAPI
unsigned char* RPC_ENTRY
585 NdrByteCountPointerUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
586 RPCRTAPI
void RPC_ENTRY
587 NdrByteCountPointerBufferSize( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
588 RPCRTAPI
void RPC_ENTRY
589 NdrByteCountPointerFree( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char* pMemory
, PFORMAT_STRING pFormat
);
591 RPCRTAPI
unsigned char* RPC_ENTRY
592 NdrRangeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char** ppMemory
, PFORMAT_STRING pFormat
, unsigned char fMustAlloc
);
594 /* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
595 #define SIMPLE_TYPE_MARSHAL(type) \
596 RPCRTAPI unsigned char* RPC_ENTRY \
597 Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
598 RPCRTAPI unsigned char* RPC_ENTRY \
599 Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
600 RPCRTAPI void RPC_ENTRY \
601 Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
602 RPCRTAPI ULONG RPC_ENTRY \
603 Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
605 #define TYPE_MARSHAL(type) \
606 SIMPLE_TYPE_MARSHAL(type) \
607 RPCRTAPI void RPC_ENTRY \
608 Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
610 TYPE_MARSHAL(Pointer
)
611 TYPE_MARSHAL(SimpleStruct
)
612 TYPE_MARSHAL(ConformantStruct
)
613 TYPE_MARSHAL(ConformantVaryingStruct
)
614 TYPE_MARSHAL(ComplexStruct
)
615 TYPE_MARSHAL(FixedArray
)
616 TYPE_MARSHAL(ConformantArray
)
617 TYPE_MARSHAL(ConformantVaryingArray
)
618 TYPE_MARSHAL(VaryingArray
)
619 TYPE_MARSHAL(ComplexArray
)
620 TYPE_MARSHAL(EncapsulatedUnion
)
621 TYPE_MARSHAL(NonEncapsulatedUnion
)
622 TYPE_MARSHAL(XmitOrRepAs
)
623 TYPE_MARSHAL(UserMarshal
)
624 TYPE_MARSHAL(InterfacePointer
)
626 SIMPLE_TYPE_MARSHAL(ConformantString
)
627 SIMPLE_TYPE_MARSHAL(NonConformantString
)
630 #undef SIMPLE_TYPE_MARSHAL
632 RPCRTAPI
void RPC_ENTRY
633 NdrCorrelationInitialize( PMIDL_STUB_MESSAGE pStubMsg
, void *pMemory
, ULONG CacheSize
, ULONG flags
);
634 RPCRTAPI
void RPC_ENTRY
635 NdrCorrelationPass( PMIDL_STUB_MESSAGE pStubMsg
);
636 RPCRTAPI
void RPC_ENTRY
637 NdrCorrelationFree( PMIDL_STUB_MESSAGE pStubMsg
);
639 RPCRTAPI
void RPC_ENTRY
640 NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, LONG NumberParams
);
641 RPCRTAPI
void RPC_ENTRY
642 NdrConvert( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
644 #define USER_MARSHAL_FC_BYTE 1
645 #define USER_MARSHAL_FC_CHAR 2
646 #define USER_MARSHAL_FC_SMALL 3
647 #define USER_MARSHAL_FC_USMALL 4
648 #define USER_MARSHAL_FC_WCHAR 5
649 #define USER_MARSHAL_FC_SHORT 6
650 #define USER_MARSHAL_FC_USHORT 7
651 #define USER_MARSHAL_FC_LONG 8
652 #define USER_MARSHAL_FC_ULONG 9
653 #define USER_MARSHAL_FC_FLOAT 10
654 #define USER_MARSHAL_FC_HYPER 11
655 #define USER_MARSHAL_FC_DOUBLE 12
657 RPCRTAPI
unsigned char* RPC_ENTRY
658 NdrUserMarshalSimpleTypeConvert( ULONG
*pFlags
, unsigned char *pBuffer
, unsigned char FormatChar
);
660 CLIENT_CALL_RETURN RPC_VAR_ENTRY
661 NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
662 CLIENT_CALL_RETURN RPC_VAR_ENTRY
663 NdrClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
664 CLIENT_CALL_RETURN RPC_VAR_ENTRY
665 NdrAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
666 CLIENT_CALL_RETURN RPC_VAR_ENTRY
667 NdrDcomAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor
, PFORMAT_STRING pFormat
, ... );
669 RPCRTAPI
void RPC_ENTRY
670 NdrServerCall2( PRPC_MESSAGE pRpcMsg
);
671 RPCRTAPI
void RPC_ENTRY
672 NdrServerCall( PRPC_MESSAGE pRpcMsg
);
673 RPCRTAPI
void RPC_ENTRY
674 NdrAsyncServerCall( PRPC_MESSAGE pRpcMsg
);
676 RPCRTAPI LONG RPC_ENTRY
677 NdrStubCall2( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
678 RPCRTAPI LONG RPC_ENTRY
679 NdrStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
680 RPCRTAPI LONG RPC_ENTRY
681 NdrAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
682 RPCRTAPI LONG RPC_ENTRY
683 NdrDcomAsyncStubCall( struct IRpcStubBuffer
* pThis
, struct IRpcChannelBuffer
* pChannel
, PRPC_MESSAGE pRpcMsg
, DWORD
* pdwStubPhase
);
685 RPCRTAPI
void* RPC_ENTRY
686 NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg
, SIZE_T Len
) __WINE_ALLOC_SIZE(2);
688 RPCRTAPI
void RPC_ENTRY
689 NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
, void *ArgAddr
);
691 RPCRTAPI RPC_STATUS RPC_ENTRY
692 NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg
, ULONG
*pCommStatus
,
693 ULONG
*pFaultStatus
, RPC_STATUS Status_
);
695 RPCRTAPI
void* RPC_ENTRY
696 NdrOleAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1);
697 RPCRTAPI
void RPC_ENTRY
698 NdrOleFree( void* NodeToFree
);
700 RPCRTAPI
void RPC_ENTRY
701 NdrClientInitialize( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
702 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
703 RPCRTAPI
void RPC_ENTRY
704 NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage
, PMIDL_STUB_MESSAGE pStubMsg
,
705 PMIDL_STUB_DESC pStubDesc
, unsigned int ProcNum
);
706 RPCRTAPI
unsigned char* RPC_ENTRY
707 NdrServerInitialize( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
708 RPCRTAPI
unsigned char* RPC_ENTRY
709 NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
);
710 RPCRTAPI
unsigned char* RPC_ENTRY
711 NdrServerInitializeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
, PRPC_MESSAGE pRpcMsg
);
712 RPCRTAPI
void RPC_ENTRY
713 NdrServerInitializeMarshall( PRPC_MESSAGE pRpcMsg
, PMIDL_STUB_MESSAGE pStubMsg
);
714 RPCRTAPI
void RPC_ENTRY
715 NdrServerMarshall( struct IRpcStubBuffer
*pThis
, struct IRpcChannelBuffer
*pChannel
, PMIDL_STUB_MESSAGE pStubMsg
, PFORMAT_STRING pFormat
);
716 RPCRTAPI
void RPC_ENTRY
717 NdrServerUnmarshall( struct IRpcChannelBuffer
*pChannel
, PRPC_MESSAGE pRpcMsg
,
718 PMIDL_STUB_MESSAGE pStubMsg
, PMIDL_STUB_DESC pStubDesc
,
719 PFORMAT_STRING pFormat
, void *pParamList
);
720 RPCRTAPI
unsigned char* RPC_ENTRY
721 NdrGetBuffer( PMIDL_STUB_MESSAGE stubmsg
, ULONG buflen
, RPC_BINDING_HANDLE handle
);
722 RPCRTAPI
void RPC_ENTRY
723 NdrFreeBuffer( PMIDL_STUB_MESSAGE pStubMsg
);
724 RPCRTAPI
unsigned char* RPC_ENTRY
725 NdrSendReceive( PMIDL_STUB_MESSAGE stubmsg
, unsigned char *buffer
);
727 RPCRTAPI
unsigned char * RPC_ENTRY
728 NdrNsGetBuffer( PMIDL_STUB_MESSAGE pStubMsg
, ULONG BufferLength
, RPC_BINDING_HANDLE Handle
);
729 RPCRTAPI
unsigned char * RPC_ENTRY
730 NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg
, unsigned char *pBufferEnd
, RPC_BINDING_HANDLE
*pAutoHandle
);
732 RPCRTAPI RPC_STATUS RPC_ENTRY
733 NdrGetDcomProtocolVersion( PMIDL_STUB_MESSAGE pStubMsg
, RPC_VERSION
*pVersion
);
735 RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY
736 NdrFullPointerXlatInit( ULONG NumberOfPointers
, XLAT_SIDE XlatSide
);
737 RPCRTAPI
void RPC_ENTRY
738 NdrFullPointerXlatFree( PFULL_PTR_XLAT_TABLES pXlatTables
);
739 RPCRTAPI
int RPC_ENTRY
740 NdrFullPointerQueryPointer( PFULL_PTR_XLAT_TABLES pXlatTables
, void *pPointer
,
741 unsigned char QueryType
, ULONG
*pRefId
);
742 RPCRTAPI
int RPC_ENTRY
743 NdrFullPointerQueryRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
,
744 unsigned char QueryType
, void **ppPointer
);
745 RPCRTAPI
void RPC_ENTRY
746 NdrFullPointerInsertRefId( PFULL_PTR_XLAT_TABLES pXlatTables
, ULONG RefId
, void *pPointer
);
747 RPCRTAPI
int RPC_ENTRY
748 NdrFullPointerFree( PFULL_PTR_XLAT_TABLES pXlatTables
, void *Pointer
);
750 RPCRTAPI
void RPC_ENTRY
751 NdrRpcSsEnableAllocate( PMIDL_STUB_MESSAGE pMessage
);
752 RPCRTAPI
void RPC_ENTRY
753 NdrRpcSsDisableAllocate( PMIDL_STUB_MESSAGE pMessage
);
754 RPCRTAPI
void RPC_ENTRY
755 NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage
);
756 RPCRTAPI
void * RPC_ENTRY
757 NdrRpcSmClientAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1);
758 RPCRTAPI
void RPC_ENTRY
759 NdrRpcSmClientFree( void *NodeToFree
);
760 RPCRTAPI
void * RPC_ENTRY
761 NdrRpcSsDefaultAllocate( SIZE_T Size
) __WINE_ALLOC_SIZE(1);
762 RPCRTAPI
void RPC_ENTRY
763 NdrRpcSsDefaultFree( void *NodeToFree
);
765 RPCRTAPI RPC_STATUS RPC_ENTRY
766 NdrGetUserMarshalInfo( ULONG
*pFlags
, ULONG InformationLevel
, NDR_USER_MARSHAL_INFO
*pMarshalInfo
);
775 #endif /*__WINE_RPCNDR_H */