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 / yield / yield_s.c < prev    next >
C/C++ Source or Header  |  1998-03-30  |  4KB  |  182 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:09:40 1998
  6.  */
  7. /* Compiler settings for yield.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 "yield.h"
  15.  
  16. #define TYPE_FORMAT_STRING_SIZE   1                                 
  17. #define PROC_FORMAT_STRING_SIZE   7                                 
  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: yield, ver. 1.0,
  35.    GUID={0x87A118A0,0x11DB,0x1068,{0x94,0xB2,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
  36.  
  37.  
  38. extern RPC_DISPATCH_TABLE yield_DispatchTable;
  39.  
  40. static const RPC_SERVER_INTERFACE yield___RpcServerInterface =
  41.     {
  42.     sizeof(RPC_SERVER_INTERFACE),
  43.     {{0x87A118A0,0x11DB,0x1068,{0x94,0xB2,0x00,0xDD,0x01,0x06,0x62,0xDA}},{1,0}},
  44.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  45.     &yield_DispatchTable,
  46.     0,
  47.     0,
  48.     0,
  49.     0,
  50.     0
  51.     };
  52. RPC_IF_HANDLE yield_ServerIfHandle = (RPC_IF_HANDLE)& yield___RpcServerInterface;
  53.  
  54. extern const MIDL_STUB_DESC yield_StubDesc;
  55.  
  56. void __RPC_STUB
  57. yield_YieldProc(
  58.     PRPC_MESSAGE _pRpcMessage )
  59. {
  60.     MIDL_STUB_MESSAGE _StubMsg;
  61.     short cSeconds;
  62.     RPC_STATUS _Status;
  63.     
  64.     ((void)(_Status));
  65.     NdrServerInitializeNew(
  66.                           _pRpcMessage,
  67.                           &_StubMsg,
  68.                           &yield_StubDesc);
  69.     
  70.     RpcTryFinally
  71.         {
  72.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  73.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  74.         
  75.         cSeconds = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  76.         
  77.         
  78.         YieldProc(cSeconds);
  79.         
  80.         }
  81.     RpcFinally
  82.         {
  83.         }
  84.     RpcEndFinally
  85.     _pRpcMessage->BufferLength = 
  86.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  87.     
  88. }
  89.  
  90. void __RPC_STUB
  91. yield_Shutdown(
  92.     PRPC_MESSAGE _pRpcMessage )
  93. {
  94.     MIDL_STUB_MESSAGE _StubMsg;
  95.     RPC_STATUS _Status;
  96.     
  97.     ((void)(_Status));
  98.     NdrServerInitializeNew(
  99.                           _pRpcMessage,
  100.                           &_StubMsg,
  101.                           &yield_StubDesc);
  102.     
  103.     RpcTryFinally
  104.         {
  105.         
  106.         Shutdown();
  107.         
  108.         }
  109.     RpcFinally
  110.         {
  111.         }
  112.     RpcEndFinally
  113.     _pRpcMessage->BufferLength = 
  114.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  115.     
  116. }
  117.  
  118.  
  119. static const MIDL_STUB_DESC yield_StubDesc = 
  120.     {
  121.     (void __RPC_FAR *)& yield___RpcServerInterface,
  122.     MIDL_user_allocate,
  123.     MIDL_user_free,
  124.     0,
  125.     0,
  126.     0,
  127.     0,
  128.     0,
  129.     __MIDL_TypeFormatString.Format,
  130.     0, /* -error bounds_check flag */
  131.     0x10001, /* Ndr library version */
  132.     0,
  133.     0x303006e, /* MIDL Version 3.3.110 */
  134.     0,
  135.     0,
  136.     0,  /* Reserved1 */
  137.     0,  /* Reserved2 */
  138.     0,  /* Reserved3 */
  139.     0,  /* Reserved4 */
  140.     0   /* Reserved5 */
  141.     };
  142.  
  143. static RPC_DISPATCH_FUNCTION yield_table[] =
  144.     {
  145.     yield_YieldProc,
  146.     yield_Shutdown,
  147.     0
  148.     };
  149. RPC_DISPATCH_TABLE yield_DispatchTable = 
  150.     {
  151.     2,
  152.     yield_table
  153.     };
  154.  
  155. #if !defined(__RPC_WIN32__)
  156. #error  Invalid build platform for this stub.
  157. #endif
  158.  
  159. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  160.     {
  161.         0,
  162.         {
  163.             0x4e,        /* FC_IN_PARAM_BASETYPE */
  164.             0x6,        /* FC_SHORT */
  165. /*  2 */    0x5b,        /* FC_END */
  166.             0x5c,        /* FC_PAD */
  167. /*  4 */    0x5b,        /* FC_END */
  168.             0x5c,        /* FC_PAD */
  169.  
  170.             0x0
  171.         }
  172.     };
  173.  
  174. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  175.     {
  176.         0,
  177.         {
  178.  
  179.             0x0
  180.         }
  181.     };
  182.