winepulse: Move session_wrapper_create into mmdevapi.
[wine.git] / include / rpcndr.h
blob498aa4ddd40af204d6d61ad37b41f5a8fa40e963
1 /*
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 )
21 #endif
23 #ifndef __WINE_RPCNDR_H
24 #define __WINE_RPCNDR_H
26 #include <basetsd.h>
27 #include <rpcsal.h>
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
33 #undef CONST_VTBL
34 #ifdef CONST_VTABLE
35 # define CONST_VTBL const
36 #else
37 # define CONST_VTBL
38 #endif
40 #ifndef EXTERN_GUID
41 #ifdef __cplusplus
42 #define EXTERN_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
43 EXTERN_C const GUID DECLSPEC_SELECTANY name DECLSPEC_HIDDEN; \
44 EXTERN_C const GUID DECLSPEC_SELECTANY name = \
45 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
46 #else
47 #define EXTERN_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
48 EXTERN_C const GUID name
49 #endif
50 #endif
52 #define NDR_CHAR_REP_MASK ((ULONG)0x000f)
53 #define NDR_INT_REP_MASK ((ULONG)0x00f0)
54 #define NDR_FLOAT_REP_MASK ((ULONG)0xff00)
55 #define NDR_IEEE_FLOAT ((ULONG)0x0000)
56 #define NDR_VAX_FLOAT ((ULONG)0x0100)
57 #define NDR_IBM_FLOAT ((ULONG)0x0300)
58 #define NDR_ASCII_CHAR ((ULONG)0x0000)
59 #define NDR_EBCDIC_CHAR ((ULONG)0x0001)
60 #define NDR_LITTLE_ENDIAN ((ULONG)0x0010)
61 #define NDR_BIG_ENDIAN ((ULONG)0x0000)
62 #define NDR_LOCAL_DATA_REPRESENTATION NDR_LITTLE_ENDIAN
63 #define NDR_LOCAL_ENDIAN NDR_LITTLE_ENDIAN
65 #define TARGET_IS_NT50_OR_LATER 1
66 #define TARGET_IS_NT40_OR_LATER 1
67 #define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
69 #define small char
70 typedef unsigned char byte;
71 typedef INT64 hyper;
72 typedef UINT64 MIDL_uhyper;
73 typedef unsigned char boolean;
75 #define __RPC_CALLEE WINAPI
76 #define RPC_VAR_ENTRY WINAPIV
77 #define NDR_SHAREABLE static
79 #define MIDL_ascii_strlen(s) strlen(s)
80 #define MIDL_ascii_strcpy(d,s) strcpy(d,s)
81 #define MIDL_memset(d,v,n) memset(d,v,n)
82 #define midl_user_free MIDL_user_free
83 #define midl_user_allocate MIDL_user_allocate
85 void * __RPC_USER MIDL_user_allocate(SIZE_T);
86 void __RPC_USER MIDL_user_free(void *);
88 #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
89 #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
90 (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
92 #define RPC_BAD_STUB_DATA_EXCEPTION_FILTER \
93 ((RpcExceptionCode() == STATUS_ACCESS_VIOLATION) || \
94 (RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || \
95 (RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
96 (RpcExceptionCode() == RPC_S_INVALID_BOUND))
98 typedef struct _NDR_SCONTEXT
100 void *pad[2];
101 void *userContext;
102 } *NDR_SCONTEXT;
104 #define NDRSContextValue(hContext) (&(hContext)->userContext)
105 #define cbNDRContext 20
107 typedef void (__RPC_USER *NDR_RUNDOWN)(void *context);
108 typedef void (__RPC_USER *NDR_NOTIFY_ROUTINE)(void);
109 typedef void (__RPC_USER *NDR_NOTIFY2_ROUTINE)(boolean flag);
111 #define DECLSPEC_UUID(x)
112 #define MIDL_INTERFACE(x) struct
114 struct _MIDL_STUB_MESSAGE;
115 struct _MIDL_STUB_DESC;
116 struct _FULL_PTR_XLAT_TABLES;
117 struct NDR_ALLOC_ALL_NODES_CONTEXT;
118 struct NDR_POINTER_QUEUE_STATE;
120 typedef unsigned char *RPC_BUFPTR;
121 typedef ULONG RPC_LENGTH;
122 typedef void (__RPC_USER *EXPR_EVAL)(struct _MIDL_STUB_MESSAGE *);
123 typedef const unsigned char *PFORMAT_STRING;
125 typedef struct
127 LONG Dimension;
128 ULONG *BufferConformanceMark;
129 ULONG *BufferVarianceMark;
130 ULONG *MaxCountArray;
131 ULONG *OffsetArray;
132 ULONG *ActualCountArray;
133 } ARRAY_INFO, *PARRAY_INFO;
135 typedef struct
137 ULONG WireCodeset;
138 ULONG DesiredReceivingCodeset;
139 void *CSArrayInfo;
140 } CS_STUB_INFO;
142 typedef struct _NDR_PIPE_DESC *PNDR_PIPE_DESC;
143 typedef struct _NDR_PIPE_MESSAGE *PNDR_PIPE_MESSAGE;
144 typedef struct _NDR_ASYNC_MESSAGE *PNDR_ASYNC_MESSAGE;
145 typedef struct _NDR_CORRELATION_INFO *PNDR_CORRELATION_INFO;
147 typedef struct _MIDL_STUB_MESSAGE
149 PRPC_MESSAGE RpcMsg;
150 unsigned char *Buffer;
151 unsigned char *BufferStart;
152 unsigned char *BufferEnd;
153 unsigned char *BufferMark;
154 ULONG BufferLength;
155 ULONG MemorySize;
156 unsigned char *Memory;
157 unsigned char IsClient;
158 unsigned char Pad;
159 unsigned short uFlags2;
160 int ReuseBuffer;
161 struct NDR_ALLOC_ALL_NODES_CONTEXT *pAllocAllNodesContext;
162 struct NDR_POINTER_QUEUE_STATE *pPointerQueueState;
163 int IgnoreEmbeddedPointers;
164 unsigned char *PointerBufferMark;
165 unsigned char CorrDespIncrement;
166 unsigned char uFlags;
167 unsigned short UniquePtrCount;
168 ULONG_PTR MaxCount;
169 ULONG Offset;
170 ULONG ActualCount;
171 void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
172 void (__RPC_API *pfnFree)(void *);
173 unsigned char *StackTop;
174 unsigned char *pPresentedType;
175 unsigned char *pTransmitType;
176 handle_t SavedHandle;
177 const struct _MIDL_STUB_DESC *StubDesc;
178 struct _FULL_PTR_XLAT_TABLES *FullPtrXlatTables;
179 ULONG FullPtrRefId;
180 ULONG PointerLength;
181 unsigned int fInDontFree:1;
182 unsigned int fDontCallFreeInst:1;
183 unsigned int fInOnlyParam:1;
184 unsigned int fHasReturn:1;
185 unsigned int fHasExtensions:1;
186 unsigned int fHasNewCorrDesc:1;
187 unsigned int fIsIn:1;
188 unsigned int fIsOut:1;
189 unsigned int fIsOicf:1;
190 unsigned int fBufferValid:1;
191 unsigned int fHasMemoryValidateCallback:1;
192 unsigned int fInFree:1;
193 unsigned int fNeedMCCP:1;
194 int fUnused:3;
195 int fUnused2:16;
196 DWORD dwDestContext;
197 void *pvDestContext;
198 NDR_SCONTEXT *SavedContextHandles;
199 LONG ParamNumber;
200 struct IRpcChannelBuffer *pRpcChannelBuffer;
201 PARRAY_INFO pArrayInfo;
202 ULONG *SizePtrCountArray;
203 ULONG *SizePtrOffsetArray;
204 ULONG *SizePtrLengthArray;
205 void *pArgQueue;
206 DWORD dwStubPhase;
207 void *LowStackMark;
208 PNDR_ASYNC_MESSAGE pAsyncMsg;
209 PNDR_CORRELATION_INFO pCorrInfo;
210 unsigned char *pCorrMemory;
211 void *pMemoryList;
212 CS_STUB_INFO *pCSInfo;
213 unsigned char *ConformanceMark;
214 unsigned char *VarianceMark;
215 INT_PTR Unused; /* BackingStoreLowMark on IA64 */
216 struct _NDR_PROC_CONTEXT *pContext;
217 void* ContextHandleHash;
218 void* pUserMarshalList;
219 INT_PTR Reserved51_3;
220 INT_PTR Reserved51_4;
221 INT_PTR Reserved51_5;
222 } MIDL_STUB_MESSAGE, *PMIDL_STUB_MESSAGE;
224 typedef void * (__RPC_API * GENERIC_BINDING_ROUTINE)(void *);
225 typedef void (__RPC_API * GENERIC_UNBIND_ROUTINE)(void *, unsigned char *);
227 typedef struct _GENERIC_BINDING_ROUTINE_PAIR
229 GENERIC_BINDING_ROUTINE pfnBind;
230 GENERIC_UNBIND_ROUTINE pfnUnbind;
231 } GENERIC_BINDING_ROUTINE_PAIR, *PGENERIC_BINDING_ROUTINE_PAIR;
233 typedef struct __GENERIC_BINDING_INFO
235 void *pObj;
236 unsigned int Size;
237 GENERIC_BINDING_ROUTINE pfnBind;
238 GENERIC_UNBIND_ROUTINE pfnUnbind;
239 } GENERIC_BINDING_INFO, *PGENERIC_BINDING_INFO;
241 typedef void (__RPC_USER *XMIT_HELPER_ROUTINE)(PMIDL_STUB_MESSAGE);
243 typedef struct _XMIT_ROUTINE_QUINTUPLE
245 XMIT_HELPER_ROUTINE pfnTranslateToXmit;
246 XMIT_HELPER_ROUTINE pfnTranslateFromXmit;
247 XMIT_HELPER_ROUTINE pfnFreeXmit;
248 XMIT_HELPER_ROUTINE pfnFreeInst;
249 } XMIT_ROUTINE_QUINTUPLE, *PXMIT_ROUTINE_QUINTUPLE;
251 typedef ULONG (__RPC_USER *USER_MARSHAL_SIZING_ROUTINE)(ULONG *, ULONG, void *);
252 typedef unsigned char * (__RPC_USER *USER_MARSHAL_MARSHALLING_ROUTINE)(ULONG *, unsigned char *, void *);
253 typedef unsigned char * (__RPC_USER *USER_MARSHAL_UNMARSHALLING_ROUTINE)(ULONG *, unsigned char *, void *);
254 typedef void (__RPC_USER *USER_MARSHAL_FREEING_ROUTINE)(ULONG *, void *);
256 typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
258 USER_MARSHAL_SIZING_ROUTINE pfnBufferSize;
259 USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall;
260 USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall;
261 USER_MARSHAL_FREEING_ROUTINE pfnFree;
262 } USER_MARSHAL_ROUTINE_QUADRUPLE;
264 /* 'USRC' */
265 #define USER_MARSHAL_CB_SIGNATURE \
266 ( ( (DWORD)'U' << 24 ) | ( (DWORD)'S' << 16 ) | \
267 ( (DWORD)'R' << 8 ) | ( (DWORD)'C' ) )
269 typedef enum
271 USER_MARSHAL_CB_BUFFER_SIZE,
272 USER_MARSHAL_CB_MARSHALL,
273 USER_MARSHAL_CB_UNMARSHALL,
274 USER_MARSHAL_CB_FREE
275 } USER_MARSHAL_CB_TYPE;
277 typedef struct _USER_MARSHAL_CB
279 ULONG Flags;
280 PMIDL_STUB_MESSAGE pStubMsg;
281 PFORMAT_STRING pReserve;
282 ULONG Signature;
283 USER_MARSHAL_CB_TYPE CBType;
284 PFORMAT_STRING pFormat;
285 PFORMAT_STRING pTypeFormat;
286 } USER_MARSHAL_CB;
288 #define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
289 #define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
290 #define GET_USER_DATA_REP(f) HIWORD(f)
292 #define USER_CALL_IS_ASYNC 0x0100
293 #define USER_CALL_NEW_CORRELATION_DESC 0x0200
295 typedef struct _MALLOC_FREE_STRUCT
297 void * (__WINE_ALLOC_SIZE(1) __RPC_USER *pfnAllocate)(SIZE_T);
298 void (__RPC_USER *pfnFree)(void *);
299 } MALLOC_FREE_STRUCT;
301 typedef struct _COMM_FAULT_OFFSETS
303 short CommOffset;
304 short FaultOffset;
305 } COMM_FAULT_OFFSETS;
307 typedef struct _MIDL_STUB_DESC
309 void *RpcInterfaceInformation;
310 void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
311 void (__RPC_API *pfnFree)(void *);
312 union {
313 handle_t *pAutoHandle;
314 handle_t *pPrimitiveHandle;
315 PGENERIC_BINDING_INFO pGenericBindingInfo;
316 } IMPLICIT_HANDLE_INFO;
317 const NDR_RUNDOWN *apfnNdrRundownRoutines;
318 const GENERIC_BINDING_ROUTINE_PAIR *aGenericBindingRoutinePairs;
319 const EXPR_EVAL *apfnExprEval;
320 const XMIT_ROUTINE_QUINTUPLE *aXmitQuintuple;
321 const unsigned char *pFormatTypes;
322 int fCheckBounds;
323 ULONG Version;
324 MALLOC_FREE_STRUCT *pMallocFreeStruct;
325 LONG MIDLVersion;
326 const COMM_FAULT_OFFSETS *CommFaultOffsets;
327 const USER_MARSHAL_ROUTINE_QUADRUPLE *aUserMarshalQuadruple;
328 const NDR_NOTIFY_ROUTINE *NotifyRoutineTable;
329 ULONG_PTR mFlags;
330 ULONG_PTR Reserved3;
331 ULONG_PTR Reserved4;
332 ULONG_PTR Reserved5;
333 } MIDL_STUB_DESC;
334 typedef const MIDL_STUB_DESC *PMIDL_STUB_DESC;
336 typedef struct _MIDL_FORMAT_STRING
338 short Pad;
339 #if defined(__GNUC__)
340 unsigned char Format[0];
341 #else
342 unsigned char Format[1];
343 #endif
344 } MIDL_FORMAT_STRING;
346 typedef struct _MIDL_SYNTAX_INFO
348 RPC_SYNTAX_IDENTIFIER TransferSyntax;
349 RPC_DISPATCH_TABLE* DispatchTable;
350 PFORMAT_STRING ProcString;
351 const unsigned short* FmtStringOffset;
352 PFORMAT_STRING TypeString;
353 const void* aUserMarshalQuadruple;
354 ULONG_PTR pReserved1;
355 ULONG_PTR pReserved2;
356 } MIDL_SYNTAX_INFO, *PMIDL_SYNTAX_INFO;
358 typedef void (__RPC_API *STUB_THUNK)( PMIDL_STUB_MESSAGE );
360 #ifdef WINE_STRICT_PROTOTYPES
361 typedef LONG (__RPC_API *SERVER_ROUTINE)(void);
362 #else
363 typedef LONG (__RPC_API *SERVER_ROUTINE)();
364 #endif
366 typedef struct _MIDL_SERVER_INFO_
368 PMIDL_STUB_DESC pStubDesc;
369 const SERVER_ROUTINE *DispatchTable;
370 PFORMAT_STRING ProcString;
371 const unsigned short *FmtStringOffset;
372 const STUB_THUNK *ThunkTable;
373 PRPC_SYNTAX_IDENTIFIER pTransferSyntax;
374 ULONG_PTR nCount;
375 PMIDL_SYNTAX_INFO pSyntaxInfo;
376 } MIDL_SERVER_INFO, *PMIDL_SERVER_INFO;
378 typedef struct _MIDL_STUBLESS_PROXY_INFO
380 PMIDL_STUB_DESC pStubDesc;
381 PFORMAT_STRING ProcFormatString;
382 const unsigned short *FormatStringOffset;
383 PRPC_SYNTAX_IDENTIFIER pTransferSyntax;
384 ULONG_PTR nCount;
385 PMIDL_SYNTAX_INFO pSyntaxInfo;
386 } MIDL_STUBLESS_PROXY_INFO, *PMIDL_STUBLESS_PROXY_INFO;
389 #if defined(__i386__) && !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__CYGWIN__)
390 /* Calling convention for returning structures/unions is different between Windows and gcc on i386 */
391 typedef LONG_PTR CLIENT_CALL_RETURN;
392 #else
393 typedef union _CLIENT_CALL_RETURN
395 void *Pointer;
396 LONG_PTR Simple;
397 } CLIENT_CALL_RETURN;
398 #endif
400 typedef enum {
401 STUB_UNMARSHAL,
402 STUB_CALL_SERVER,
403 STUB_MARSHAL,
404 STUB_CALL_SERVER_NO_HRESULT
405 } STUB_PHASE;
407 typedef enum {
408 PROXY_CALCSIZE,
409 PROXY_GETBUFFER,
410 PROXY_MARSHAL,
411 PROXY_SENDRECEIVE,
412 PROXY_UNMARSHAL
413 } PROXY_PHASE;
415 typedef enum {
416 XLAT_SERVER = 1,
417 XLAT_CLIENT
418 } XLAT_SIDE;
420 typedef struct _FULL_PTR_TO_REFID_ELEMENT {
421 struct _FULL_PTR_TO_REFID_ELEMENT *Next;
422 void *Pointer;
423 ULONG RefId;
424 unsigned char State;
425 } FULL_PTR_TO_REFID_ELEMENT, *PFULL_PTR_TO_REFID_ELEMENT;
427 /* Full pointer translation tables */
428 typedef struct _FULL_PTR_XLAT_TABLES {
429 struct {
430 void **XlatTable;
431 unsigned char *StateTable;
432 ULONG NumberOfEntries;
433 } RefIdToPointer;
435 struct {
436 PFULL_PTR_TO_REFID_ELEMENT *XlatTable;
437 ULONG NumberOfBuckets;
438 ULONG HashMask;
439 } PointerToRefId;
441 ULONG NextRefId;
442 XLAT_SIDE XlatSide;
443 } FULL_PTR_XLAT_TABLES, *PFULL_PTR_XLAT_TABLES;
445 struct IRpcStubBuffer;
447 #ifndef _ERROR_STATUS_T_DEFINED
448 typedef ULONG error_status_t;
449 #define _ERROR_STATUS_T_DEFINED
450 #endif
452 typedef void * NDR_CCONTEXT;
454 typedef struct _SCONTEXT_QUEUE {
455 ULONG NumberOfObjects;
456 NDR_SCONTEXT *ArrayOfObjects;
457 } SCONTEXT_QUEUE, *PSCONTEXT_QUEUE;
459 typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
461 void *Buffer;
462 ULONG BufferSize;
463 void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
464 void (__RPC_API *pfnFree)(void *);
465 struct IRpcChannelBuffer *pRpcChannelBuffer;
466 ULONG_PTR Reserved[5];
467 } NDR_USER_MARSHAL_INFO_LEVEL1;
469 typedef struct _NDR_USER_MARSHAL_INFO
471 ULONG InformationLevel;
472 union
474 NDR_USER_MARSHAL_INFO_LEVEL1 Level1;
475 } DUMMYUNIONNAME1;
476 } NDR_USER_MARSHAL_INFO;
478 /* Context Handles */
480 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
481 NDRCContextBinding( NDR_CCONTEXT CContext );
483 RPCRTAPI void RPC_ENTRY
484 NDRCContextMarshall( NDR_CCONTEXT CContext, void *pBuff );
486 RPCRTAPI void RPC_ENTRY
487 NDRCContextUnmarshall( NDR_CCONTEXT *pCContext, RPC_BINDING_HANDLE hBinding,
488 void *pBuff, ULONG DataRepresentation );
490 RPCRTAPI void RPC_ENTRY
491 NDRSContextMarshall( NDR_SCONTEXT CContext, void *pBuff, NDR_RUNDOWN userRunDownIn );
493 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
494 NDRSContextUnmarshall( void *pBuff, ULONG DataRepresentation );
496 RPCRTAPI void RPC_ENTRY
497 NDRSContextMarshallEx( RPC_BINDING_HANDLE BindingHandle, NDR_SCONTEXT CContext,
498 void *pBuff, NDR_RUNDOWN userRunDownIn );
500 RPCRTAPI void RPC_ENTRY
501 NDRSContextMarshall2( RPC_BINDING_HANDLE BindingHandle, NDR_SCONTEXT CContext,
502 void *pBuff, NDR_RUNDOWN userRunDownIn, void * CtxGuard,
503 ULONG Flags );
505 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
506 NDRSContextUnmarshallEx( RPC_BINDING_HANDLE BindingHandle, void *pBuff,
507 ULONG DataRepresentation );
509 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
510 NDRSContextUnmarshall2( RPC_BINDING_HANDLE BindingHandle, void *pBuff,
511 ULONG DataRepresentation, void *CtxGuard,
512 ULONG Flags );
514 RPCRTAPI void RPC_ENTRY
515 NdrClientContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT ContextHandle, int fCheck );
517 RPCRTAPI void RPC_ENTRY
518 NdrClientContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT* pContextHandle,
519 RPC_BINDING_HANDLE BindHandle );
521 RPCRTAPI void RPC_ENTRY
522 NdrServerContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle, NDR_RUNDOWN RundownRoutine );
524 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
525 NdrServerContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg );
527 RPCRTAPI void RPC_ENTRY
528 NdrContextHandleSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
530 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
531 NdrContextHandleInitialize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
533 RPCRTAPI void RPC_ENTRY
534 NdrServerContextNewMarshall( PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle,
535 NDR_RUNDOWN RundownRoutine, PFORMAT_STRING pFormat );
537 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
538 NdrServerContextNewUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
540 RPCRTAPI RPC_STATUS RPC_ENTRY
541 RpcSmDestroyClientContext( void **ContextHandle );
543 RPCRTAPI void RPC_ENTRY
544 RpcSsDestroyClientContext( void **ContextHandle );
546 RPCRTAPI void RPC_ENTRY
547 NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar );
548 RPCRTAPI void RPC_ENTRY
549 NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar );
551 RPCRTAPI unsigned char* RPC_ENTRY
552 NdrByteCountPointerMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
553 RPCRTAPI unsigned char* RPC_ENTRY
554 NdrByteCountPointerUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc );
555 RPCRTAPI void RPC_ENTRY
556 NdrByteCountPointerBufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
557 RPCRTAPI void RPC_ENTRY
558 NdrByteCountPointerFree( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
560 RPCRTAPI unsigned char* RPC_ENTRY
561 NdrRangeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc );
563 /* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
564 #define SIMPLE_TYPE_MARSHAL(type) \
565 RPCRTAPI unsigned char* RPC_ENTRY \
566 Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
567 RPCRTAPI unsigned char* RPC_ENTRY \
568 Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
569 RPCRTAPI void RPC_ENTRY \
570 Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
571 RPCRTAPI ULONG RPC_ENTRY \
572 Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
574 #define TYPE_MARSHAL(type) \
575 SIMPLE_TYPE_MARSHAL(type) \
576 RPCRTAPI void RPC_ENTRY \
577 Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
579 TYPE_MARSHAL(Pointer)
580 TYPE_MARSHAL(SimpleStruct)
581 TYPE_MARSHAL(ConformantStruct)
582 TYPE_MARSHAL(ConformantVaryingStruct)
583 TYPE_MARSHAL(ComplexStruct)
584 TYPE_MARSHAL(FixedArray)
585 TYPE_MARSHAL(ConformantArray)
586 TYPE_MARSHAL(ConformantVaryingArray)
587 TYPE_MARSHAL(VaryingArray)
588 TYPE_MARSHAL(ComplexArray)
589 TYPE_MARSHAL(EncapsulatedUnion)
590 TYPE_MARSHAL(NonEncapsulatedUnion)
591 TYPE_MARSHAL(XmitOrRepAs)
592 TYPE_MARSHAL(UserMarshal)
593 TYPE_MARSHAL(InterfacePointer)
595 SIMPLE_TYPE_MARSHAL(ConformantString)
596 SIMPLE_TYPE_MARSHAL(NonConformantString)
598 #undef TYPE_MARSHAL
599 #undef SIMPLE_TYPE_MARSHAL
601 RPCRTAPI void RPC_ENTRY
602 NdrCorrelationInitialize( PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG flags );
603 RPCRTAPI void RPC_ENTRY
604 NdrCorrelationPass( PMIDL_STUB_MESSAGE pStubMsg );
605 RPCRTAPI void RPC_ENTRY
606 NdrCorrelationFree( PMIDL_STUB_MESSAGE pStubMsg );
608 RPCRTAPI void RPC_ENTRY
609 NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, LONG NumberParams );
610 RPCRTAPI void RPC_ENTRY
611 NdrConvert( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
613 #define USER_MARSHAL_FC_BYTE 1
614 #define USER_MARSHAL_FC_CHAR 2
615 #define USER_MARSHAL_FC_SMALL 3
616 #define USER_MARSHAL_FC_USMALL 4
617 #define USER_MARSHAL_FC_WCHAR 5
618 #define USER_MARSHAL_FC_SHORT 6
619 #define USER_MARSHAL_FC_USHORT 7
620 #define USER_MARSHAL_FC_LONG 8
621 #define USER_MARSHAL_FC_ULONG 9
622 #define USER_MARSHAL_FC_FLOAT 10
623 #define USER_MARSHAL_FC_HYPER 11
624 #define USER_MARSHAL_FC_DOUBLE 12
626 RPCRTAPI unsigned char* RPC_ENTRY
627 NdrUserMarshalSimpleTypeConvert( ULONG *pFlags, unsigned char *pBuffer, unsigned char FormatChar );
629 CLIENT_CALL_RETURN RPC_VAR_ENTRY
630 NdrClientCall( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
631 CLIENT_CALL_RETURN RPC_VAR_ENTRY
632 NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
633 CLIENT_CALL_RETURN RPC_VAR_ENTRY
634 NdrClientCall3( MIDL_STUBLESS_PROXY_INFO *info, ULONG proc, void *retval, ... );
635 CLIENT_CALL_RETURN RPC_VAR_ENTRY
636 NdrAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
637 CLIENT_CALL_RETURN RPC_VAR_ENTRY
638 Ndr64AsyncClientCall( MIDL_STUBLESS_PROXY_INFO *info, ULONG proc, void *retval, ... );
639 CLIENT_CALL_RETURN RPC_VAR_ENTRY
640 NdrDcomAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
642 RPCRTAPI void RPC_ENTRY
643 NdrServerCall2( PRPC_MESSAGE pRpcMsg );
644 RPCRTAPI void RPC_ENTRY
645 NdrServerCall( PRPC_MESSAGE pRpcMsg );
646 RPCRTAPI void RPC_ENTRY
647 NdrServerCallAll( PRPC_MESSAGE pRpcMsg );
648 RPCRTAPI void RPC_ENTRY
649 NdrAsyncServerCall( PRPC_MESSAGE pRpcMsg );
651 RPCRTAPI LONG RPC_ENTRY
652 NdrStubCall2( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
653 RPCRTAPI LONG RPC_ENTRY
654 NdrStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
655 RPCRTAPI LONG RPC_ENTRY
656 NdrAsyncStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
657 RPCRTAPI LONG RPC_ENTRY
658 NdrDcomAsyncStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
660 RPCRTAPI void* RPC_ENTRY
661 NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg, SIZE_T Len ) __WINE_ALLOC_SIZE(2) __WINE_MALLOC;
663 RPCRTAPI void RPC_ENTRY
664 NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, void *ArgAddr );
666 RPCRTAPI RPC_STATUS RPC_ENTRY
667 NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg, ULONG *pCommStatus,
668 ULONG *pFaultStatus, RPC_STATUS Status_ );
670 RPCRTAPI void RPC_ENTRY
671 NdrOleFree( void* NodeToFree );
672 RPCRTAPI void* RPC_ENTRY
673 NdrOleAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrOleFree) __WINE_MALLOC;
675 RPCRTAPI void RPC_ENTRY
676 NdrClientInitialize( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg,
677 PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum );
678 RPCRTAPI void RPC_ENTRY
679 NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg,
680 PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum );
681 RPCRTAPI unsigned char* RPC_ENTRY
682 NdrServerInitialize( PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc );
683 RPCRTAPI unsigned char* RPC_ENTRY
684 NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc );
685 RPCRTAPI unsigned char* RPC_ENTRY
686 NdrServerInitializeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, PRPC_MESSAGE pRpcMsg );
687 RPCRTAPI void RPC_ENTRY
688 NdrServerInitializeMarshall( PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg );
689 RPCRTAPI void RPC_ENTRY
690 NdrServerMarshall( struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
691 RPCRTAPI void RPC_ENTRY
692 NdrServerUnmarshall( struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg,
693 PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc,
694 PFORMAT_STRING pFormat, void *pParamList );
695 RPCRTAPI unsigned char* RPC_ENTRY
696 NdrGetBuffer( PMIDL_STUB_MESSAGE stubmsg, ULONG buflen, RPC_BINDING_HANDLE handle );
697 RPCRTAPI void RPC_ENTRY
698 NdrFreeBuffer( PMIDL_STUB_MESSAGE pStubMsg );
699 RPCRTAPI unsigned char* RPC_ENTRY
700 NdrSendReceive( PMIDL_STUB_MESSAGE stubmsg, unsigned char *buffer );
702 RPCRTAPI unsigned char * RPC_ENTRY
703 NdrNsGetBuffer( PMIDL_STUB_MESSAGE pStubMsg, ULONG BufferLength, RPC_BINDING_HANDLE Handle );
704 RPCRTAPI unsigned char * RPC_ENTRY
705 NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pBufferEnd, RPC_BINDING_HANDLE *pAutoHandle );
707 RPCRTAPI RPC_STATUS RPC_ENTRY
708 NdrGetDcomProtocolVersion( PMIDL_STUB_MESSAGE pStubMsg, RPC_VERSION *pVersion );
710 RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY
711 NdrFullPointerXlatInit( ULONG NumberOfPointers, XLAT_SIDE XlatSide );
712 RPCRTAPI void RPC_ENTRY
713 NdrFullPointerXlatFree( PFULL_PTR_XLAT_TABLES pXlatTables );
714 RPCRTAPI int RPC_ENTRY
715 NdrFullPointerQueryPointer( PFULL_PTR_XLAT_TABLES pXlatTables, void *pPointer,
716 unsigned char QueryType, ULONG *pRefId );
717 RPCRTAPI int RPC_ENTRY
718 NdrFullPointerQueryRefId( PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId,
719 unsigned char QueryType, void **ppPointer );
720 RPCRTAPI void RPC_ENTRY
721 NdrFullPointerInsertRefId( PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId, void *pPointer );
722 RPCRTAPI int RPC_ENTRY
723 NdrFullPointerFree( PFULL_PTR_XLAT_TABLES pXlatTables, void *Pointer );
725 RPCRTAPI void RPC_ENTRY
726 NdrRpcSsEnableAllocate( PMIDL_STUB_MESSAGE pMessage );
727 RPCRTAPI void RPC_ENTRY
728 NdrRpcSsDisableAllocate( PMIDL_STUB_MESSAGE pMessage );
729 RPCRTAPI void RPC_ENTRY
730 NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage );
731 RPCRTAPI void RPC_ENTRY
732 NdrRpcSmClientFree( void *NodeToFree );
733 RPCRTAPI void * RPC_ENTRY
734 NdrRpcSmClientAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrRpcSmClientFree) __WINE_MALLOC;
735 RPCRTAPI void RPC_ENTRY
736 NdrRpcSsDefaultFree( void *NodeToFree );
737 RPCRTAPI void * RPC_ENTRY
738 NdrRpcSsDefaultAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(NdrRpcSsDefaultFree) __WINE_MALLOC;
740 RPCRTAPI RPC_STATUS RPC_ENTRY
741 NdrGetUserMarshalInfo( ULONG *pFlags, ULONG InformationLevel, NDR_USER_MARSHAL_INFO *pMarshalInfo );
743 #ifdef __cplusplus
745 #endif
746 #endif /*__WINE_RPCNDR_H */