DUNION_S.C
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:8k
源码类别:

Windows编程

开发平台:

Visual C++

  1. /* this ALWAYS GENERATED file contains the RPC server stubs */
  2. /* File created by MIDL compiler version 3.03.0110 */
  3. /* at Mon Mar 30 03:05:33 1998
  4.  */
  5. /* Compiler settings for dunion.idl:
  6.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext, oldnames
  7.     error checks: none
  8. */
  9. //@@MIDL_FILE_HEADING(  )
  10. #include <string.h>
  11. #include "dunion.h"
  12. #define TYPE_FORMAT_STRING_SIZE   63                                
  13. #define PROC_FORMAT_STRING_SIZE   17                                
  14. typedef struct _MIDL_TYPE_FORMAT_STRING
  15.     {
  16.     short          Pad;
  17.     unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
  18.     } MIDL_TYPE_FORMAT_STRING;
  19. typedef struct _MIDL_PROC_FORMAT_STRING
  20.     {
  21.     short          Pad;
  22.     unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
  23.     } MIDL_PROC_FORMAT_STRING;
  24. extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
  25. extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
  26. /* Standard interface: dunion, ver. 1.0,
  27.    GUID={0x87E5BFA0,0xCA46,0x1067,{0xB3,0x1B,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
  28. extern RPC_DISPATCH_TABLE dunion_DispatchTable;
  29. static const RPC_SERVER_INTERFACE dunion___RpcServerInterface =
  30.     {
  31.     sizeof(RPC_SERVER_INTERFACE),
  32.     {{0x87E5BFA0,0xCA46,0x1067,{0xB3,0x1B,0x00,0xDD,0x01,0x06,0x62,0xDA}},{1,0}},
  33.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  34.     &dunion_DispatchTable,
  35.     0,
  36.     0,
  37.     0,
  38.     0,
  39.     0
  40.     };
  41. RPC_IF_HANDLE dunion_ServerIfHandle = (RPC_IF_HANDLE)& dunion___RpcServerInterface;
  42. extern const MIDL_STUB_DESC dunion_StubDesc;
  43. void __RPC_STUB
  44. dunion_UnionParamProc(
  45.     PRPC_MESSAGE _pRpcMessage )
  46. {
  47.     DISCRIM_UNION_PARAM_TYPE __RPC_FAR *UnionParam;
  48.     MIDL_STUB_MESSAGE _StubMsg;
  49.     short sDiscrim;
  50.     RPC_STATUS _Status;
  51.     
  52.     ((void)(_Status));
  53.     NdrServerInitializeNew(
  54.                           _pRpcMessage,
  55.                           &_StubMsg,
  56.                           &dunion_StubDesc);
  57.     
  58.     ( DISCRIM_UNION_PARAM_TYPE __RPC_FAR * )UnionParam = 0;
  59.     RpcTryFinally
  60.         {
  61.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  62.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  63.         
  64.         NdrNonEncapsulatedUnionUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  65.                                            (unsigned char __RPC_FAR * __RPC_FAR *)&UnionParam,
  66.                                            (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4],
  67.                                            (unsigned char)0 );
  68.         
  69.         _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 1) & ~ 0x1);
  70.         sDiscrim = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  71.         
  72.         
  73.         UnionParamProc(UnionParam,sDiscrim);
  74.         
  75.         }
  76.     RpcFinally
  77.         {
  78.         _StubMsg.MaxCount = sDiscrim;
  79.         
  80.         NdrPointerFree( &_StubMsg,
  81.                         (unsigned char __RPC_FAR *)UnionParam,
  82.                         &__MIDL_TypeFormatString.Format[0] );
  83.         
  84.         }
  85.     RpcEndFinally
  86.     _pRpcMessage->BufferLength = 
  87.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  88.     
  89. }
  90. void __RPC_STUB
  91. dunion_UnionStructProc(
  92.     PRPC_MESSAGE _pRpcMessage )
  93. {
  94.     DISCRIM_UNION_STRUCT_TYPE __RPC_FAR *UnionStruct;
  95.     MIDL_STUB_MESSAGE _StubMsg;
  96.     RPC_STATUS _Status;
  97.     
  98.     ((void)(_Status));
  99.     NdrServerInitializeNew(
  100.                           _pRpcMessage,
  101.                           &_StubMsg,
  102.                           &dunion_StubDesc);
  103.     
  104.     ( DISCRIM_UNION_STRUCT_TYPE __RPC_FAR * )UnionStruct = 0;
  105.     RpcTryFinally
  106.         {
  107.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  108.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[8] );
  109.         
  110.         NdrComplexStructUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  111.                                     (unsigned char __RPC_FAR * __RPC_FAR *)&UnionStruct,
  112.                                     (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[48],
  113.                                     (unsigned char)0 );
  114.         
  115.         
  116.         UnionStructProc(UnionStruct);
  117.         
  118.         }
  119.     RpcFinally
  120.         {
  121.         NdrPointerFree( &_StubMsg,
  122.                         (unsigned char __RPC_FAR *)UnionStruct,
  123.                         &__MIDL_TypeFormatString.Format[36] );
  124.         
  125.         }
  126.     RpcEndFinally
  127.     _pRpcMessage->BufferLength = 
  128.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  129.     
  130. }
  131. void __RPC_STUB
  132. dunion_Shutdown(
  133.     PRPC_MESSAGE _pRpcMessage )
  134. {
  135.     MIDL_STUB_MESSAGE _StubMsg;
  136.     RPC_STATUS _Status;
  137.     
  138.     ((void)(_Status));
  139.     NdrServerInitializeNew(
  140.                           _pRpcMessage,
  141.                           &_StubMsg,
  142.                           &dunion_StubDesc);
  143.     
  144.     RpcTryFinally
  145.         {
  146.         
  147.         Shutdown();
  148.         
  149.         }
  150.     RpcFinally
  151.         {
  152.         }
  153.     RpcEndFinally
  154.     _pRpcMessage->BufferLength = 
  155.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  156.     
  157. }
  158. static const MIDL_STUB_DESC dunion_StubDesc = 
  159.     {
  160.     (void __RPC_FAR *)& dunion___RpcServerInterface,
  161.     MIDL_user_allocate,
  162.     MIDL_user_free,
  163.     0,
  164.     0,
  165.     0,
  166.     0,
  167.     0,
  168.     __MIDL_TypeFormatString.Format,
  169.     0, /* -error bounds_check flag */
  170.     0x10001, /* Ndr library version */
  171.     0,
  172.     0x303006e, /* MIDL Version 3.3.110 */
  173.     0,
  174.     0,
  175.     0,  /* Reserved1 */
  176.     0,  /* Reserved2 */
  177.     0,  /* Reserved3 */
  178.     0,  /* Reserved4 */
  179.     0   /* Reserved5 */
  180.     };
  181. static RPC_DISPATCH_FUNCTION dunion_table[] =
  182.     {
  183.     dunion_UnionParamProc,
  184.     dunion_UnionStructProc,
  185.     dunion_Shutdown,
  186.     0
  187.     };
  188. RPC_DISPATCH_TABLE dunion_DispatchTable = 
  189.     {
  190.     3,
  191.     dunion_table
  192.     };
  193. #if !defined(__RPC_WIN32__)
  194. #error  Invalid build platform for this stub.
  195. #endif
  196. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  197.     {
  198.         0,
  199.         {
  200. 0x4d, /* FC_IN_PARAM */
  201. #ifndef _ALPHA_
  202. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  203. #else
  204. 0x2, /* Alpha Stack size = 2 */
  205. #endif
  206. /*  2 */ NdrFcShort( 0x0 ), /* Type Offset=0 */
  207. /*  4 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
  208. 0x6, /* FC_SHORT */
  209. /*  6 */ 0x5b, /* FC_END */
  210. 0x5c, /* FC_PAD */
  211. /*  8 */
  212. 0x4d, /* FC_IN_PARAM */
  213. #ifndef _ALPHA_
  214. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  215. #else
  216. 0x2, /* Alpha Stack size = 2 */
  217. #endif
  218. /* 10 */ NdrFcShort( 0x24 ), /* Type Offset=36 */
  219. /* 12 */ 0x5b, /* FC_END */
  220. 0x5c, /* FC_PAD */
  221. /* 14 */ 0x5b, /* FC_END */
  222. 0x5c, /* FC_PAD */
  223. 0x0
  224.         }
  225.     };
  226. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  227.     {
  228.         0,
  229.         {
  230. 0x11, 0x0, /* FC_RP */
  231. /*  2 */ NdrFcShort( 0x2 ), /* Offset= 2 (4) */
  232. /*  4 */
  233. 0x2b, /* FC_NON_ENCAPSULATED_UNION */
  234. 0x6, /* FC_SHORT */
  235. /*  6 */ 0x26, /* 38 */
  236. 0x0, /*  */
  237. #ifndef _ALPHA_
  238. /*  8 */ NdrFcShort( 0x4 ), /* x86, MIPS, PPC Stack size/offset = 4 */
  239. #else
  240. NdrFcShort( 0x8 ), /* Alpha Stack size/offset = 8 */
  241. #endif
  242. /* 10 */ NdrFcShort( 0x2 ), /* Offset= 2 (12) */
  243. /* 12 */ NdrFcShort( 0x4 ), /* 4 */
  244. /* 14 */ NdrFcShort( 0x3 ), /* 3 */
  245. /* 16 */ NdrFcLong( 0x0 ), /* 0 */
  246. /* 20 */ NdrFcShort( 0xffff8006 ), /* Offset= -32762 (-32742) */
  247. /* 22 */ NdrFcLong( 0x1 ), /* 1 */
  248. /* 26 */ NdrFcShort( 0xffff800a ), /* Offset= -32758 (-32732) */
  249. /* 28 */ NdrFcLong( 0x2 ), /* 2 */
  250. /* 32 */ NdrFcShort( 0xffff8002 ), /* Offset= -32766 (-32734) */
  251. /* 34 */ NdrFcShort( 0x0 ), /* Offset= 0 (34) */
  252. /* 36 */
  253. 0x11, 0x0, /* FC_RP */
  254. /* 38 */ NdrFcShort( 0xa ), /* Offset= 10 (48) */
  255. /* 40 */
  256. 0x2b, /* FC_NON_ENCAPSULATED_UNION */
  257. 0x6, /* FC_SHORT */
  258. /* 42 */ 0x6, /* 6 */
  259. 0x0, /*  */
  260. /* 44 */ NdrFcShort( 0xfffffffc ), /* -4 */
  261. /* 46 */ NdrFcShort( 0xffffffde ), /* Offset= -34 (12) */
  262. /* 48 */
  263. 0x1a, /* FC_BOGUS_STRUCT */
  264. 0x3, /* 3 */
  265. /* 50 */ NdrFcShort( 0x8 ), /* 8 */
  266. /* 52 */ NdrFcShort( 0x0 ), /* 0 */
  267. /* 54 */ NdrFcShort( 0x0 ), /* Offset= 0 (54) */
  268. /* 56 */ 0x6, /* FC_SHORT */
  269. 0x4c, /* FC_EMBEDDED_COMPLEX */
  270. /* 58 */ 0x2, /* 2 */
  271. NdrFcShort( 0xffffffed ), /* Offset= -19 (40) */
  272. 0x5b, /* FC_END */
  273. 0x0
  274.         }
  275.     };