1 /**
2  * Windows API header module
3  *
4  * Translated from MinGW Windows headers
5  *
6  * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
7  * Source: $(DRUNTIMESRC core/sys/windows/_rpcndr.d)
8  */
9 /// Automatically imported and edited from the druntime module
10 /// core.sys.windows.rpcndr for the auto-generated win32 package.
11 module win32.rpcndr;
12 //version (Windows):
13 @system:
14 version (Win32_UseLib) pragma(lib, "rpcrt4");
15 
16 /* Translation notes:
17  RPC_CLIENT_ALLOC*, RPC_CLIENT_FREE* were replaced with PRPC_CLIENT_ALLOC, PRPC_CLIENT_FREE
18 */
19 
20 // TODO: Bitfields in MIDL_STUB_MESSAGE.
21 //       Macros need to be converted.
22 enum __RPCNDR_H_VERSION__= 450;
23 
24 import win32.rpcnsip;
25 import win32.rpc, win32.rpcdce, win32.unknwn, win32.windef;
26 import win32.objidl; // for IRpcChannelBuffer, IRpcStubBuffer
27 import win32.basetyps;
28 
29 extern (Windows):
30 
31 enum uint NDR_CHAR_REP_MASK      = 0xF,
32     NDR_INT_REP_MASK              = 0xF0,
33     NDR_FLOAT_REP_MASK            = 0xFF00,
34     NDR_LITTLE_ENDIAN             = 0x10,
35     NDR_BIG_ENDIAN                = 0,
36     NDR_IEEE_FLOAT                = 0,
37     NDR_VAX_FLOAT                 = 0x100,
38     NDR_ASCII_CHAR                = 0,
39     NDR_EBCDIC_CHAR               = 1,
40     NDR_LOCAL_DATA_REPRESENTATION = 0x10,
41     NDR_LOCAL_ENDIAN              = NDR_LITTLE_ENDIAN;
42 
43 alias MIDL_user_allocate midl_user_allocate;
44 alias MIDL_user_free midl_user_free;
45 
46 alias long hyper;
47 alias ulong MIDL_uhyper;
48 alias char small;
49 
50 enum cbNDRContext=20;
51 //MACRO #define NDRSContextValue(hContext) (&(hContext)->userContext)
52 //MACRO #define byte_from_ndr(source, target) { *(target) = *(*(char**)&(source)->Buffer)++; }
53 
54 //MACRO #define byte_array_from_ndr(Source, LowerIndex, UpperIndex, Target) { NDRcopy ((((char *)(Target))+(LowerIndex)), (Source)->Buffer, (unsigned int)((UpperIndex)-(LowerIndex))); *(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); }
55 
56 //MACRO #define boolean_from_ndr(source, target) { *(target) = *(*(char**)&(source)->Buffer)++; }
57 
58 //MACRO #define boolean_array_from_ndr(Source, LowerIndex, UpperIndex, Target) { NDRcopy ((((char *)(Target))+(LowerIndex)), (Source)->Buffer, (unsigned int)((UpperIndex)-(LowerIndex))); *(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); }
59 
60 //MACRO #define small_from_ndr(source, target) { *(target) = *(*(char**)&(source)->Buffer)++; }
61 
62 //MACRO #define small_from_ndr_temp(source, target, format) { *(target) = *(*(char**)(source))++; }
63 
64 //MACRO #define small_array_from_ndr(Source, LowerIndex, UpperIndex, Target) { NDRcopy ((((char *)(Target))+(LowerIndex)), (Source)->Buffer, (unsigned int)((UpperIndex)-(LowerIndex))); *(unsigned long *)&(Source)->Buffer += ((UpperIndex)-(LowerIndex)); }
65 
66 //MACRO #define MIDL_ascii_strlen(string) strlen(string)
67 
68 //MACRO #define MIDL_ascii_strcpy(target,source) strcpy(target,source)
69 
70 //MACRO #define MIDL_memset(s,c,n) memset(s,c,n)
71 
72 //MACRO #define _midl_ma1( p, cast ) *(*( cast **)&p)++
73 //MACRO #define _midl_ma2( p, cast ) *(*( cast **)&p)++
74 //MACRO #define _midl_ma4( p, cast ) *(*( cast **)&p)++
75 //MACRO #define _midl_ma8( p, cast ) *(*( cast **)&p)++
76 //MACRO #define _midl_unma1( p, cast ) *(( cast *)p)++
77 //MACRO #define _midl_unma2( p, cast ) *(( cast *)p)++
78 //MACRO #define _midl_unma3( p, cast ) *(( cast *)p)++
79 //MACRO #define _midl_unma4( p, cast ) *(( cast *)p)++
80 //MACRO #define _midl_fa2( p ) (p = (RPC_BUFPTR )((LONG_PTR)(p+1) & 0xffffffff_fffffffe))
81 //MACRO #define _midl_fa4( p ) (p = (RPC_BUFPTR )((LONG_PTR)(p+3) & 0xffffffff_fffffffc))
82 //MACRO #define _midl_fa8( p ) (p = (RPC_BUFPTR )((LONG_PTR)(p+7) & 0xffffffff_fffffff8))
83 //MACRO #define _midl_addp( p, n ) (p += n)
84 //MACRO #define _midl_marsh_lhs( p, cast ) *(*( cast **)&p)++
85 //MACRO #define _midl_marsh_up( mp, p ) *(*(unsigned long **)&mp)++ = (unsigned long)p
86 //MACRO #define _midl_advmp( mp ) *(*(unsigned long **)&mp)++
87 //MACRO #define _midl_unmarsh_up( p ) (*(*(unsigned long **)&p)++)
88 
89 //MACRO #define NdrMarshConfStringHdr( p, s, l ) (_midl_ma4( p, unsigned long) = s, _midl_ma4( p, unsigned long) = 0, _midl_ma4( p, unsigned long) = l)
90 
91 //MACRO #define NdrUnMarshConfStringHdr(p, s, l) ((s=_midl_unma4(p,unsigned long), (_midl_addp(p,4)), (l=_midl_unma4(p,unsigned long))
92 
93 //MACRO #define NdrMarshCCtxtHdl(pc,p) (NDRCContextMarshall( (NDR_CCONTEXT)pc, p ),p+20)
94 //MACRO #define NdrUnMarshCCtxtHdl(pc,p,h,drep) (NDRCContextUnmarshall((NDR_CONTEXT)pc,h,p,drep), p+20)
95 //MACRO #define NdrUnMarshSCtxtHdl(pc, p,drep) (pc = NdrSContextUnMarshall(p,drep ))
96 //MACRO #define NdrMarshSCtxtHdl(pc,p,rd) (NdrSContextMarshall((NDR_SCONTEXT)pc,p, (NDR_RUNDOWN)rd)
97 
98 //MACRO #define NdrFieldOffset(s,f) (LONG_PTR)(& (((s *)0)->f))
99 //MACRO #define NdrFieldPad(s,f,p,t) (NdrFieldOffset(s,f) - NdrFieldOffset(s,p) - sizeof(t))
100 //MACRO #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
101 //MACRO #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
102 
103 alias void * NDR_CCONTEXT;
104 struct tagNDR_SCONTEXT {
105     void*[2] pad;
106     void *userContext;
107 }
108 alias tagNDR_SCONTEXT * NDR_SCONTEXT;
109 
110 struct SCONTEXT_QUEUE {
111     uint NumberOfObjects;
112     NDR_SCONTEXT *ArrayOfObjects;
113 }
114 alias SCONTEXT_QUEUE * PSCONTEXT_QUEUE;
115 
116 struct _MIDL_STUB_MESSAGE;
117 struct _MIDL_STUB_DESC;
118 struct _FULL_PTR_XLAT_TABLES;
119 
120 alias ubyte *RPC_BUFPTR;
121 alias uint RPC_LENGTH;
122 
123 alias const(char)* PFORMAT_STRING;
124 
125 struct ARRAY_INFO {
126     int Dimension;
127     uint *BufferConformanceMark;
128     uint *BufferVarianceMark;
129     uint *MaxCountArray;
130     uint *OffsetArray;
131     uint *ActualCountArray;
132 }
133 alias ARRAY_INFO * PARRAY_INFO;
134 
135 RPC_BINDING_HANDLE  NDRCContextBinding(NDR_CCONTEXT);
136 void  NDRCContextMarshall(NDR_CCONTEXT,void*);
137 void  NDRCContextUnmarshall(NDR_CCONTEXT*,RPC_BINDING_HANDLE,void*,uint);
138 void  NDRSContextMarshall(NDR_SCONTEXT,void*,NDR_RUNDOWN);
139 NDR_SCONTEXT  NDRSContextUnmarshall(void*pBuff,uint);
140 void  RpcSsDestroyClientContext(void**);
141 void  NDRcopy(void*,void*,uint);
142 uint  MIDL_wchar_strlen(wchar *);
143 void  MIDL_wchar_strcpy(void*,wchar *);
144 void  char_from_ndr(PRPC_MESSAGE,ubyte*);
145 void  char_array_from_ndr(PRPC_MESSAGE,uint,uint,ubyte*);
146 void  short_from_ndr(PRPC_MESSAGE,ushort*);
147 void  short_array_from_ndr(PRPC_MESSAGE,uint,uint,ushort*);
148 void  short_from_ndr_temp(ubyte**,ushort*,uint);
149 void  int_from_ndr(PRPC_MESSAGE,uint*);
150 void  int_array_from_ndr(PRPC_MESSAGE,uint,uint,uint*);
151 void  int_from_ndr_temp(ubyte**,uint*,uint);
152 void  enum_from_ndr(PRPC_MESSAGE,uint*);
153 void  float_from_ndr(PRPC_MESSAGE,void*);
154 void  float_array_from_ndr(PRPC_MESSAGE,uint,uint,void*);
155 void  double_from_ndr(PRPC_MESSAGE,void*);
156 void  double_array_from_ndr(PRPC_MESSAGE,uint,uint,void*);
157 void  hyper_from_ndr(PRPC_MESSAGE,hyper*);
158 void  hyper_array_from_ndr(PRPC_MESSAGE,uint,uint,hyper*);
159 void  hyper_from_ndr_temp(ubyte**,hyper*,uint);
160 void  data_from_ndr(PRPC_MESSAGE,void*,char*,ubyte);
161 void  data_into_ndr(void*,PRPC_MESSAGE,char*,ubyte);
162 void  tree_into_ndr(void*,PRPC_MESSAGE,char*,ubyte);
163 void  data_size_ndr(void*,PRPC_MESSAGE,char*,ubyte);
164 void  tree_size_ndr(void*,PRPC_MESSAGE,char*,ubyte);
165 void  tree_peek_ndr(PRPC_MESSAGE,ubyte**,char*,ubyte);
166 void * midl_allocate(int);
167 
168 align(4):
169 struct MIDL_STUB_MESSAGE {
170     PRPC_MESSAGE RpcMsg;
171     ubyte *Buffer;
172     ubyte *BufferStart;
173     ubyte *BufferEnd;
174     ubyte *BufferMark;
175     uint BufferLength;
176     uint MemorySize;
177     ubyte *Memory;
178     int IsClient;
179     int ReuseBuffer;
180     ubyte *AllocAllNodesMemory;
181     ubyte *AllocAllNodesMemoryEnd;
182     int IgnoreEmbeddedPointers;
183     ubyte *PointerBufferMark;
184     ubyte fBufferValid;
185     ubyte Unused;
186     ULONG_PTR MaxCount;
187     uint Offset;
188     uint ActualCount;
189     void* function (uint) pfnAllocate;
190     void function (void*) pfnFree;
191     ubyte * StackTop;
192     ubyte * pPresentedType;
193     ubyte * pTransmitType;
194     handle_t SavedHandle;
195 const(_MIDL_STUB_DESC)* StubDesc;
196     _FULL_PTR_XLAT_TABLES *FullPtrXlatTables;
197     uint FullPtrRefId;
198     int fCheckBounds;
199     // FIXME:
200     byte bit_fields_for_D; // FIXME: Bitfields
201 //  int fInDontFree :1;
202 //  int fDontCallFreeInst :1;
203 //  int fInOnlyParam :1;
204 //  int fHasReturn :1;
205     uint dwDestContext;
206     void* pvDestContext;
207     NDR_SCONTEXT * SavedContextHandles;
208     int ParamNumber;
209     IRpcChannelBuffer  pRpcChannelBuffer;
210     PARRAY_INFO pArrayInfo;
211     uint * SizePtrCountArray;
212     uint * SizePtrOffsetArray;
213     uint * SizePtrLengthArray;
214     void* pArgQueue;
215     uint dwStubPhase;
216     INT_PTR[5] w2kReserved;
217 }
218 alias MIDL_STUB_MESSAGE * PMIDL_STUB_MESSAGE;
219 
220 extern (Windows) {
221     alias void* function (void*) GENERIC_BINDING_ROUTINE;
222     alias void function (void*,ubyte*) GENERIC_UNBIND_ROUTINE;
223     alias uint function (uint *,uint,void *) USER_MARSHAL_SIZING_ROUTINE;
224     alias ubyte * function (uint *,ubyte *,void *) USER_MARSHAL_MARSHALLING_ROUTINE;
225     alias ubyte * function (uint *,ubyte *,void *) USER_MARSHAL_UNMARSHALLING_ROUTINE;
226     alias void function (uint *,void *) USER_MARSHAL_FREEING_ROUTINE;
227     alias void function () NDR_NOTIFY_ROUTINE;
228 }
229 
230 align:
231 struct GENERIC_BINDING_ROUTINE_PAIR {
232     GENERIC_BINDING_ROUTINE pfnBind;
233     GENERIC_UNBIND_ROUTINE pfnUnbind;
234 }
235 alias GENERIC_BINDING_ROUTINE_PAIR * PGENERIC_BINDING_ROUTINE_PAIR;
236 
237 struct GENERIC_BINDING_INFO {
238     void *pObj;
239     uint Size;
240     GENERIC_BINDING_ROUTINE pfnBind;
241     GENERIC_UNBIND_ROUTINE pfnUnbind;
242 }
243 alias GENERIC_BINDING_INFO * PGENERIC_BINDING_INFO;
244 
245 
246 struct XMIT_ROUTINE_QUINTUPLE {
247     XMIT_HELPER_ROUTINE pfnTranslateToXmit;
248     XMIT_HELPER_ROUTINE pfnTranslateFromXmit;
249     XMIT_HELPER_ROUTINE pfnFreeXmit;
250     XMIT_HELPER_ROUTINE pfnFreeInst;
251 }
252 alias XMIT_ROUTINE_QUINTUPLE * PXMIT_ROUTINE_QUINTUPLE;
253 
254 struct MALLOC_FREE_STRUCT {
255     void* function (uint) pfnAllocate;
256     void function (void*) pfnFree;
257 }
258 
259 struct COMM_FAULT_OFFSETS {
260     short CommOffset;
261     short FaultOffset;
262 }
263 
264 struct USER_MARSHAL_ROUTINE_QUADRUPLE {
265     USER_MARSHAL_SIZING_ROUTINE pfnBufferSize;
266     USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall;
267     USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall;
268     USER_MARSHAL_FREEING_ROUTINE pfnFree;
269 }
270 
271 enum IDL_CS_CONVERT {
272     IDL_CS_NO_CONVERT,
273     IDL_CS_IN_PLACE_CONVERT,
274     IDL_CS_NEW_BUFFER_CONVERT
275 }
276 
277 struct NDR_CS_SIZE_CONVERT_ROUTINES {
278     CS_TYPE_NET_SIZE_ROUTINE pfnNetSize;
279     CS_TYPE_TO_NETCS_ROUTINE pfnToNetCs;
280     CS_TYPE_LOCAL_SIZE_ROUTINE pfnLocalSize;
281     CS_TYPE_FROM_NETCS_ROUTINE pfnFromNetCs;
282 }
283 
284 struct NDR_CS_ROUTINES {
285     NDR_CS_SIZE_CONVERT_ROUTINES *pSizeConvertRoutines;
286     CS_TAG_GETTING_ROUTINE *pTagGettingRoutines;
287 }
288 
289 struct MIDL_STUB_DESC {
290     void* RpcInterfaceInformation;
291     void* function(uint) pfnAllocate;
292     void function (void*) pfnFree;
293     union _IMPLICIT_HANDLE_INFO {
294         handle_t *pAutoHandle;
295         handle_t *pPrimitiveHandle;
296         PGENERIC_BINDING_INFO pGenericBindingInfo;
297     }
298     _IMPLICIT_HANDLE_INFO IMPLICIT_HANDLE_INFO;
299 const(NDR_RUNDOWN)* apfnNdrRundownRoutines;
300 const(GENERIC_BINDING_ROUTINE_PAIR)* aGenericBindingRoutinePairs;
301 const(EXPR_EVAL)* apfnExprEval;
302 const(XMIT_ROUTINE_QUINTUPLE)* aXmitQuintuple;
303 const(char)* *pFormatTypes;
304     int fCheckBounds;
305     uint Version;
306     MALLOC_FREE_STRUCT *pMallocFreeStruct;
307     int MIDLVersion;
308 const(COMM_FAULT_OFFSETS)* CommFaultOffsets;
309 const(USER_MARSHAL_ROUTINE_QUADRUPLE)* aUserMarshalQuadruple;
310 const(NDR_NOTIFY_ROUTINE)* NotifyRoutineTable;
311     ULONG_PTR mFlags;
312 const(NDR_CS_ROUTINES)* CsRoutineTables;
313     void *Reserved4;
314     ULONG_PTR Reserved5;
315 }
316 alias const(MIDL_STUB_DESC)* PMIDL_STUB_DESC;
317 
318 alias void * PMIDL_XMIT_TYPE;
319 
320 struct MIDL_FORMAT_STRING {
321     short Pad;
322     ubyte[1] Format;
323 }
324 
325 struct MIDL_SERVER_INFO {
326     PMIDL_STUB_DESC pStubDesc;
327 const(SERVER_ROUTINE)* DispatchTable;
328     PFORMAT_STRING ProcString;
329 const(ushort)* FmtStringOffset;
330 const(STUB_THUNK)* ThunkTable;
331 }
332 alias MIDL_SERVER_INFO * PMIDL_SERVER_INFO;
333 
334 struct MIDL_STUBLESS_PROXY_INFO {
335     PMIDL_STUB_DESC pStubDesc;
336     PFORMAT_STRING ProcFormatString;
337 const(ushort)* FormatStringOffset;
338 }
339 alias MIDL_STUBLESS_PROXY_INFO *PMIDL_STUBLESS_PROXY_INFO;
340 
341 union CLIENT_CALL_RETURN {
342     void *Pointer;
343     LONG_PTR Simple;
344 }
345 
346 enum XLAT_SIDE {
347     XLAT_SERVER = 1,
348     XLAT_CLIENT
349 }
350 struct FULL_PTR_TO_REFID_ELEMENT {
351     FULL_PTR_TO_REFID_ELEMENT * Next;
352     void* Pointer;
353     uint RefId;
354     ubyte State;
355 }
356 alias FULL_PTR_TO_REFID_ELEMENT * PFULL_PTR_TO_REFID_ELEMENT;
357 
358 struct FULL_PTR_XLAT_TABLES {
359     struct _RefIdToPointer {
360         void **XlatTable;
361         ubyte *StateTable;
362         uint NumberOfEntries;
363     }
364     void* RefIdToPointer;
365     struct _PointerToRefId {
366         PFULL_PTR_TO_REFID_ELEMENT *XlatTable;
367         uint NumberOfBuckets;
368         uint HashMask;
369     }
370     void* PointerToRefId;
371 
372     uint NextRefId;
373     XLAT_SIDE XlatSide;
374 }
375 alias FULL_PTR_XLAT_TABLES * PFULL_PTR_XLAT_TABLES;
376 
377 
378 enum STUB_PHASE {
379     STUB_UNMARSHAL,
380     STUB_CALL_SERVER,
381     STUB_MARSHAL,
382     STUB_CALL_SERVER_NO_HRESULT
383 }
384 
385 enum PROXY_PHASE {
386     PROXY_CALCSIZE,
387     PROXY_GETBUFFER,
388     PROXY_MARSHAL,
389     PROXY_SENDRECEIVE,
390     PROXY_UNMARSHAL
391 }
392 
393 alias TypeDef!(void *) RPC_SS_THREAD_HANDLE;
394 
395 extern (Windows) {
396 alias void function (void*) NDR_RUNDOWN;
397 alias void function (_MIDL_STUB_MESSAGE*) EXPR_EVAL;
398 alias void function(PMIDL_STUB_MESSAGE) XMIT_HELPER_ROUTINE;
399 alias void function (RPC_BINDING_HANDLE,uint,uint,IDL_CS_CONVERT*,uint*,error_status_t*) CS_TYPE_NET_SIZE_ROUTINE;
400 alias void function (RPC_BINDING_HANDLE,uint,uint,IDL_CS_CONVERT*,uint*,error_status_t*) CS_TYPE_LOCAL_SIZE_ROUTINE;
401 alias void function (RPC_BINDING_HANDLE,uint,void*,uint,byte*,uint*,error_status_t*) CS_TYPE_TO_NETCS_ROUTINE;
402 alias void function (RPC_BINDING_HANDLE,uint,byte*,uint,uint,void*,uint*,error_status_t*) CS_TYPE_FROM_NETCS_ROUTINE;
403 alias void function (RPC_BINDING_HANDLE,int,uint*,uint*,uint*,error_status_t*) CS_TAG_GETTING_ROUTINE;
404 
405 //alias void* RPC_CLIENT_ALLOC(uint);
406 //alias void RPC_CLIENT_FREE(void*);
407 alias void* function(uint) PRPC_CLIENT_ALLOC;
408 alias void function(void*) PRPC_CLIENT_FREE;
409 
410     alias void function (PMIDL_STUB_MESSAGE) STUB_THUNK;
411     alias int function() SERVER_ROUTINE;
412 }
413 
414 void  NdrSimpleTypeMarshall(PMIDL_STUB_MESSAGE,ubyte*,ubyte);
415 ubyte * NdrPointerMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING pFormat);
416 ubyte * NdrSimpleStructMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
417 ubyte * NdrConformantStructMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
418 ubyte * NdrConformantVaryingStructMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
419 ubyte * NdrHardStructMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
420 ubyte * NdrComplexStructMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
421 ubyte * NdrFixedArrayMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
422 ubyte * NdrConformantArrayMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
423 ubyte * NdrConformantVaryingArrayMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
424 ubyte * NdrVaryingArrayMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
425 ubyte * NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
426 ubyte * NdrNonConformantStringMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
427 ubyte * NdrConformantStringMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
428 ubyte * NdrEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
429 ubyte * NdrNonEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
430 ubyte * NdrByteCountPointerMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
431 ubyte * NdrXmitOrRepAsMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
432 ubyte * NdrInterfacePointerMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
433 void  NdrClientContextMarshall(PMIDL_STUB_MESSAGE,NDR_CCONTEXT,int);
434 void  NdrServerContextMarshall(PMIDL_STUB_MESSAGE,NDR_SCONTEXT,NDR_RUNDOWN);
435 void  NdrSimpleTypeUnmarshall(PMIDL_STUB_MESSAGE,ubyte*,ubyte);
436 ubyte * NdrPointerUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
437 ubyte * NdrSimpleStructUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
438 ubyte * NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
439 ubyte * NdrConformantVaryingStructUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
440 ubyte * NdrHardStructUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
441 ubyte * NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
442 ubyte * NdrFixedArrayUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
443 ubyte * NdrConformantArrayUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
444 ubyte * NdrConformantVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
445 ubyte * NdrVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
446 ubyte * NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
447 ubyte * NdrNonConformantStringUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
448 ubyte * NdrConformantStringUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
449 ubyte * NdrEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
450 ubyte * NdrNonEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
451 ubyte * NdrByteCountPointerUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
452 ubyte * NdrXmitOrRepAsUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
453 ubyte * NdrInterfacePointerUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
454 void  NdrClientContextUnmarshall(PMIDL_STUB_MESSAGE,NDR_CCONTEXT*,RPC_BINDING_HANDLE);
455 NDR_SCONTEXT  NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE);
456 void  NdrPointerBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
457 void  NdrSimpleStructBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
458 void  NdrConformantStructBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
459 void  NdrConformantVaryingStructBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
460 void  NdrHardStructBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
461 void  NdrComplexStructBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
462 void  NdrFixedArrayBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
463 void  NdrConformantArrayBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
464 void  NdrConformantVaryingArrayBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
465 void  NdrVaryingArrayBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
466 void  NdrComplexArrayBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
467 void  NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
468 void  NdrNonConformantStringBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
469 void  NdrEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
470 void  NdrNonEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
471 void  NdrByteCountPointerBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
472 void  NdrXmitOrRepAsBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
473 void  NdrInterfacePointerBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
474 void  NdrContextHandleSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
475 uint  NdrPointerMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
476 uint  NdrSimpleStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
477 uint  NdrConformantStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
478 uint  NdrConformantVaryingStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
479 uint  NdrHardStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
480 uint  NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
481 uint  NdrFixedArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
482 uint  NdrConformantArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
483 uint  NdrConformantVaryingArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
484 uint  NdrVaryingArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
485 uint  NdrComplexArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
486 uint  NdrConformantStringMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
487 uint  NdrNonConformantStringMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
488 uint  NdrEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
489 uint  NdrNonEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
490 uint  NdrXmitOrRepAsMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
491 uint  NdrInterfacePointerMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
492 void  NdrPointerFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
493 void  NdrSimpleStructFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
494 void  NdrConformantStructFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
495 void  NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
496 void  NdrHardStructFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
497 void  NdrComplexStructFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
498 void  NdrFixedArrayFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
499 void  NdrConformantArrayFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
500 void  NdrConformantVaryingArrayFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
501 void  NdrVaryingArrayFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
502 void  NdrComplexArrayFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
503 void  NdrEncapsulatedUnionFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
504 void  NdrNonEncapsulatedUnionFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
505 void  NdrByteCountPointerFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
506 void  NdrXmitOrRepAsFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
507 void  NdrInterfacePointerFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
508 void  NdrConvert(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
509 void  NdrClientInitializeNew(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,uint);
510 ubyte * NdrServerInitializeNew(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC);
511 void  NdrClientInitialize(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,uint);
512 ubyte * NdrServerInitialize(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC);
513 ubyte * NdrServerInitializeUnmarshall(PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,PRPC_MESSAGE);
514 void  NdrServerInitializeMarshall(PRPC_MESSAGE,PMIDL_STUB_MESSAGE);
515 ubyte * NdrGetBuffer(PMIDL_STUB_MESSAGE,uint,RPC_BINDING_HANDLE);
516 ubyte * NdrNsGetBuffer(PMIDL_STUB_MESSAGE,uint,RPC_BINDING_HANDLE);
517 ubyte * NdrSendReceive(PMIDL_STUB_MESSAGE,ubyte*);
518 ubyte * NdrNsSendReceive(PMIDL_STUB_MESSAGE,ubyte*,RPC_BINDING_HANDLE*);
519 void  NdrFreeBuffer(PMIDL_STUB_MESSAGE);
520 
521 CLIENT_CALL_RETURN  NdrClientCall(PMIDL_STUB_DESC,PFORMAT_STRING,...);
522 
523 int  NdrStubCall(IRpcStubBuffer, IRpcChannelBuffer,PRPC_MESSAGE,uint*);
524 void  NdrServerCall(PRPC_MESSAGE);
525 int  NdrServerUnmarshall(IRpcChannelBuffer, PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,PFORMAT_STRING,void*);
526 void  NdrServerMarshall(IRpcStubBuffer, IRpcChannelBuffer,PMIDL_STUB_MESSAGE,PFORMAT_STRING);
527 RPC_STATUS  NdrMapCommAndFaultStatus(PMIDL_STUB_MESSAGE,uint*,uint*,RPC_STATUS);
528 int  NdrSH_UPDecision(PMIDL_STUB_MESSAGE,ubyte**,RPC_BUFPTR);
529 int  NdrSH_TLUPDecision(PMIDL_STUB_MESSAGE,ubyte**);
530 int  NdrSH_TLUPDecisionBuffer(PMIDL_STUB_MESSAGE,ubyte**);
531 int  NdrSH_IfAlloc(PMIDL_STUB_MESSAGE,ubyte**,uint);
532 int  NdrSH_IfAllocRef(PMIDL_STUB_MESSAGE,ubyte**,uint);
533 int  NdrSH_IfAllocSet(PMIDL_STUB_MESSAGE,ubyte**,uint);
534 RPC_BUFPTR  NdrSH_IfCopy(PMIDL_STUB_MESSAGE,ubyte**,uint);
535 RPC_BUFPTR  NdrSH_IfAllocCopy(PMIDL_STUB_MESSAGE,ubyte**,uint);
536 uint  NdrSH_Copy(ubyte*,ubyte*,uint);
537 void  NdrSH_IfFree(PMIDL_STUB_MESSAGE,ubyte*);
538 RPC_BUFPTR  NdrSH_StringMarshall(PMIDL_STUB_MESSAGE,ubyte*,uint,int);
539 RPC_BUFPTR  NdrSH_StringUnMarshall(PMIDL_STUB_MESSAGE,ubyte**,int);
540 void* RpcSsAllocate(uint);
541 void  RpcSsDisableAllocate();
542 void  RpcSsEnableAllocate();
543 void  RpcSsFree(void*);
544 RPC_SS_THREAD_HANDLE  RpcSsGetThreadHandle();
545 void  RpcSsSetClientAllocFree(PRPC_CLIENT_ALLOC,PRPC_CLIENT_FREE);
546 void  RpcSsSetThreadHandle(RPC_SS_THREAD_HANDLE);
547 void  RpcSsSwapClientAllocFree(PRPC_CLIENT_ALLOC,PRPC_CLIENT_FREE,PRPC_CLIENT_ALLOC*,PRPC_CLIENT_FREE*);
548 void* RpcSmAllocate(uint,RPC_STATUS*);
549 RPC_STATUS  RpcSmClientFree(void*);
550 RPC_STATUS  RpcSmDestroyClientContext(void**);
551 RPC_STATUS  RpcSmDisableAllocate();
552 RPC_STATUS  RpcSmEnableAllocate();
553 RPC_STATUS  RpcSmFree(void*);
554 RPC_SS_THREAD_HANDLE  RpcSmGetThreadHandle(RPC_STATUS*);
555 RPC_STATUS  RpcSmSetClientAllocFree(PRPC_CLIENT_ALLOC,PRPC_CLIENT_FREE);
556 RPC_STATUS  RpcSmSetThreadHandle(RPC_SS_THREAD_HANDLE);
557 RPC_STATUS  RpcSmSwapClientAllocFree(PRPC_CLIENT_ALLOC,PRPC_CLIENT_FREE,PRPC_CLIENT_ALLOC*,PRPC_CLIENT_FREE*);
558 void  NdrRpcSsEnableAllocate(PMIDL_STUB_MESSAGE);
559 void  NdrRpcSsDisableAllocate(PMIDL_STUB_MESSAGE);
560 void  NdrRpcSmSetClientToOsf(PMIDL_STUB_MESSAGE);
561 void* NdrRpcSmClientAllocate(uint);
562 void  NdrRpcSmClientFree(void*);
563 void* NdrRpcSsDefaultAllocate(uint);
564 void  NdrRpcSsDefaultFree(void*);
565 PFULL_PTR_XLAT_TABLES  NdrFullPointerXlatInit(uint,XLAT_SIDE);
566 void  NdrFullPointerXlatFree(PFULL_PTR_XLAT_TABLES);
567 int  NdrFullPointerQueryPointer(PFULL_PTR_XLAT_TABLES,void*,ubyte,uint*);
568 int  NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES,uint,ubyte,void**);
569 void  NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES,uint,void*);
570 int  NdrFullPointerFree(PFULL_PTR_XLAT_TABLES,void*);
571 void* NdrAllocate(PMIDL_STUB_MESSAGE,uint);
572 void  NdrClearOutParameters(PMIDL_STUB_MESSAGE,PFORMAT_STRING,void*);
573 void* NdrOleAllocate(uint);
574 void  NdrOleFree(void*);
575 ubyte* NdrUserMarshalMarshall(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
576 ubyte* NdrUserMarshalUnmarshall(PMIDL_STUB_MESSAGE,ubyte**,PFORMAT_STRING,ubyte);
577 void  NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);
578 uint  NdrUserMarshalMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
579 void  NdrUserMarshalFree(PMIDL_STUB_MESSAGE,ubyte*,PFORMAT_STRING);