home *** CD-ROM | disk | FTP | other *** search
/ PC World 2001 March / PCWorld_2001-03_cd.bin / Software / TemaCD / devc / _SETUP.5 / Group3 / rpcndr.h < prev    next >
C/C++ Source or Header  |  1999-11-07  |  27KB  |  465 lines

  1. #ifndef __RPCNDR_H__
  2. #define __RPCNDR_H__
  3. #include <rpcnsip.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #include <objfwd.h>
  8. #define NDR_CHAR_REP_MASK (unsigned long)0xFL
  9. #define NDR_INT_REP_MASK (unsigned long)0xF0L
  10. #define NDR_FLOAT_REP_MASK (unsigned long)0xFF00L
  11. #define NDR_LITTLE_ENDIAN (unsigned long)0x10L
  12. #define NDR_BIG_ENDIAN (unsigned long)0
  13. #define NDR_IEEE_FLOAT (unsigned long)0
  14. #define NDR_VAX_FLOAT (unsigned long)0x100L
  15. #define NDR_ASCII_CHAR (unsigned long)0
  16. #define NDR_EBCDIC_CHAR (unsigned long)1
  17. #define NDR_LOCAL_DATA_REPRESENTATION (unsigned long)0x10L
  18. #define NDR_LOCAL_ENDIAN NDR_LITTLE_ENDIAN
  19. #define __RPC_CALLEE __stdcall
  20. #ifndef __MIDL_USER_DEFINED
  21. #define midl_user_allocate MIDL_user_allocate
  22. #define midl_user_free MIDL_user_free
  23. #define __MIDL_USER_DEFINED
  24. #endif
  25. #define RPC_VAR_ENTRY __cdecl
  26. #ifdef _M_IX86
  27. #define __MIDL_DECLSPEC_DLLIMPORT __declspec(dllimport)
  28. #define __MIDL_DECLSPEC_DLLEXPORT __declspec(dllexport)
  29. #else
  30. #define __MIDL_DECLSPEC_DLLIMPORT
  31. #define __MIDL_DECLSPEC_DLLEXPORT
  32. #endif
  33. #if defined(HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)
  34. #define hyper __int64
  35. #define MIDL_uhyper unsigned __int64
  36. #else
  37. #define hyper double
  38. #define MIDL_uhyper double
  39. #endif
  40. #define small char
  41. typedef unsigned char byte;
  42. #define NDRSContextValue(hContext) (&(hContext)->userContext)
  43. #define cbNDRContext 20
  44. #define byte_from_ndr(source, target) { *(target) = *(*(char**)&(source)->Buffer)++; }
  45. #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)); }
  46. #define boolean_from_ndr(source, target) { *(target) = *(*(char**)&(source)->Buffer)++; }
  47. #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)); }
  48. #define small_from_ndr(source, target) { *(target) = *(*(char**)&(source)->Buffer)++; }
  49. #define small_from_ndr_temp(source, target, format) { *(target) = *(*(char**)(source))++; }
  50. #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)); }
  51. #define MIDL_ascii_strlen(string) strlen(string)
  52. #define MIDL_ascii_strcpy(target,source) strcpy(target,source)
  53. #define MIDL_memset(s,c,n) memset(s,c,n)
  54. #define _midl_ma1( p, cast ) *(*( cast **)&p)++
  55. #define _midl_ma2( p, cast ) *(*( cast **)&p)++
  56. #define _midl_ma4( p, cast ) *(*( cast **)&p)++
  57. #define _midl_ma8( p, cast ) *(*( cast **)&p)++
  58. #define _midl_unma1( p, cast ) *(( cast *)p)++
  59. #define _midl_unma2( p, cast ) *(( cast *)p)++
  60. #define _midl_unma3( p, cast ) *(( cast *)p)++
  61. #define _midl_unma4( p, cast ) *(( cast *)p)++
  62. #define _midl_fa2( p ) (p = (RPC_BUFPTR )((unsigned long)(p+1) & 0xfffffffe))
  63. #define _midl_fa4( p ) (p = (RPC_BUFPTR )((unsigned long)(p+3) & 0xfffffffc))
  64. #define _midl_fa8( p ) (p = (RPC_BUFPTR )((unsigned long)(p+7) & 0xfffffff8))
  65. #define _midl_addp( p, n ) (p += n)
  66. #define _midl_marsh_lhs( p, cast ) *(*( cast **)&p)++
  67. #define _midl_marsh_up( mp, p ) *(*(unsigned long **)&mp)++ = (unsigned long)p
  68. #define _midl_advmp( mp ) *(*(unsigned long **)&mp)++
  69. #define _midl_unmarsh_up( p ) (*(*(unsigned long **)&p)++)
  70. #define NdrMarshConfStringHdr( p, s, l ) (_midl_ma4( p, unsigned long) = s, _midl_ma4( p, unsigned long) = 0, _midl_ma4( p, unsigned long) = l)
  71. #define NdrUnMarshConfStringHdr(p, s, l) ((s=_midl_unma4(p,unsigned long), (_midl_addp(p,4)), (l=_midl_unma4(p,unsigned long))
  72. #define NdrMarshCCtxtHdl(pc,p) (NDRCContextMarshall( (NDR_CCONTEXT)pc, p ),p+20)
  73. #define NdrUnMarshCCtxtHdl(pc,p,h,drep) (NDRCContextUnmarshall((NDR_CONTEXT)pc,h,p,drep), p+20)
  74. #define NdrUnMarshSCtxtHdl(pc, p,drep) (pc = NdrSContextUnMarshall(p,drep ))
  75. #define NdrMarshSCtxtHdl(pc,p,rd) (NdrSContextMarshall((NDR_SCONTEXT)pc,p, (NDR_RUNDOWN)rd)
  76. #define NdrFieldOffset(s,f) (long)(& (((s *)0)->f))
  77. #define NdrFieldPad(s,f,p,t) (NdrFieldOffset(s,f) - NdrFieldOffset(s,p) - sizeof(t))
  78. #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
  79. #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
  80. #ifdef CONST_VTABLE
  81. #define CONST_VTBL const
  82. #else
  83. #define CONST_VTBL
  84. #endif
  85. typedef void *NDR_CCONTEXT;
  86. typedef struct {
  87.     void *pad[2];
  88.     void *userContext;
  89. } *NDR_SCONTEXT;
  90. typedef void (__RPC_USER *NDR_RUNDOWN)(void*);
  91. typedef struct _SCONTEXT_QUEUE {
  92.     unsigned long NumberOfObjects;
  93.     NDR_SCONTEXT *ArrayOfObjects;
  94. } SCONTEXT_QUEUE,*PSCONTEXT_QUEUE;
  95. struct _MIDL_STUB_MESSAGE;
  96. struct _MIDL_STUB_DESC;
  97. struct _FULL_PTR_XLAT_TABLES;
  98. typedef unsigned char *RPC_BUFPTR;
  99. typedef unsigned long RPC_LENGTH;
  100. typedef void(__RPC_USER *EXPR_EVAL)(struct _MIDL_STUB_MESSAGE*);
  101. typedef const unsigned char *PFORMAT_STRING;
  102. typedef struct {
  103.     long Dimension;
  104.     unsigned long *BufferConformanceMark;
  105.     unsigned long *BufferVarianceMark;
  106.     unsigned long *MaxCountArray;
  107.     unsigned long *OffsetArray;
  108.     unsigned long *ActualCountArray;
  109. } ARRAY_INFO,*PARRAY_INFO;
  110.  
  111. RPC_BINDING_HANDLE RPC_ENTRY NDRCContextBinding(NDR_CCONTEXT);
  112. void RPC_ENTRY NDRCContextMarshall(NDR_CCONTEXT,void*);
  113. void RPC_ENTRY NDRCContextUnmarshall(NDR_CCONTEXT*,RPC_BINDING_HANDLE,void*,unsigned long);
  114. void RPC_ENTRY NDRSContextMarshall(NDR_SCONTEXT,void*,NDR_RUNDOWN);
  115. NDR_SCONTEXT RPC_ENTRY NDRSContextUnmarshall(void*pBuff,unsigned long);
  116. void RPC_ENTRY RpcSsDestroyClientContext(void**);
  117. void RPC_ENTRY NDRcopy(void*,void*,unsigned int);
  118. unsigned int RPC_ENTRY MIDL_wchar_strlen(wchar_t*);
  119. void RPC_ENTRY MIDL_wchar_strcpy(void*,wchar_t*);
  120. void RPC_ENTRY char_from_ndr(PRPC_MESSAGE,unsigned char*);
  121. void RPC_ENTRY char_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,unsigned char*);
  122. void RPC_ENTRY short_from_ndr(PRPC_MESSAGE,unsigned short*);
  123. void RPC_ENTRY short_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,unsigned short*);
  124. void RPC_ENTRY short_from_ndr_temp(unsigned char**,unsigned short*,unsigned long);
  125. void RPC_ENTRY long_from_ndr(PRPC_MESSAGE,unsigned long*);
  126. void RPC_ENTRY long_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,unsigned long*);
  127. void RPC_ENTRY long_from_ndr_temp(unsigned char**,unsigned long*,unsigned long);
  128. void RPC_ENTRY enum_from_ndr(PRPC_MESSAGE,unsigned int*);
  129. void RPC_ENTRY float_from_ndr(PRPC_MESSAGE,void*);
  130. void RPC_ENTRY float_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,void*);
  131. void RPC_ENTRY double_from_ndr(PRPC_MESSAGE,void*);
  132. void RPC_ENTRY double_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,void*);
  133. void RPC_ENTRY hyper_from_ndr(PRPC_MESSAGE,hyper*);
  134. void RPC_ENTRY hyper_array_from_ndr(PRPC_MESSAGE,unsigned long,unsigned long,hyper*);
  135. void RPC_ENTRY hyper_from_ndr_temp(unsigned char**,hyper*,unsigned long);
  136. void RPC_ENTRY data_from_ndr(PRPC_MESSAGE,void*,char*,unsigned char);
  137. void RPC_ENTRY data_into_ndr(void*,PRPC_MESSAGE,char*,unsigned char);
  138. void RPC_ENTRY tree_into_ndr(void*,PRPC_MESSAGE,char*,unsigned char);
  139. void RPC_ENTRY data_size_ndr(void*,PRPC_MESSAGE,char*,unsigned char);
  140. void RPC_ENTRY tree_size_ndr(void*,PRPC_MESSAGE,char*,unsigned char);
  141. void RPC_ENTRY tree_peek_ndr(PRPC_MESSAGE,unsigned char**,char*,unsigned char);
  142. void *RPC_ENTRY midl_allocate(int);
  143.  
  144. #pragma pack(push,4)
  145. typedef struct _MIDL_STUB_MESSAGE {
  146.     PRPC_MESSAGE RpcMsg;
  147.     unsigned char *Buffer;
  148.     unsigned char *BufferStart;
  149.     unsigned char *BufferEnd;
  150.     unsigned char *BufferMark;
  151.     unsigned long BufferLength;
  152.     unsigned long MemorySize;
  153.     unsigned char *Memory;
  154.     int IsClient;
  155.     int ReuseBuffer;
  156.     unsigned char *AllocAllNodesMemory;
  157.     unsigned char *AllocAllNodesMemoryEnd;
  158.     int IgnoreEmbeddedPointers;
  159.     unsigned char *PointerBufferMark;
  160.     unsigned char fBufferValid;
  161.     unsigned char Unused;
  162.     unsigned long MaxCount;
  163.     unsigned long Offset;
  164.     unsigned long ActualCount;
  165.     void*(__RPC_API *pfnAllocate)(unsigned int);
  166.     void(__RPC_API *pfnFree)(void*);
  167.     unsigned char *StackTop;
  168.     unsigned char *pPresentedType;
  169.     unsigned char *pTransmitType;
  170.     handle_t SavedHandle;
  171.     const struct _MIDL_STUB_DESC *StubDesc;
  172.     struct _FULL_PTR_XLAT_TABLES *FullPtrXlatTables;
  173.     unsigned long FullPtrRefId;
  174.     int fCheckBounds;
  175.     int fInDontFree :1;
  176.     int fDontCallFreeInst :1;
  177.     int fInOnlyParam :1;
  178.     int fHasReturn :1;
  179.     unsigned long dwDestContext;
  180.     void*pvDestContext;
  181.     NDR_SCONTEXT *SavedContextHandles;
  182.     long ParamNumber;
  183.     struct IRpcChannelBuffer *pRpcChannelBuffer;
  184.     PARRAY_INFO pArrayInfo;
  185.     unsigned long *SizePtrCountArray;
  186.     unsigned long *SizePtrOffsetArray;
  187.     unsigned long *SizePtrLengthArray;
  188.     void*pArgQueue;
  189.     unsigned long dwStubPhase;
  190.     unsigned long Reserved[5];
  191. } MIDL_STUB_MESSAGE,*PMIDL_STUB_MESSAGE;
  192. #pragma pack(pop)
  193. typedef void*(__RPC_API *GENERIC_BINDING_ROUTINE)(void*);
  194. typedef void (__RPC_API *GENERIC_UNBIND_ROUTINE)(void*,unsigned char*);
  195. typedef struct _GENERIC_BINDING_ROUTINE_PAIR {
  196.     GENERIC_BINDING_ROUTINE pfnBind;
  197.     GENERIC_UNBIND_ROUTINE pfnUnbind;
  198. } GENERIC_BINDING_ROUTINE_PAIR,*PGENERIC_BINDING_ROUTINE_PAIR;
  199. typedef struct __GENERIC_BINDING_INFO {
  200.     void *pObj;
  201.     unsigned int Size;
  202.     GENERIC_BINDING_ROUTINE pfnBind;
  203.     GENERIC_UNBIND_ROUTINE pfnUnbind;
  204. } GENERIC_BINDING_INFO,*PGENERIC_BINDING_INFO;
  205. typedef void(__RPC_USER *XMIT_HELPER_ROUTINE)(PMIDL_STUB_MESSAGE);
  206. typedef struct _XMIT_ROUTINE_QUINTUPLE {
  207.     XMIT_HELPER_ROUTINE pfnTranslateToXmit;
  208.     XMIT_HELPER_ROUTINE pfnTranslateFromXmit;
  209.     XMIT_HELPER_ROUTINE pfnFreeXmit;
  210.     XMIT_HELPER_ROUTINE pfnFreeInst;
  211. } XMIT_ROUTINE_QUINTUPLE,*PXMIT_ROUTINE_QUINTUPLE;
  212. typedef struct _MALLOC_FREE_STRUCT {
  213. void*(__RPC_USER *pfnAllocate)(unsigned int);
  214. void(__RPC_USER *pfnFree)(void*);
  215. } MALLOC_FREE_STRUCT;
  216. typedef struct _COMM_FAULT_OFFSETS {
  217.     short CommOffset;
  218.     short FaultOffset;
  219. } COMM_FAULT_OFFSETS;
  220. typedef struct _MIDL_STUB_DESC {
  221.     void*RpcInterfaceInformation;
  222.     void*(__RPC_API *pfnAllocate)(unsigned int);
  223.     void(__RPC_API *pfnFree)(void*);
  224.     union {
  225.         handle_t *pAutoHandle;
  226.         handle_t *pPrimitiveHandle;
  227.         PGENERIC_BINDING_INFO pGenericBindingInfo;
  228.     } IMPLICIT_HANDLE_INFO;
  229.     const NDR_RUNDOWN *apfnNdrRundownRoutines;
  230.     const GENERIC_BINDING_ROUTINE_PAIR *aGenericBindingRoutinePairs;
  231.     const EXPR_EVAL *apfnExprEval;
  232.     const XMIT_ROUTINE_QUINTUPLE *aXmitQuintuple;
  233.     const unsigned char *pFormatTypes;
  234.     int fCheckBounds;
  235.     unsigned long Version;
  236.     MALLOC_FREE_STRUCT *pMallocFreeStruct;
  237.     long MIDLVersion;
  238.     const COMM_FAULT_OFFSETS *CommFaultOffsets;
  239. } MIDL_STUB_DESC;
  240. typedef const MIDL_STUB_DESC *PMIDL_STUB_DESC;
  241. typedef void*PMIDL_XMIT_TYPE;
  242. typedef struct _MIDL_FORMAT_STRING {
  243.     short Pad;
  244.     unsigned char Format[1];
  245. } MIDL_FORMAT_STRING;
  246. typedef void(__RPC_API *STUB_THUNK)(PMIDL_STUB_MESSAGE);
  247. typedef long(__RPC_API *SERVER_ROUTINE)();
  248. typedef struct _MIDL_SERVER_INFO_ {
  249.     PMIDL_STUB_DESC pStubDesc;
  250.     const SERVER_ROUTINE *DispatchTable;
  251.     PFORMAT_STRING ProcString;
  252.     const unsigned short *FmtStringOffset;
  253.     const STUB_THUNK *ThunkTable;
  254. } MIDL_SERVER_INFO,*PMIDL_SERVER_INFO;
  255. typedef struct _MIDL_STUBLESS_PROXY_INFO {
  256.     PMIDL_STUB_DESC pStubDesc;
  257.     PFORMAT_STRING ProcFormatString;
  258.     const unsigned short *FormatStringOffset;
  259. } MIDL_STUBLESS_PROXY_INFO;
  260. typedef MIDL_STUBLESS_PROXY_INFO *PMIDL_STUBLESS_PROXY_INFO;
  261. typedef union _CLIENT_CALL_RETURN {
  262.     void *Pointer;
  263.     long Simple;
  264. } CLIENT_CALL_RETURN;
  265. typedef enum { XLAT_SERVER = 1,XLAT_CLIENT } XLAT_SIDE;
  266. typedef struct _FULL_PTR_TO_REFID_ELEMENT {
  267.     struct _FULL_PTR_TO_REFID_ELEMENT *Next;
  268.     void*Pointer;
  269.     unsigned long RefId;
  270.     unsigned char State;
  271. } FULL_PTR_TO_REFID_ELEMENT,*PFULL_PTR_TO_REFID_ELEMENT;
  272. typedef struct _FULL_PTR_XLAT_TABLES {
  273.     struct {
  274.         void **XlatTable;
  275.         unsigned char *StateTable;
  276.         unsigned long NumberOfEntries;
  277.     } RefIdToPointer;
  278.     struct {
  279.         PFULL_PTR_TO_REFID_ELEMENT *XlatTable;
  280.         unsigned long NumberOfBuckets;
  281.         unsigned long HashMask;
  282.     } PointerToRefId;
  283.     unsigned long NextRefId;
  284.     XLAT_SIDE XlatSide;
  285. } FULL_PTR_XLAT_TABLES,*PFULL_PTR_XLAT_TABLES;
  286. void RPC_ENTRY NdrSimpleTypeMarshall(PMIDL_STUB_MESSAGE,unsigned char*,unsigned char);
  287. unsigned char *RPC_ENTRY NdrPointerMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING pFormat);
  288. unsigned char *RPC_ENTRY NdrSimpleStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  289. unsigned char *RPC_ENTRY NdrConformantStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  290. unsigned char *RPC_ENTRY NdrConformantVaryingStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  291. unsigned char *RPC_ENTRY NdrHardStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  292. unsigned char *RPC_ENTRY NdrComplexStructMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  293. unsigned char *RPC_ENTRY NdrFixedArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  294. unsigned char *RPC_ENTRY NdrConformantArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  295. unsigned char *RPC_ENTRY NdrConformantVaryingArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  296. unsigned char *RPC_ENTRY NdrVaryingArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  297. unsigned char *RPC_ENTRY NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  298. unsigned char *RPC_ENTRY NdrNonConformantStringMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  299. unsigned char *RPC_ENTRY NdrConformantStringMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  300. unsigned char *RPC_ENTRY NdrEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  301. unsigned char *RPC_ENTRY NdrNonEncapsulatedUnionMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  302. unsigned char *RPC_ENTRY NdrByteCountPointerMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  303. unsigned char *RPC_ENTRY NdrXmitOrRepAsMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  304. unsigned char *RPC_ENTRY NdrInterfacePointerMarshall(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  305. void RPC_ENTRY NdrClientContextMarshall(PMIDL_STUB_MESSAGE,NDR_CCONTEXT,int);
  306. void RPC_ENTRY NdrServerContextMarshall(PMIDL_STUB_MESSAGE,NDR_SCONTEXT,NDR_RUNDOWN);
  307. void RPC_ENTRY NdrSimpleTypeUnmarshall(PMIDL_STUB_MESSAGE,unsigned char*,unsigned char);
  308. unsigned char *RPC_ENTRY NdrPointerUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  309. unsigned char *RPC_ENTRY NdrSimpleStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  310. unsigned char *RPC_ENTRY NdrConformantStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  311. unsigned char *RPC_ENTRY NdrConformantVaryingStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  312. unsigned char *RPC_ENTRY NdrHardStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  313. unsigned char *RPC_ENTRY NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  314. unsigned char *RPC_ENTRY NdrFixedArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  315. unsigned char *RPC_ENTRY NdrConformantArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  316. unsigned char *RPC_ENTRY NdrConformantVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  317. unsigned char *RPC_ENTRY NdrVaryingArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  318. unsigned char *RPC_ENTRY NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  319. unsigned char *RPC_ENTRY NdrNonConformantStringUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  320. unsigned char *RPC_ENTRY NdrConformantStringUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  321. unsigned char *RPC_ENTRY NdrEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  322. unsigned char *RPC_ENTRY NdrNonEncapsulatedUnionUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  323. unsigned char *RPC_ENTRY NdrByteCountPointerUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  324. unsigned char *RPC_ENTRY NdrXmitOrRepAsUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  325. unsigned char *RPC_ENTRY NdrInterfacePointerUnmarshall(PMIDL_STUB_MESSAGE,unsigned char**,PFORMAT_STRING,unsigned char);
  326. void RPC_ENTRY NdrClientContextUnmarshall(PMIDL_STUB_MESSAGE,NDR_CCONTEXT*,RPC_BINDING_HANDLE);
  327. NDR_SCONTEXT RPC_ENTRY NdrServerContextUnmarshall(PMIDL_STUB_MESSAGE);
  328. void RPC_ENTRY NdrPointerBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  329. void RPC_ENTRY NdrSimpleStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  330. void RPC_ENTRY NdrConformantStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  331. void RPC_ENTRY NdrConformantVaryingStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  332. void RPC_ENTRY NdrHardStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  333. void RPC_ENTRY NdrComplexStructBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  334. void RPC_ENTRY NdrFixedArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  335. void RPC_ENTRY NdrConformantArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  336. void RPC_ENTRY NdrConformantVaryingArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  337. void RPC_ENTRY NdrVaryingArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  338. void RPC_ENTRY NdrComplexArrayBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  339. void RPC_ENTRY NdrConformantStringBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  340. void RPC_ENTRY NdrNonConformantStringBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  341. void RPC_ENTRY NdrEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  342. void RPC_ENTRY NdrNonEncapsulatedUnionBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  343. void RPC_ENTRY NdrByteCountPointerBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  344. void RPC_ENTRY NdrXmitOrRepAsBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  345. void RPC_ENTRY NdrInterfacePointerBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  346. void RPC_ENTRY NdrContextHandleSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  347. unsigned long RPC_ENTRY NdrPointerMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  348. unsigned long RPC_ENTRY NdrSimpleStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  349. unsigned long RPC_ENTRY NdrConformantStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  350. unsigned long RPC_ENTRY NdrConformantVaryingStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  351. unsigned long RPC_ENTRY NdrHardStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  352. unsigned long RPC_ENTRY NdrComplexStructMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  353. unsigned long RPC_ENTRY NdrFixedArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  354. unsigned long RPC_ENTRY NdrConformantArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  355. unsigned long RPC_ENTRY NdrConformantVaryingArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  356. unsigned long RPC_ENTRY NdrVaryingArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  357. unsigned long RPC_ENTRY NdrComplexArrayMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  358. unsigned long RPC_ENTRY NdrConformantStringMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  359. unsigned long RPC_ENTRY NdrNonConformantStringMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  360. unsigned long RPC_ENTRY NdrEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  361. unsigned long RPC_ENTRY NdrNonEncapsulatedUnionMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  362. unsigned long RPC_ENTRY NdrXmitOrRepAsMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  363. unsigned long RPC_ENTRY NdrInterfacePointerMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  364. void RPC_ENTRY NdrPointerFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  365. void RPC_ENTRY NdrSimpleStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  366. void RPC_ENTRY NdrConformantStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  367. void RPC_ENTRY NdrConformantVaryingStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  368. void RPC_ENTRY NdrHardStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  369. void RPC_ENTRY NdrComplexStructFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  370. void RPC_ENTRY NdrFixedArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  371. void RPC_ENTRY NdrConformantArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  372. void RPC_ENTRY NdrConformantVaryingArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  373. void RPC_ENTRY NdrVaryingArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  374. void RPC_ENTRY NdrComplexArrayFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  375. void RPC_ENTRY NdrEncapsulatedUnionFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  376. void RPC_ENTRY NdrNonEncapsulatedUnionFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  377. void RPC_ENTRY NdrByteCountPointerFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  378. void RPC_ENTRY NdrXmitOrRepAsFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  379. void RPC_ENTRY NdrInterfacePointerFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
  380. void RPC_ENTRY NdrConvert(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  381. void RPC_ENTRY NdrClientInitializeNew(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,unsigned int);
  382. unsigned char *RPC_ENTRY NdrServerInitializeNew(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC);
  383. void RPC_ENTRY NdrClientInitialize(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,unsigned int);
  384. unsigned char *RPC_ENTRY NdrServerInitialize(PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC);
  385. unsigned char *RPC_ENTRY NdrServerInitializeUnmarshall(PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,PRPC_MESSAGE);
  386. void RPC_ENTRY NdrServerInitializeMarshall(PRPC_MESSAGE,PMIDL_STUB_MESSAGE);
  387. unsigned char *RPC_ENTRY NdrGetBuffer(PMIDL_STUB_MESSAGE,unsigned long,RPC_BINDING_HANDLE);
  388. unsigned char *RPC_ENTRY NdrNsGetBuffer(PMIDL_STUB_MESSAGE,unsigned long,RPC_BINDING_HANDLE);
  389. unsigned char *RPC_ENTRY NdrSendReceive(PMIDL_STUB_MESSAGE,unsigned char*);
  390. unsigned char *RPC_ENTRY NdrNsSendReceive(PMIDL_STUB_MESSAGE,unsigned char*,RPC_BINDING_HANDLE*);
  391. void RPC_ENTRY NdrFreeBuffer(PMIDL_STUB_MESSAGE);
  392. CLIENT_CALL_RETURN RPC_VAR_ENTRY NdrClientCall(PMIDL_STUB_DESC,PFORMAT_STRING,...);
  393. typedef enum {
  394.     STUB_UNMARSHAL,
  395.     STUB_CALL_SERVER,
  396.     STUB_MARSHAL,
  397.     STUB_CALL_SERVER_NO_HRESULT
  398. } STUB_PHASE;
  399. typedef enum {
  400.     PROXY_CALCSIZE,
  401.     PROXY_GETBUFFER,
  402.     PROXY_MARSHAL,
  403.     PROXY_SENDRECEIVE,
  404.     PROXY_UNMARSHAL
  405. } PROXY_PHASE;
  406. long RPC_ENTRY NdrStubCall(struct IRpcStubBuffer*,struct IRpcChannelBuffer*,PRPC_MESSAGE,unsigned long*);
  407. void RPC_ENTRY NdrServerCall(PRPC_MESSAGE);
  408. int RPC_ENTRY NdrServerUnmarshall(struct IRpcChannelBuffer*,PRPC_MESSAGE,PMIDL_STUB_MESSAGE,PMIDL_STUB_DESC,PFORMAT_STRING,void*);
  409. void RPC_ENTRY NdrServerMarshall(struct IRpcStubBuffer*,struct IRpcChannelBuffer*,PMIDL_STUB_MESSAGE,PFORMAT_STRING);
  410. RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus(PMIDL_STUB_MESSAGE,unsigned long*,unsigned long*,RPC_STATUS);
  411. int RPC_ENTRY NdrSH_UPDecision(PMIDL_STUB_MESSAGE,unsigned char**,RPC_BUFPTR);
  412. int RPC_ENTRY NdrSH_TLUPDecision(PMIDL_STUB_MESSAGE,unsigned char**);
  413. int RPC_ENTRY NdrSH_TLUPDecisionBuffer(PMIDL_STUB_MESSAGE,unsigned char**);
  414. int RPC_ENTRY NdrSH_IfAlloc(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
  415. int RPC_ENTRY NdrSH_IfAllocRef(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
  416. int RPC_ENTRY NdrSH_IfAllocSet(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
  417. RPC_BUFPTR RPC_ENTRY NdrSH_IfCopy(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
  418. RPC_BUFPTR RPC_ENTRY NdrSH_IfAllocCopy(PMIDL_STUB_MESSAGE,unsigned char**,unsigned long);
  419. unsigned long RPC_ENTRY NdrSH_Copy(unsigned char*,unsigned char*,unsigned long);
  420. void RPC_ENTRY NdrSH_IfFree(PMIDL_STUB_MESSAGE,unsigned char*);
  421. RPC_BUFPTR RPC_ENTRY NdrSH_StringMarshall(PMIDL_STUB_MESSAGE,unsigned char*,unsigned long,int);
  422. RPC_BUFPTR RPC_ENTRY NdrSH_StringUnMarshall(PMIDL_STUB_MESSAGE,unsigned char**,int);
  423. typedef void *RPC_SS_THREAD_HANDLE;
  424. typedef void* __RPC_API RPC_CLIENT_ALLOC(unsigned int);
  425. typedef void __RPC_API RPC_CLIENT_FREE(void*);
  426. void*RPC_ENTRY RpcSsAllocate(unsigned int);
  427. void RPC_ENTRY RpcSsDisableAllocate(void);
  428. void RPC_ENTRY RpcSsEnableAllocate(void);
  429. void RPC_ENTRY RpcSsFree(void*);
  430. RPC_SS_THREAD_HANDLE RPC_ENTRY RpcSsGetThreadHandle(void);
  431. void RPC_ENTRY RpcSsSetClientAllocFree(RPC_CLIENT_ALLOC*,RPC_CLIENT_FREE*);
  432. void RPC_ENTRY RpcSsSetThreadHandle(RPC_SS_THREAD_HANDLE);
  433. void RPC_ENTRY RpcSsSwapClientAllocFree(RPC_CLIENT_ALLOC*,RPC_CLIENT_FREE*,RPC_CLIENT_ALLOC**,RPC_CLIENT_FREE**);
  434. void*RPC_ENTRY RpcSmAllocate(unsigned int,RPC_STATUS*);
  435. RPC_STATUS RPC_ENTRY RpcSmClientFree(void*);
  436. RPC_STATUS RPC_ENTRY RpcSmDestroyClientContext(void**);
  437. RPC_STATUS RPC_ENTRY RpcSmDisableAllocate(void);
  438. RPC_STATUS RPC_ENTRY RpcSmEnableAllocate(void);
  439. RPC_STATUS RPC_ENTRY RpcSmFree(void*);
  440. RPC_SS_THREAD_HANDLE RPC_ENTRY RpcSmGetThreadHandle(RPC_STATUS*);
  441. RPC_STATUS RPC_ENTRY RpcSmSetClientAllocFree(RPC_CLIENT_ALLOC*,RPC_CLIENT_FREE*);
  442. RPC_STATUS RPC_ENTRY RpcSmSetThreadHandle(RPC_SS_THREAD_HANDLE);
  443. RPC_STATUS RPC_ENTRY RpcSmSwapClientAllocFree(RPC_CLIENT_ALLOC*,RPC_CLIENT_FREE*,RPC_CLIENT_ALLOC**,RPC_CLIENT_FREE**);
  444. void RPC_ENTRY NdrRpcSsEnableAllocate(PMIDL_STUB_MESSAGE);
  445. void RPC_ENTRY NdrRpcSsDisableAllocate(PMIDL_STUB_MESSAGE);
  446. void RPC_ENTRY NdrRpcSmSetClientToOsf(PMIDL_STUB_MESSAGE);
  447. void*RPC_ENTRY NdrRpcSmClientAllocate(unsigned int);
  448. void RPC_ENTRY NdrRpcSmClientFree(void*);
  449. void*RPC_ENTRY NdrRpcSsDefaultAllocate(unsigned int);
  450. void RPC_ENTRY NdrRpcSsDefaultFree(void*);
  451. PFULL_PTR_XLAT_TABLES RPC_ENTRY NdrFullPointerXlatInit(unsigned long,XLAT_SIDE);
  452. void RPC_ENTRY NdrFullPointerXlatFree(PFULL_PTR_XLAT_TABLES);
  453. int RPC_ENTRY NdrFullPointerQueryPointer(PFULL_PTR_XLAT_TABLES,void*,unsigned char,unsigned long*);
  454. int RPC_ENTRY NdrFullPointerQueryRefId(PFULL_PTR_XLAT_TABLES,unsigned long,unsigned char,void**);
  455. void RPC_ENTRY NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES,unsigned long,void*);
  456. int RPC_ENTRY NdrFullPointerFree(PFULL_PTR_XLAT_TABLES,void*);
  457. void*RPC_ENTRY NdrAllocate(PMIDL_STUB_MESSAGE,unsigned int);
  458. void RPC_ENTRY NdrClearOutParameters(PMIDL_STUB_MESSAGE,PFORMAT_STRING,void*);
  459. void*RPC_ENTRY NdrOleAllocate(unsigned int);
  460. void RPC_ENTRY NdrOleFree(void*);
  461. #ifdef __cplusplus
  462. }
  463. #endif
  464. #endif
  465.