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_c.c next >
Encoding:
C/C++ Source or Header  |  1998-03-30  |  4.9 KB  |  195 lines

  1. /* this ALWAYS GENERATED file contains the RPC client 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. #if defined( _ALPHA_ )
  15. #include <stdarg.h>
  16. #endif
  17.  
  18. #include "auto.h"
  19.  
  20. #define TYPE_FORMAT_STRING_SIZE   5                                 
  21. #define PROC_FORMAT_STRING_SIZE   9                                 
  22.  
  23. typedef struct _MIDL_TYPE_FORMAT_STRING
  24.     {
  25.     short          Pad;
  26.     unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
  27.     } MIDL_TYPE_FORMAT_STRING;
  28.  
  29. typedef struct _MIDL_PROC_FORMAT_STRING
  30.     {
  31.     short          Pad;
  32.     unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
  33.     } MIDL_PROC_FORMAT_STRING;
  34.  
  35.  
  36. extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
  37. extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
  38.  
  39. /* Standard interface: autoh, ver. 1.0,
  40.    GUID={0x6B29FC40,0xCA47,0x1067,{0xB3,0x1D,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
  41.  
  42.  
  43.  
  44. static const RPC_CLIENT_INTERFACE autoh___RpcClientInterface =
  45.     {
  46.     sizeof(RPC_CLIENT_INTERFACE),
  47.     {{0x6B29FC40,0xCA47,0x1067,{0xB3,0x1D,0x00,0xDD,0x01,0x06,0x62,0xDA}},{1,0}},
  48.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  49.     0,
  50.     0,
  51.     0,
  52.     0,
  53.     0,
  54.     0
  55.     };
  56. RPC_IF_HANDLE autoh_ClientIfHandle = (RPC_IF_HANDLE)& autoh___RpcClientInterface;
  57.  
  58. extern const MIDL_STUB_DESC autoh_StubDesc;
  59.  
  60. static RPC_BINDING_HANDLE autoh__MIDL_AutoBindHandle;
  61.  
  62.  
  63. void GetTime( 
  64.     /* [out] */ long __RPC_FAR *time)
  65. {
  66.  
  67.     RPC_MESSAGE _RpcMessage;
  68.     
  69.     MIDL_STUB_MESSAGE _StubMsg;
  70.     
  71.     RpcTryFinally
  72.         {
  73.         NdrClientInitializeNew(
  74.                           ( PRPC_MESSAGE  )&_RpcMessage,
  75.                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  76.                           ( PMIDL_STUB_DESC  )&autoh_StubDesc,
  77.                           0);
  78.         
  79.         
  80.         
  81.         _StubMsg.BufferLength = 0U;
  82.         NdrNsGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, autoh__MIDL_AutoBindHandle );
  83.         
  84.         NdrNsSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer, (RPC_BINDING_HANDLE __RPC_FAR *) &autoh__MIDL_AutoBindHandle );
  85.         
  86.         if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  87.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  88.         
  89.         *time = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
  90.         
  91.         }
  92.     RpcFinally
  93.         {
  94.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  95.         
  96.         }
  97.     RpcEndFinally
  98.     
  99. }
  100.  
  101.  
  102. void Shutdown( void)
  103. {
  104.  
  105.     RPC_MESSAGE _RpcMessage;
  106.     
  107.     MIDL_STUB_MESSAGE _StubMsg;
  108.     
  109.     RpcTryFinally
  110.         {
  111.         NdrClientInitializeNew(
  112.                           ( PRPC_MESSAGE  )&_RpcMessage,
  113.                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  114.                           ( PMIDL_STUB_DESC  )&autoh_StubDesc,
  115.                           1);
  116.         
  117.         
  118.         
  119.         _StubMsg.BufferLength = 0U;
  120.         NdrNsGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, autoh__MIDL_AutoBindHandle );
  121.         
  122.         NdrNsSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer, (RPC_BINDING_HANDLE __RPC_FAR *) &autoh__MIDL_AutoBindHandle );
  123.         
  124.         }
  125.     RpcFinally
  126.         {
  127.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  128.         
  129.         }
  130.     RpcEndFinally
  131.     
  132. }
  133.  
  134.  
  135. static const MIDL_STUB_DESC autoh_StubDesc = 
  136.     {
  137.     (void __RPC_FAR *)& autoh___RpcClientInterface,
  138.     MIDL_user_allocate,
  139.     MIDL_user_free,
  140.     &autoh__MIDL_AutoBindHandle,
  141.     0,
  142.     0,
  143.     0,
  144.     0,
  145.     __MIDL_TypeFormatString.Format,
  146.     0, /* -error bounds_check flag */
  147.     0x10001, /* Ndr library version */
  148.     0,
  149.     0x303006e, /* MIDL Version 3.3.110 */
  150.     0,
  151.     0,
  152.     0,  /* Reserved1 */
  153.     0,  /* Reserved2 */
  154.     0,  /* Reserved3 */
  155.     0,  /* Reserved4 */
  156.     0   /* Reserved5 */
  157.     };
  158.  
  159. #if !defined(__RPC_WIN32__)
  160. #error  Invalid build platform for this stub.
  161. #endif
  162.  
  163. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  164.     {
  165.         0,
  166.         {
  167.             
  168.             0x51,        /* FC_OUT_PARAM */
  169. #ifndef _ALPHA_
  170.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  171. #else
  172.             0x2,        /* Alpha Stack size = 2 */
  173. #endif
  174. /*  2 */    NdrFcShort( 0x0 ),    /* Type Offset=0 */
  175. /*  4 */    0x5b,        /* FC_END */
  176.             0x5c,        /* FC_PAD */
  177. /*  6 */    0x5b,        /* FC_END */
  178.             0x5c,        /* FC_PAD */
  179.  
  180.             0x0
  181.         }
  182.     };
  183.  
  184. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  185.     {
  186.         0,
  187.         {
  188.             0x11, 0xc,    /* FC_RP [alloced_on_stack] [simple_pointer] */
  189. /*  2 */    0x8,        /* FC_LONG */
  190.             0x5c,        /* FC_PAD */
  191.  
  192.             0x0
  193.         }
  194.     };
  195.