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 / handles / auto / auto_s.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-30  |  4.6 KB  |  200 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:07:10 1998
  6.  */
  7. /* Compiler settings for auto.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 "auto.h"
  15.  
  16. #define TYPE_FORMAT_STRING_SIZE   5                                 
  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: autoh, ver. 1.0,
  35.    GUID={0x6B29FC40,0xCA47,0x1067,{0xB3,0x1D,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
  36.  
  37.  
  38. extern RPC_DISPATCH_TABLE autoh_DispatchTable;
  39.  
  40. static const RPC_SERVER_INTERFACE autoh___RpcServerInterface =
  41.     {
  42.     sizeof(RPC_SERVER_INTERFACE),
  43.     {{0x6B29FC40,0xCA47,0x1067,{0xB3,0x1D,0x00,0xDD,0x01,0x06,0x62,0xDA}},{1,0}},
  44.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  45.     &autoh_DispatchTable,
  46.     0,
  47.     0,
  48.     0,
  49.     0,
  50.     0
  51.     };
  52. RPC_IF_HANDLE autoh_ServerIfHandle = (RPC_IF_HANDLE)& autoh___RpcServerInterface;
  53.  
  54. extern const MIDL_STUB_DESC autoh_StubDesc;
  55.  
  56. void __RPC_STUB
  57. autoh_GetTime(
  58.     PRPC_MESSAGE _pRpcMessage )
  59. {
  60.     long _M0;
  61.     MIDL_STUB_MESSAGE _StubMsg;
  62.     long __RPC_FAR *time;
  63.     RPC_STATUS _Status;
  64.     
  65.     ((void)(_Status));
  66.     NdrServerInitializeNew(
  67.                           _pRpcMessage,
  68.                           &_StubMsg,
  69.                           &autoh_StubDesc);
  70.     
  71.     ( long __RPC_FAR * )time = 0;
  72.     RpcTryFinally
  73.         {
  74.         time = &_M0;
  75.         
  76.         GetTime(time);
  77.         
  78.         _StubMsg.BufferLength = 4U;
  79.         _pRpcMessage->BufferLength = _StubMsg.BufferLength;
  80.         
  81.         _Status = I_RpcGetBuffer( _pRpcMessage ); 
  82.         if ( _Status )
  83.             RpcRaiseException( _Status );
  84.         
  85.         _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
  86.         
  87.         *(( long __RPC_FAR * )_StubMsg.Buffer)++ = *time;
  88.         
  89.         }
  90.     RpcFinally
  91.         {
  92.         }
  93.     RpcEndFinally
  94.     _pRpcMessage->BufferLength = 
  95.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  96.     
  97. }
  98.  
  99. void __RPC_STUB
  100. autoh_Shutdown(
  101.     PRPC_MESSAGE _pRpcMessage )
  102. {
  103.     MIDL_STUB_MESSAGE _StubMsg;
  104.     RPC_STATUS _Status;
  105.     
  106.     ((void)(_Status));
  107.     NdrServerInitializeNew(
  108.                           _pRpcMessage,
  109.                           &_StubMsg,
  110.                           &autoh_StubDesc);
  111.     
  112.     RpcTryFinally
  113.         {
  114.         
  115.         Shutdown();
  116.         
  117.         }
  118.     RpcFinally
  119.         {
  120.         }
  121.     RpcEndFinally
  122.     _pRpcMessage->BufferLength = 
  123.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  124.     
  125. }
  126.  
  127.  
  128. static const MIDL_STUB_DESC autoh_StubDesc = 
  129.     {
  130.     (void __RPC_FAR *)& autoh___RpcServerInterface,
  131.     MIDL_user_allocate,
  132.     MIDL_user_free,
  133.     0,
  134.     0,
  135.     0,
  136.     0,
  137.     0,
  138.     __MIDL_TypeFormatString.Format,
  139.     0, /* -error bounds_check flag */
  140.     0x10001, /* Ndr library version */
  141.     0,
  142.     0x303006e, /* MIDL Version 3.3.110 */
  143.     0,
  144.     0,
  145.     0,  /* Reserved1 */
  146.     0,  /* Reserved2 */
  147.     0,  /* Reserved3 */
  148.     0,  /* Reserved4 */
  149.     0   /* Reserved5 */
  150.     };
  151.  
  152. static RPC_DISPATCH_FUNCTION autoh_table[] =
  153.     {
  154.     autoh_GetTime,
  155.     autoh_Shutdown,
  156.     0
  157.     };
  158. RPC_DISPATCH_TABLE autoh_DispatchTable = 
  159.     {
  160.     2,
  161.     autoh_table
  162.     };
  163.  
  164. #if !defined(__RPC_WIN32__)
  165. #error  Invalid build platform for this stub.
  166. #endif
  167.  
  168. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  169.     {
  170.         0,
  171.         {
  172.             
  173.             0x51,        /* FC_OUT_PARAM */
  174. #ifndef _ALPHA_
  175.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  176. #else
  177.             0x2,        /* Alpha Stack size = 2 */
  178. #endif
  179. /*  2 */    NdrFcShort( 0x0 ),    /* Type Offset=0 */
  180. /*  4 */    0x5b,        /* FC_END */
  181.             0x5c,        /* FC_PAD */
  182. /*  6 */    0x5b,        /* FC_END */
  183.             0x5c,        /* FC_PAD */
  184.  
  185.             0x0
  186.         }
  187.     };
  188.  
  189. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  190.     {
  191.         0,
  192.         {
  193.             0x11, 0xc,    /* FC_RP [alloced_on_stack] [simple_pointer] */
  194. /*  2 */    0x8,        /* FC_LONG */
  195.             0x5c,        /* FC_PAD */
  196.  
  197.             0x0
  198.         }
  199.     };
  200.