home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / netds / rpc / data / xmit / xmit_s.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-30  |  7.6 KB  |  274 lines

  1. /* this ALWAYS GENERATED file contains the RPC server stubs */
  2.  
  3.  
  4. /* File created by MIDL compiler version 3.03.0110 */
  5. /* at Mon Mar 30 03:06:10 1998
  6.  */
  7. /* Compiler settings for xmit.idl:
  8.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext, oldnames
  9.     error checks: none
  10. */
  11. //@@MIDL_FILE_HEADING(  )
  12.  
  13. #include <string.h>
  14. #include "xmit.h"
  15.  
  16. #define TYPE_FORMAT_STRING_SIZE   33                                
  17. #define PROC_FORMAT_STRING_SIZE   9                                 
  18.  
  19. typedef struct _MIDL_TYPE_FORMAT_STRING
  20.     {
  21.     short          Pad;
  22.     unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
  23.     } MIDL_TYPE_FORMAT_STRING;
  24.  
  25. typedef struct _MIDL_PROC_FORMAT_STRING
  26.     {
  27.     short          Pad;
  28.     unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
  29.     } MIDL_PROC_FORMAT_STRING;
  30.  
  31. extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
  32. extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
  33.  
  34. /* Standard interface: xmit, ver. 1.0,
  35.    GUID={0x56BF67C0,0x6503,0x1068,{0xBF,0x67,0x00,0xDD,0x01,0x0F,0xBF,0x25}} */
  36.  
  37.  
  38. extern RPC_DISPATCH_TABLE xmit_DispatchTable;
  39.  
  40. static const RPC_SERVER_INTERFACE xmit___RpcServerInterface =
  41.     {
  42.     sizeof(RPC_SERVER_INTERFACE),
  43.     {{0x56BF67C0,0x6503,0x1068,{0xBF,0x67,0x00,0xDD,0x01,0x0F,0xBF,0x25}},{1,0}},
  44.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  45.     &xmit_DispatchTable,
  46.     0,
  47.     0,
  48.     0,
  49.     0,
  50.     0
  51.     };
  52. RPC_IF_HANDLE xmit_ServerIfHandle = (RPC_IF_HANDLE)& xmit___RpcServerInterface;
  53.  
  54. extern const MIDL_STUB_DESC xmit_StubDesc;
  55.  
  56. void __RPC_STUB
  57. xmit_ModifyListProc(
  58.     PRPC_MESSAGE _pRpcMessage )
  59. {
  60.     MIDL_STUB_MESSAGE _StubMsg;
  61.     DOUBLE_LINK_TYPE __RPC_FAR *pHead;
  62.     RPC_STATUS _Status;
  63.     
  64.     ((void)(_Status));
  65.     NdrServerInitializeNew(
  66.                           _pRpcMessage,
  67.                           &_StubMsg,
  68.                           &xmit_StubDesc);
  69.     
  70.     ( DOUBLE_LINK_TYPE __RPC_FAR * )pHead = 0;
  71.     RpcTryFinally
  72.         {
  73.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  74.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  75.         
  76.         NdrXmitOrRepAsUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  77.                                   (unsigned char __RPC_FAR * __RPC_FAR *)&pHead,
  78.                                   (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[22],
  79.                                   (unsigned char)0 );
  80.         
  81.         
  82.         ModifyListProc(pHead);
  83.         
  84.         _StubMsg.BufferLength = 0U;
  85.         NdrXmitOrRepAsBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  86.                                   (unsigned char __RPC_FAR *)pHead,
  87.                                   (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[22] );
  88.         
  89.         _pRpcMessage->BufferLength = _StubMsg.BufferLength;
  90.         
  91.         _Status = I_RpcGetBuffer( _pRpcMessage ); 
  92.         if ( _Status )
  93.             RpcRaiseException( _Status );
  94.         
  95.         _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
  96.         
  97.         NdrXmitOrRepAsMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  98.                                 (unsigned char __RPC_FAR *)pHead,
  99.                                 (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[22] );
  100.         
  101.         }
  102.     RpcFinally
  103.         {
  104.         NdrPointerFree( &_StubMsg,
  105.                         (unsigned char __RPC_FAR *)pHead,
  106.                         &__MIDL_TypeFormatString.Format[0] );
  107.         
  108.         }
  109.     RpcEndFinally
  110.     _pRpcMessage->BufferLength = 
  111.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  112.     
  113. }
  114.  
  115. void __RPC_STUB
  116. xmit_Shutdown(
  117.     PRPC_MESSAGE _pRpcMessage )
  118. {
  119.     MIDL_STUB_MESSAGE _StubMsg;
  120.     RPC_STATUS _Status;
  121.     
  122.     ((void)(_Status));
  123.     NdrServerInitializeNew(
  124.                           _pRpcMessage,
  125.                           &_StubMsg,
  126.                           &xmit_StubDesc);
  127.     
  128.     RpcTryFinally
  129.         {
  130.         
  131.         Shutdown();
  132.         
  133.         }
  134.     RpcFinally
  135.         {
  136.         }
  137.     RpcEndFinally
  138.     _pRpcMessage->BufferLength = 
  139.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  140.     
  141. }
  142.  
  143. extern const XMIT_ROUTINE_QUINTUPLE TransmitAsRoutines[1];
  144.  
  145. static const MIDL_STUB_DESC xmit_StubDesc = 
  146.     {
  147.     (void __RPC_FAR *)& xmit___RpcServerInterface,
  148.     MIDL_user_allocate,
  149.     MIDL_user_free,
  150.     0,
  151.     0,
  152.     0,
  153.     0,
  154.     TransmitAsRoutines,
  155.     __MIDL_TypeFormatString.Format,
  156.     0, /* -error bounds_check flag */
  157.     0x10001, /* Ndr library version */
  158.     0,
  159.     0x303006e, /* MIDL Version 3.3.110 */
  160.     0,
  161.     0,
  162.     0,  /* Reserved1 */
  163.     0,  /* Reserved2 */
  164.     0,  /* Reserved3 */
  165.     0,  /* Reserved4 */
  166.     0   /* Reserved5 */
  167.     };
  168.  
  169. static RPC_DISPATCH_FUNCTION xmit_table[] =
  170.     {
  171.     xmit_ModifyListProc,
  172.     xmit_Shutdown,
  173.     0
  174.     };
  175. RPC_DISPATCH_TABLE xmit_DispatchTable = 
  176.     {
  177.     2,
  178.     xmit_table
  179.     };
  180.  
  181. NDR_SHAREABLE void __RPC_USER
  182. DOUBLE_LINK_TYPE_XmitTranslateToXmit( PMIDL_STUB_MESSAGE pStubMsg )
  183. {
  184.     DOUBLE_LINK_TYPE_to_xmit( (DOUBLE_LINK_TYPE __RPC_FAR *) pStubMsg->pPresentedType, 
  185.         (DOUBLE_XMIT_TYPE __RPC_FAR * __RPC_FAR *) &pStubMsg->pTransmitType );
  186. }
  187. NDR_SHAREABLE void __RPC_USER
  188. DOUBLE_LINK_TYPE_XmitTranslateFromXmit( PMIDL_STUB_MESSAGE pStubMsg )
  189. {
  190.     DOUBLE_LINK_TYPE_from_xmit( (DOUBLE_XMIT_TYPE __RPC_FAR *) pStubMsg->pTransmitType, 
  191.         (DOUBLE_LINK_TYPE __RPC_FAR *) pStubMsg->pPresentedType ); 
  192. }
  193. NDR_SHAREABLE void __RPC_USER
  194. DOUBLE_LINK_TYPE_XmitFreeXmit( PMIDL_STUB_MESSAGE pStubMsg )
  195. {
  196.     DOUBLE_LINK_TYPE_free_xmit( (DOUBLE_XMIT_TYPE __RPC_FAR *) pStubMsg->pTransmitType );
  197. }
  198. NDR_SHAREABLE void __RPC_USER
  199. DOUBLE_LINK_TYPE_XmitFreeInst( PMIDL_STUB_MESSAGE pStubMsg )
  200. {
  201.     DOUBLE_LINK_TYPE_free_inst( (DOUBLE_LINK_TYPE __RPC_FAR *) pStubMsg->pPresentedType ); 
  202. }
  203.  
  204. static const XMIT_ROUTINE_QUINTUPLE TransmitAsRoutines[1] = 
  205.         {
  206.             
  207.             {
  208.             DOUBLE_LINK_TYPE_XmitTranslateToXmit
  209.             ,DOUBLE_LINK_TYPE_XmitTranslateFromXmit
  210.             ,DOUBLE_LINK_TYPE_XmitFreeXmit
  211.             ,DOUBLE_LINK_TYPE_XmitFreeInst
  212.             }
  213.  
  214.         };
  215.  
  216.  
  217. #if !defined(__RPC_WIN32__)
  218. #error  Invalid build platform for this stub.
  219. #endif
  220.  
  221. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  222.     {
  223.         0,
  224.         {
  225.             
  226.             0x50,        /* FC_IN_OUT_PARAM */
  227. #ifndef _ALPHA_
  228.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  229. #else
  230.             0x2,        /* Alpha Stack size = 2 */
  231. #endif
  232. /*  2 */    NdrFcShort( 0x0 ),    /* Type Offset=0 */
  233. /*  4 */    0x5b,        /* FC_END */
  234.             0x5c,        /* FC_PAD */
  235. /*  6 */    0x5b,        /* FC_END */
  236.             0x5c,        /* FC_PAD */
  237.  
  238.             0x0
  239.         }
  240.     };
  241.  
  242. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  243.     {
  244.         0,
  245.         {
  246.             0x11, 0x0,    /* FC_RP */
  247. /*  2 */    NdrFcShort( 0x14 ),    /* Offset= 20 (22) */
  248. /*  4 */    
  249.             0x1b,        /* FC_CARRAY */
  250.             0x1,        /* 1 */
  251. /*  6 */    NdrFcShort( 0x2 ),    /* 2 */
  252. /*  8 */    0x6,        /* 6 */
  253.             0x0,        /*  */
  254. /* 10 */    NdrFcShort( 0xfffffffe ),    /* -2 */
  255. /* 12 */    0x6,        /* FC_SHORT */
  256.             0x5b,        /* FC_END */
  257. /* 14 */    
  258.             0x17,        /* FC_CSTRUCT */
  259.             0x1,        /* 1 */
  260. /* 16 */    NdrFcShort( 0x2 ),    /* 2 */
  261. /* 18 */    NdrFcShort( 0xfffffff2 ),    /* Offset= -14 (4) */
  262. /* 20 */    0x6,        /* FC_SHORT */
  263.             0x5b,        /* FC_END */
  264. /* 22 */    0x2d,        /* FC_TRANSMIT_AS */
  265.             0x21,        /* 33 */
  266. /* 24 */    NdrFcShort( 0x0 ),    /* 0 */
  267. /* 26 */    NdrFcShort( 0xc ),    /* 12 */
  268. /* 28 */    NdrFcShort( 0x0 ),    /* 0 */
  269. /* 30 */    NdrFcShort( 0xfffffff0 ),    /* Offset= -16 (14) */
  270.  
  271.             0x0
  272.         }
  273.     };
  274.