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