msvcr110: Fix typo in exported symbol _set_SSE2_enable.
[wine/wine-gecko.git] / include / rpcndr.h
blobf79556670382ed237cacf6b7177a2cb238e90c99
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 const GUID DECLSPEC_SELECTANY name DECLSPEC_HIDDEN; \
49 const GUID DECLSPEC_SELECTANY name = \
50 { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
51 #endif
52 #endif
54 /* stupid #if can't handle casts... this __stupidity
55 is just a workaround for that limitation */
57 #define __NDR_CHAR_REP_MASK 0x000f
58 #define __NDR_INT_REP_MASK 0x00f0
59 #define __NDR_FLOAT_REP_MASK 0xff00
61 #define __NDR_IEEE_FLOAT 0x0000
62 #define __NDR_VAX_FLOAT 0x0100
63 #define __NDR_IBM_FLOAT 0x0300
65 #define __NDR_ASCII_CHAR 0x0000
66 #define __NDR_EBCDIC_CHAR 0x0001
68 #define __NDR_LITTLE_ENDIAN 0x0010
69 #define __NDR_BIG_ENDIAN 0x0000
71 /* Mac's are special */
72 #if defined(__RPC_MAC__)
73 # define __NDR_LOCAL_DATA_REPRESENTATION \
74 (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_BIG_ENDIAN)
75 #else
76 # define __NDR_LOCAL_DATA_REPRESENTATION \
77 (__NDR_IEEE_FLOAT | __NDR_ASCII_CHAR | __NDR_LITTLE_ENDIAN)
78 #endif
80 #define __NDR_LOCAL_ENDIAN \
81 (__NDR_LOCAL_DATA_REPRESENTATION & __NDR_INT_REP_MASK)
83 /* for convenience, define NDR_LOCAL_IS_BIG_ENDIAN iff it is */
84 #if __NDR_LOCAL_ENDIAN == __NDR_BIG_ENDIAN
85 # define NDR_LOCAL_IS_BIG_ENDIAN
86 #elif __NDR_LOCAL_ENDIAN == __NDR_LITTLE_ENDIAN
87 # undef NDR_LOCAL_IS_BIG_ENDIAN
88 #else
89 # error alien NDR_LOCAL_ENDIAN - Greg botched the defines again, please report
90 #endif
92 /* finally, do the casts like Microsoft */
94 #define NDR_CHAR_REP_MASK ((ULONG) __NDR_CHAR_REP_MASK)
95 #define NDR_INT_REP_MASK ((ULONG) __NDR_INT_REP_MASK)
96 #define NDR_FLOAT_REP_MASK ((ULONG) __NDR_FLOAT_REP_MASK)
97 #define NDR_IEEE_FLOAT ((ULONG) __NDR_IEEE_FLOAT)
98 #define NDR_VAX_FLOAT ((ULONG) __NDR_VAX_FLOAT)
99 #define NDR_IBM_FLOAT ((ULONG) __NDR_IBM_FLOAT)
100 #define NDR_ASCII_CHAR ((ULONG) __NDR_ASCII_CHAR)
101 #define NDR_EBCDIC_CHAR ((ULONG) __NDR_EBCDIC_CHAR)
102 #define NDR_LITTLE_ENDIAN ((ULONG) __NDR_LITTLE_ENDIAN)
103 #define NDR_BIG_ENDIAN ((ULONG) __NDR_BIG_ENDIAN)
104 #define NDR_LOCAL_DATA_REPRESENTATION ((ULONG) __NDR_LOCAL_DATA_REPRESENTATION)
105 #define NDR_LOCAL_ENDIAN ((ULONG) __NDR_LOCAL_ENDIAN)
108 #define TARGET_IS_NT50_OR_LATER 1
109 #define TARGET_IS_NT40_OR_LATER 1
110 #define TARGET_IS_NT351_OR_WIN95_OR_LATER 1
112 #define small char
113 typedef unsigned char byte;
114 typedef INT64 hyper;
115 typedef UINT64 MIDL_uhyper;
116 typedef unsigned char boolean;
118 #define __RPC_CALLEE WINAPI
119 #define RPC_VAR_ENTRY __cdecl
120 #define NDR_SHAREABLE static
122 #define MIDL_ascii_strlen(s) strlen(s)
123 #define MIDL_ascii_strcpy(d,s) strcpy(d,s)
124 #define MIDL_memset(d,v,n) memset(d,v,n)
125 #define midl_user_free MIDL_user_free
126 #define midl_user_allocate MIDL_user_allocate
128 void * __RPC_USER MIDL_user_allocate(SIZE_T);
129 void __RPC_USER MIDL_user_free(void *);
131 #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
132 #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
133 (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
135 #define RPC_BAD_STUB_DATA_EXCEPTION_FILTER \
136 ((RpcExceptionCode() == STATUS_ACCESS_VIOLATION) || \
137 (RpcExceptionCode() == STATUS_DATATYPE_MISALIGNMENT) || \
138 (RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
139 (RpcExceptionCode() == RPC_S_INVALID_BOUND))
141 typedef struct
143 void *pad[2];
144 void *userContext;
145 } *NDR_SCONTEXT;
147 #define NDRSContextValue(hContext) (&(hContext)->userContext)
148 #define cbNDRContext 20
150 typedef void (__RPC_USER *NDR_RUNDOWN)(void *context);
151 typedef void (__RPC_USER *NDR_NOTIFY_ROUTINE)(void);
152 typedef void (__RPC_USER *NDR_NOTIFY2_ROUTINE)(boolean flag);
154 #define DECLSPEC_UUID(x)
155 #define MIDL_INTERFACE(x) struct
157 struct _MIDL_STUB_MESSAGE;
158 struct _MIDL_STUB_DESC;
159 struct _FULL_PTR_XLAT_TABLES;
160 struct NDR_ALLOC_ALL_NODES_CONTEXT;
161 struct NDR_POINTER_QUEUE_STATE;
163 typedef unsigned char *RPC_BUFPTR;
164 typedef ULONG RPC_LENGTH;
165 typedef void (__RPC_USER *EXPR_EVAL)(struct _MIDL_STUB_MESSAGE *);
166 typedef const unsigned char *PFORMAT_STRING;
168 typedef struct
170 LONG Dimension;
171 ULONG *BufferConformanceMark;
172 ULONG *BufferVarianceMark;
173 ULONG *MaxCountArray;
174 ULONG *OffsetArray;
175 ULONG *ActualCountArray;
176 } ARRAY_INFO, *PARRAY_INFO;
178 typedef struct
180 ULONG WireCodeset;
181 ULONG DesiredReceivingCodeset;
182 void *CSArrayInfo;
183 } CS_STUB_INFO;
185 typedef struct _NDR_PIPE_DESC *PNDR_PIPE_DESC;
186 typedef struct _NDR_PIPE_MESSAGE *PNDR_PIPE_MESSAGE;
187 typedef struct _NDR_ASYNC_MESSAGE *PNDR_ASYNC_MESSAGE;
188 typedef struct _NDR_CORRELATION_INFO *PNDR_CORRELATION_INFO;
190 typedef struct _MIDL_STUB_MESSAGE
192 PRPC_MESSAGE RpcMsg;
193 unsigned char *Buffer;
194 unsigned char *BufferStart;
195 unsigned char *BufferEnd;
196 unsigned char *BufferMark;
197 ULONG BufferLength;
198 ULONG MemorySize;
199 unsigned char *Memory;
200 unsigned char IsClient;
201 unsigned char Pad;
202 unsigned short uFlags2;
203 int ReuseBuffer;
204 struct NDR_ALLOC_ALL_NODES_CONTEXT *pAllocAllNodesContext;
205 struct NDR_POINTER_QUEUE_STATE *pPointerQueueState;
206 int IgnoreEmbeddedPointers;
207 unsigned char *PointerBufferMark;
208 unsigned char CorrDespIncrement;
209 unsigned char uFlags;
210 unsigned short UniquePtrCount;
211 ULONG_PTR MaxCount;
212 ULONG Offset;
213 ULONG ActualCount;
214 void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
215 void (__RPC_API *pfnFree)(void *);
216 unsigned char *StackTop;
217 unsigned char *pPresentedType;
218 unsigned char *pTransmitType;
219 handle_t SavedHandle;
220 const struct _MIDL_STUB_DESC *StubDesc;
221 struct _FULL_PTR_XLAT_TABLES *FullPtrXlatTables;
222 ULONG FullPtrRefId;
223 ULONG PointerLength;
224 unsigned int fInDontFree:1;
225 unsigned int fDontCallFreeInst:1;
226 unsigned int fInOnlyParam:1;
227 unsigned int fHasReturn:1;
228 unsigned int fHasExtensions:1;
229 unsigned int fHasNewCorrDesc:1;
230 unsigned int fIsIn:1;
231 unsigned int fIsOut:1;
232 unsigned int fIsOicf:1;
233 unsigned int fBufferValid:1;
234 unsigned int fHasMemoryValidateCallback:1;
235 unsigned int fInFree:1;
236 unsigned int fNeedMCCP:1;
237 int fUnused:3;
238 int fUnused2:16;
239 DWORD dwDestContext;
240 void *pvDestContext;
241 NDR_SCONTEXT *SavedContextHandles;
242 LONG ParamNumber;
243 struct IRpcChannelBuffer *pRpcChannelBuffer;
244 PARRAY_INFO pArrayInfo;
245 ULONG *SizePtrCountArray;
246 ULONG *SizePtrOffsetArray;
247 ULONG *SizePtrLengthArray;
248 void *pArgQueue;
249 DWORD dwStubPhase;
250 void *LowStackMark;
251 PNDR_ASYNC_MESSAGE pAsyncMsg;
252 PNDR_CORRELATION_INFO pCorrInfo;
253 unsigned char *pCorrMemory;
254 void *pMemoryList;
255 CS_STUB_INFO *pCSInfo;
256 unsigned char *ConformanceMark;
257 unsigned char *VarianceMark;
258 INT_PTR Unused; /* BackingStoreLowMark on IA64 */
259 struct _NDR_PROC_CONTEXT *pContext;
260 void* ContextHandleHash;
261 void* pUserMarshalList;
262 INT_PTR Reserved51_3;
263 INT_PTR Reserved51_4;
264 INT_PTR Reserved51_5;
265 } MIDL_STUB_MESSAGE, *PMIDL_STUB_MESSAGE;
267 typedef void * (__RPC_API * GENERIC_BINDING_ROUTINE)(void *);
268 typedef void (__RPC_API * GENERIC_UNBIND_ROUTINE)(void *, unsigned char *);
270 typedef struct _GENERIC_BINDING_ROUTINE_PAIR
272 GENERIC_BINDING_ROUTINE pfnBind;
273 GENERIC_UNBIND_ROUTINE pfnUnbind;
274 } GENERIC_BINDING_ROUTINE_PAIR, *PGENERIC_BINDING_ROUTINE_PAIR;
276 typedef struct __GENERIC_BINDING_INFO
278 void *pObj;
279 unsigned int Size;
280 GENERIC_BINDING_ROUTINE pfnBind;
281 GENERIC_UNBIND_ROUTINE pfnUnbind;
282 } GENERIC_BINDING_INFO, *PGENERIC_BINDING_INFO;
284 typedef void (__RPC_USER *XMIT_HELPER_ROUTINE)(PMIDL_STUB_MESSAGE);
286 typedef struct _XMIT_ROUTINE_QUINTUPLE
288 XMIT_HELPER_ROUTINE pfnTranslateToXmit;
289 XMIT_HELPER_ROUTINE pfnTranslateFromXmit;
290 XMIT_HELPER_ROUTINE pfnFreeXmit;
291 XMIT_HELPER_ROUTINE pfnFreeInst;
292 } XMIT_ROUTINE_QUINTUPLE, *PXMIT_ROUTINE_QUINTUPLE;
294 typedef ULONG (__RPC_USER *USER_MARSHAL_SIZING_ROUTINE)(ULONG *, ULONG, void *);
295 typedef unsigned char * (__RPC_USER *USER_MARSHAL_MARSHALLING_ROUTINE)(ULONG *, unsigned char *, void *);
296 typedef unsigned char * (__RPC_USER *USER_MARSHAL_UNMARSHALLING_ROUTINE)(ULONG *, unsigned char *, void *);
297 typedef void (__RPC_USER *USER_MARSHAL_FREEING_ROUTINE)(ULONG *, void *);
299 typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
301 USER_MARSHAL_SIZING_ROUTINE pfnBufferSize;
302 USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall;
303 USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall;
304 USER_MARSHAL_FREEING_ROUTINE pfnFree;
305 } USER_MARSHAL_ROUTINE_QUADRUPLE;
307 /* 'USRC' */
308 #define USER_MARSHAL_CB_SIGNATURE \
309 ( ( (DWORD)'U' << 24 ) | ( (DWORD)'S' << 16 ) | \
310 ( (DWORD)'R' << 8 ) | ( (DWORD)'C' ) )
312 typedef enum
314 USER_MARSHAL_CB_BUFFER_SIZE,
315 USER_MARSHAL_CB_MARSHALL,
316 USER_MARSHAL_CB_UNMARSHALL,
317 USER_MARSHAL_CB_FREE
318 } USER_MARSHAL_CB_TYPE;
320 typedef struct _USER_MARSHAL_CB
322 ULONG Flags;
323 PMIDL_STUB_MESSAGE pStubMsg;
324 PFORMAT_STRING pReserve;
325 ULONG Signature;
326 USER_MARSHAL_CB_TYPE CBType;
327 PFORMAT_STRING pFormat;
328 PFORMAT_STRING pTypeFormat;
329 } USER_MARSHAL_CB;
331 #define USER_CALL_CTXT_MASK(f) ((f) & 0x00ff)
332 #define USER_CALL_AUX_MASK(f) ((f) & 0xff00)
333 #define GET_USER_DATA_REP(f) HIWORD(f)
335 #define USER_CALL_IS_ASYNC 0x0100
336 #define USER_CALL_NEW_CORRELATION_DESC 0x0200
338 typedef struct _MALLOC_FREE_STRUCT
340 void * (__WINE_ALLOC_SIZE(1) __RPC_USER *pfnAllocate)(SIZE_T);
341 void (__RPC_USER *pfnFree)(void *);
342 } MALLOC_FREE_STRUCT;
344 typedef struct _COMM_FAULT_OFFSETS
346 short CommOffset;
347 short FaultOffset;
348 } COMM_FAULT_OFFSETS;
350 typedef struct _MIDL_STUB_DESC
352 void *RpcInterfaceInformation;
353 void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
354 void (__RPC_API *pfnFree)(void *);
355 union {
356 handle_t *pAutoHandle;
357 handle_t *pPrimitiveHandle;
358 PGENERIC_BINDING_INFO pGenericBindingInfo;
359 } IMPLICIT_HANDLE_INFO;
360 const NDR_RUNDOWN *apfnNdrRundownRoutines;
361 const GENERIC_BINDING_ROUTINE_PAIR *aGenericBindingRoutinePairs;
362 const EXPR_EVAL *apfnExprEval;
363 const XMIT_ROUTINE_QUINTUPLE *aXmitQuintuple;
364 const unsigned char *pFormatTypes;
365 int fCheckBounds;
366 ULONG Version;
367 MALLOC_FREE_STRUCT *pMallocFreeStruct;
368 LONG MIDLVersion;
369 const COMM_FAULT_OFFSETS *CommFaultOffsets;
370 const USER_MARSHAL_ROUTINE_QUADRUPLE *aUserMarshalQuadruple;
371 const NDR_NOTIFY_ROUTINE *NotifyRoutineTable;
372 ULONG_PTR mFlags;
373 ULONG_PTR Reserved3;
374 ULONG_PTR Reserved4;
375 ULONG_PTR Reserved5;
376 } MIDL_STUB_DESC;
377 typedef const MIDL_STUB_DESC *PMIDL_STUB_DESC;
379 typedef struct _MIDL_FORMAT_STRING
381 short Pad;
382 #if defined(__GNUC__)
383 unsigned char Format[0];
384 #else
385 unsigned char Format[1];
386 #endif
387 } MIDL_FORMAT_STRING;
389 typedef struct _MIDL_SYNTAX_INFO
391 RPC_SYNTAX_IDENTIFIER TransferSyntax;
392 RPC_DISPATCH_TABLE* DispatchTable;
393 PFORMAT_STRING ProcString;
394 const unsigned short* FmtStringOffset;
395 PFORMAT_STRING TypeString;
396 const void* aUserMarshalQuadruple;
397 ULONG_PTR pReserved1;
398 ULONG_PTR pReserved2;
399 } MIDL_SYNTAX_INFO, *PMIDL_SYNTAX_INFO;
401 typedef void (__RPC_API *STUB_THUNK)( PMIDL_STUB_MESSAGE );
403 #ifdef WINE_STRICT_PROTOTYPES
404 typedef LONG (__RPC_API *SERVER_ROUTINE)(void);
405 #else
406 typedef LONG (__RPC_API *SERVER_ROUTINE)();
407 #endif
409 typedef struct _MIDL_SERVER_INFO_
411 PMIDL_STUB_DESC pStubDesc;
412 const SERVER_ROUTINE *DispatchTable;
413 PFORMAT_STRING ProcString;
414 const unsigned short *FmtStringOffset;
415 const STUB_THUNK *ThunkTable;
416 PRPC_SYNTAX_IDENTIFIER pTransferSyntax;
417 ULONG_PTR nCount;
418 PMIDL_SYNTAX_INFO pSyntaxInfo;
419 } MIDL_SERVER_INFO, *PMIDL_SERVER_INFO;
421 typedef struct _MIDL_STUBLESS_PROXY_INFO
423 PMIDL_STUB_DESC pStubDesc;
424 PFORMAT_STRING ProcFormatString;
425 const unsigned short *FormatStringOffset;
426 PRPC_SYNTAX_IDENTIFIER pTransferSyntax;
427 ULONG_PTR nCount;
428 PMIDL_SYNTAX_INFO pSyntaxInfo;
429 } MIDL_STUBLESS_PROXY_INFO, *PMIDL_STUBLESS_PROXY_INFO;
432 #if defined(__i386__) && !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__CYGWIN__)
433 /* Calling convention for returning structures/unions is different between Windows and gcc on i386 */
434 typedef LONG_PTR CLIENT_CALL_RETURN;
435 #else
436 typedef union _CLIENT_CALL_RETURN
438 void *Pointer;
439 LONG_PTR Simple;
440 } CLIENT_CALL_RETURN;
441 #endif
443 typedef enum {
444 STUB_UNMARSHAL,
445 STUB_CALL_SERVER,
446 STUB_MARSHAL,
447 STUB_CALL_SERVER_NO_HRESULT
448 } STUB_PHASE;
450 typedef enum {
451 PROXY_CALCSIZE,
452 PROXY_GETBUFFER,
453 PROXY_MARSHAL,
454 PROXY_SENDRECEIVE,
455 PROXY_UNMARSHAL
456 } PROXY_PHASE;
458 typedef enum {
459 XLAT_SERVER = 1,
460 XLAT_CLIENT
461 } XLAT_SIDE;
463 typedef struct _FULL_PTR_TO_REFID_ELEMENT {
464 struct _FULL_PTR_TO_REFID_ELEMENT *Next;
465 void *Pointer;
466 ULONG RefId;
467 unsigned char State;
468 } FULL_PTR_TO_REFID_ELEMENT, *PFULL_PTR_TO_REFID_ELEMENT;
470 /* Full pointer translation tables */
471 typedef struct _FULL_PTR_XLAT_TABLES {
472 struct {
473 void **XlatTable;
474 unsigned char *StateTable;
475 ULONG NumberOfEntries;
476 } RefIdToPointer;
478 struct {
479 PFULL_PTR_TO_REFID_ELEMENT *XlatTable;
480 ULONG NumberOfBuckets;
481 ULONG HashMask;
482 } PointerToRefId;
484 ULONG NextRefId;
485 XLAT_SIDE XlatSide;
486 } FULL_PTR_XLAT_TABLES, *PFULL_PTR_XLAT_TABLES;
488 struct IRpcStubBuffer;
490 typedef ULONG error_status_t;
491 typedef void * NDR_CCONTEXT;
493 typedef struct _SCONTEXT_QUEUE {
494 ULONG NumberOfObjects;
495 NDR_SCONTEXT *ArrayOfObjects;
496 } SCONTEXT_QUEUE, *PSCONTEXT_QUEUE;
498 typedef struct _NDR_USER_MARSHAL_INFO_LEVEL1
500 void *Buffer;
501 ULONG BufferSize;
502 void * (__WINE_ALLOC_SIZE(1) __RPC_API *pfnAllocate)(SIZE_T);
503 void (__RPC_API *pfnFree)(void *);
504 struct IRpcChannelBuffer *pRpcChannelBuffer;
505 ULONG_PTR Reserved[5];
506 } NDR_USER_MARSHAL_INFO_LEVEL1;
508 typedef struct _NDR_USER_MARSHAL_INFO
510 ULONG InformationLevel;
511 union
513 NDR_USER_MARSHAL_INFO_LEVEL1 Level1;
514 } DUMMYUNIONNAME1;
515 } NDR_USER_MARSHAL_INFO;
517 /* Context Handles */
519 RPCRTAPI RPC_BINDING_HANDLE RPC_ENTRY
520 NDRCContextBinding( NDR_CCONTEXT CContext );
522 RPCRTAPI void RPC_ENTRY
523 NDRCContextMarshall( NDR_CCONTEXT CContext, void *pBuff );
525 RPCRTAPI void RPC_ENTRY
526 NDRCContextUnmarshall( NDR_CCONTEXT *pCContext, RPC_BINDING_HANDLE hBinding,
527 void *pBuff, ULONG DataRepresentation );
529 RPCRTAPI void RPC_ENTRY
530 NDRSContextMarshall( NDR_SCONTEXT CContext, void *pBuff, NDR_RUNDOWN userRunDownIn );
532 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
533 NDRSContextUnmarshall( void *pBuff, ULONG DataRepresentation );
535 RPCRTAPI void RPC_ENTRY
536 NDRSContextMarshallEx( RPC_BINDING_HANDLE BindingHandle, NDR_SCONTEXT CContext,
537 void *pBuff, NDR_RUNDOWN userRunDownIn );
539 RPCRTAPI void RPC_ENTRY
540 NDRSContextMarshall2( RPC_BINDING_HANDLE BindingHandle, NDR_SCONTEXT CContext,
541 void *pBuff, NDR_RUNDOWN userRunDownIn, void * CtxGuard,
542 ULONG Flags );
544 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
545 NDRSContextUnmarshallEx( RPC_BINDING_HANDLE BindingHandle, void *pBuff,
546 ULONG DataRepresentation );
548 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
549 NDRSContextUnmarshall2( RPC_BINDING_HANDLE BindingHandle, void *pBuff,
550 ULONG DataRepresentation, void *CtxGuard,
551 ULONG Flags );
553 RPCRTAPI void RPC_ENTRY
554 NdrClientContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT ContextHandle, int fCheck );
556 RPCRTAPI void RPC_ENTRY
557 NdrClientContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, NDR_CCONTEXT* pContextHandle,
558 RPC_BINDING_HANDLE BindHandle );
560 RPCRTAPI void RPC_ENTRY
561 NdrServerContextMarshall ( PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle, NDR_RUNDOWN RundownRoutine );
563 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
564 NdrServerContextUnmarshall( PMIDL_STUB_MESSAGE pStubMsg );
566 RPCRTAPI void RPC_ENTRY
567 NdrContextHandleSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
569 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
570 NdrContextHandleInitialize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
572 RPCRTAPI void RPC_ENTRY
573 NdrServerContextNewMarshall( PMIDL_STUB_MESSAGE pStubMsg, NDR_SCONTEXT ContextHandle,
574 NDR_RUNDOWN RundownRoutine, PFORMAT_STRING pFormat );
576 RPCRTAPI NDR_SCONTEXT RPC_ENTRY
577 NdrServerContextNewUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
579 RPCRTAPI RPC_STATUS RPC_ENTRY
580 RpcSmDestroyClientContext( void **ContextHandle );
582 RPCRTAPI void RPC_ENTRY
583 RpcSsDestroyClientContext( void **ContextHandle );
585 RPCRTAPI void RPC_ENTRY
586 NdrSimpleTypeMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar );
587 RPCRTAPI void RPC_ENTRY
588 NdrSimpleTypeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, unsigned char FormatChar );
590 RPCRTAPI unsigned char* RPC_ENTRY
591 NdrByteCountPointerMarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
592 RPCRTAPI unsigned char* RPC_ENTRY
593 NdrByteCountPointerUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc );
594 RPCRTAPI void RPC_ENTRY
595 NdrByteCountPointerBufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
596 RPCRTAPI void RPC_ENTRY
597 NdrByteCountPointerFree( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
599 RPCRTAPI unsigned char* RPC_ENTRY
600 NdrRangeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc );
602 /* while MS declares each prototype separately, I prefer to use macros for this kind of thing instead */
603 #define SIMPLE_TYPE_MARSHAL(type) \
604 RPCRTAPI unsigned char* RPC_ENTRY \
605 Ndr##type##Marshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
606 RPCRTAPI unsigned char* RPC_ENTRY \
607 Ndr##type##Unmarshall( PMIDL_STUB_MESSAGE pStubMsg, unsigned char** ppMemory, PFORMAT_STRING pFormat, unsigned char fMustAlloc ); \
608 RPCRTAPI void RPC_ENTRY \
609 Ndr##type##BufferSize( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat ); \
610 RPCRTAPI ULONG RPC_ENTRY \
611 Ndr##type##MemorySize( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
613 #define TYPE_MARSHAL(type) \
614 SIMPLE_TYPE_MARSHAL(type) \
615 RPCRTAPI void RPC_ENTRY \
616 Ndr##type##Free( PMIDL_STUB_MESSAGE pStubMsg, unsigned char* pMemory, PFORMAT_STRING pFormat );
618 TYPE_MARSHAL(Pointer)
619 TYPE_MARSHAL(SimpleStruct)
620 TYPE_MARSHAL(ConformantStruct)
621 TYPE_MARSHAL(ConformantVaryingStruct)
622 TYPE_MARSHAL(ComplexStruct)
623 TYPE_MARSHAL(FixedArray)
624 TYPE_MARSHAL(ConformantArray)
625 TYPE_MARSHAL(ConformantVaryingArray)
626 TYPE_MARSHAL(VaryingArray)
627 TYPE_MARSHAL(ComplexArray)
628 TYPE_MARSHAL(EncapsulatedUnion)
629 TYPE_MARSHAL(NonEncapsulatedUnion)
630 TYPE_MARSHAL(XmitOrRepAs)
631 TYPE_MARSHAL(UserMarshal)
632 TYPE_MARSHAL(InterfacePointer)
634 SIMPLE_TYPE_MARSHAL(ConformantString)
635 SIMPLE_TYPE_MARSHAL(NonConformantString)
637 #undef TYPE_MARSHAL
638 #undef SIMPLE_TYPE_MARSHAL
640 RPCRTAPI void RPC_ENTRY
641 NdrCorrelationInitialize( PMIDL_STUB_MESSAGE pStubMsg, void *pMemory, ULONG CacheSize, ULONG flags );
642 RPCRTAPI void RPC_ENTRY
643 NdrCorrelationPass( PMIDL_STUB_MESSAGE pStubMsg );
644 RPCRTAPI void RPC_ENTRY
645 NdrCorrelationFree( PMIDL_STUB_MESSAGE pStubMsg );
647 RPCRTAPI void RPC_ENTRY
648 NdrConvert2( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, LONG NumberParams );
649 RPCRTAPI void RPC_ENTRY
650 NdrConvert( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
652 #define USER_MARSHAL_FC_BYTE 1
653 #define USER_MARSHAL_FC_CHAR 2
654 #define USER_MARSHAL_FC_SMALL 3
655 #define USER_MARSHAL_FC_USMALL 4
656 #define USER_MARSHAL_FC_WCHAR 5
657 #define USER_MARSHAL_FC_SHORT 6
658 #define USER_MARSHAL_FC_USHORT 7
659 #define USER_MARSHAL_FC_LONG 8
660 #define USER_MARSHAL_FC_ULONG 9
661 #define USER_MARSHAL_FC_FLOAT 10
662 #define USER_MARSHAL_FC_HYPER 11
663 #define USER_MARSHAL_FC_DOUBLE 12
665 RPCRTAPI unsigned char* RPC_ENTRY
666 NdrUserMarshalSimpleTypeConvert( ULONG *pFlags, unsigned char *pBuffer, unsigned char FormatChar );
668 CLIENT_CALL_RETURN RPC_VAR_ENTRY
669 NdrClientCall2( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
670 CLIENT_CALL_RETURN RPC_VAR_ENTRY
671 NdrClientCall( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
672 CLIENT_CALL_RETURN RPC_VAR_ENTRY
673 NdrAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
674 CLIENT_CALL_RETURN RPC_VAR_ENTRY
675 NdrDcomAsyncClientCall( PMIDL_STUB_DESC pStubDescriptor, PFORMAT_STRING pFormat, ... );
677 RPCRTAPI void RPC_ENTRY
678 NdrServerCall2( PRPC_MESSAGE pRpcMsg );
679 RPCRTAPI void RPC_ENTRY
680 NdrServerCall( PRPC_MESSAGE pRpcMsg );
681 RPCRTAPI void RPC_ENTRY
682 NdrAsyncServerCall( PRPC_MESSAGE pRpcMsg );
684 RPCRTAPI LONG RPC_ENTRY
685 NdrStubCall2( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
686 RPCRTAPI LONG RPC_ENTRY
687 NdrStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
688 RPCRTAPI LONG RPC_ENTRY
689 NdrAsyncStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
690 RPCRTAPI LONG RPC_ENTRY
691 NdrDcomAsyncStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, DWORD * pdwStubPhase );
693 RPCRTAPI void* RPC_ENTRY
694 NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg, SIZE_T Len ) __WINE_ALLOC_SIZE(2);
696 RPCRTAPI void RPC_ENTRY
697 NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, void *ArgAddr );
699 RPCRTAPI RPC_STATUS RPC_ENTRY
700 NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg, ULONG *pCommStatus,
701 ULONG *pFaultStatus, RPC_STATUS Status_ );
703 RPCRTAPI void* RPC_ENTRY
704 NdrOleAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1);
705 RPCRTAPI void RPC_ENTRY
706 NdrOleFree( void* NodeToFree );
708 RPCRTAPI void RPC_ENTRY
709 NdrClientInitialize( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg,
710 PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum );
711 RPCRTAPI void RPC_ENTRY
712 NdrClientInitializeNew( PRPC_MESSAGE pRpcMessage, PMIDL_STUB_MESSAGE pStubMsg,
713 PMIDL_STUB_DESC pStubDesc, unsigned int ProcNum );
714 RPCRTAPI unsigned char* RPC_ENTRY
715 NdrServerInitialize( PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc );
716 RPCRTAPI unsigned char* RPC_ENTRY
717 NdrServerInitializeNew( PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc );
718 RPCRTAPI unsigned char* RPC_ENTRY
719 NdrServerInitializeUnmarshall( PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc, PRPC_MESSAGE pRpcMsg );
720 RPCRTAPI void RPC_ENTRY
721 NdrServerInitializeMarshall( PRPC_MESSAGE pRpcMsg, PMIDL_STUB_MESSAGE pStubMsg );
722 RPCRTAPI void RPC_ENTRY
723 NdrServerMarshall( struct IRpcStubBuffer *pThis, struct IRpcChannelBuffer *pChannel, PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat );
724 RPCRTAPI void RPC_ENTRY
725 NdrServerUnmarshall( struct IRpcChannelBuffer *pChannel, PRPC_MESSAGE pRpcMsg,
726 PMIDL_STUB_MESSAGE pStubMsg, PMIDL_STUB_DESC pStubDesc,
727 PFORMAT_STRING pFormat, void *pParamList );
728 RPCRTAPI unsigned char* RPC_ENTRY
729 NdrGetBuffer( PMIDL_STUB_MESSAGE stubmsg, ULONG buflen, RPC_BINDING_HANDLE handle );
730 RPCRTAPI void RPC_ENTRY
731 NdrFreeBuffer( PMIDL_STUB_MESSAGE pStubMsg );
732 RPCRTAPI unsigned char* RPC_ENTRY
733 NdrSendReceive( PMIDL_STUB_MESSAGE stubmsg, unsigned char *buffer );
735 RPCRTAPI unsigned char * RPC_ENTRY
736 NdrNsGetBuffer( PMIDL_STUB_MESSAGE pStubMsg, ULONG BufferLength, RPC_BINDING_HANDLE Handle );
737 RPCRTAPI unsigned char * RPC_ENTRY
738 NdrNsSendReceive( PMIDL_STUB_MESSAGE pStubMsg, unsigned char *pBufferEnd, RPC_BINDING_HANDLE *pAutoHandle );
740 RPCRTAPI RPC_STATUS RPC_ENTRY
741 NdrGetDcomProtocolVersion( PMIDL_STUB_MESSAGE pStubMsg, RPC_VERSION *pVersion );
743 RPCRTAPI PFULL_PTR_XLAT_TABLES RPC_ENTRY
744 NdrFullPointerXlatInit( ULONG NumberOfPointers, XLAT_SIDE XlatSide );
745 RPCRTAPI void RPC_ENTRY
746 NdrFullPointerXlatFree( PFULL_PTR_XLAT_TABLES pXlatTables );
747 RPCRTAPI int RPC_ENTRY
748 NdrFullPointerQueryPointer( PFULL_PTR_XLAT_TABLES pXlatTables, void *pPointer,
749 unsigned char QueryType, ULONG *pRefId );
750 RPCRTAPI int RPC_ENTRY
751 NdrFullPointerQueryRefId( PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId,
752 unsigned char QueryType, void **ppPointer );
753 RPCRTAPI void RPC_ENTRY
754 NdrFullPointerInsertRefId( PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId, void *pPointer );
755 RPCRTAPI int RPC_ENTRY
756 NdrFullPointerFree( PFULL_PTR_XLAT_TABLES pXlatTables, void *Pointer );
758 RPCRTAPI void RPC_ENTRY
759 NdrRpcSsEnableAllocate( PMIDL_STUB_MESSAGE pMessage );
760 RPCRTAPI void RPC_ENTRY
761 NdrRpcSsDisableAllocate( PMIDL_STUB_MESSAGE pMessage );
762 RPCRTAPI void RPC_ENTRY
763 NdrRpcSmSetClientToOsf( PMIDL_STUB_MESSAGE pMessage );
764 RPCRTAPI void * RPC_ENTRY
765 NdrRpcSmClientAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1);
766 RPCRTAPI void RPC_ENTRY
767 NdrRpcSmClientFree( void *NodeToFree );
768 RPCRTAPI void * RPC_ENTRY
769 NdrRpcSsDefaultAllocate( SIZE_T Size ) __WINE_ALLOC_SIZE(1);
770 RPCRTAPI void RPC_ENTRY
771 NdrRpcSsDefaultFree( void *NodeToFree );
773 RPCRTAPI RPC_STATUS RPC_ENTRY
774 NdrGetUserMarshalInfo( ULONG *pFlags, ULONG InformationLevel, NDR_USER_MARSHAL_INFO *pMarshalInfo );
776 #ifdef __cplusplus
778 #endif
779 #endif /*__WINE_RPCNDR_H */