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 / whello / whello_s.c < prev    next >
C/C++ Source or Header  |  1998-03-30  |  5KB  |  196 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:33 1998
  6.  */
  7. /* Compiler settings for whello.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 "whello.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: whello, ver. 1.0,
  35.    GUID={0x2F5F6520,0xCA46,0x1067,{0xB3,0x19,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
  36.  
  37.  
  38. extern RPC_DISPATCH_TABLE whello_DispatchTable;
  39.  
  40. static const RPC_SERVER_INTERFACE whello___RpcServerInterface =
  41.     {
  42.     sizeof(RPC_SERVER_INTERFACE),
  43.     {{0x2F5F6520,0xCA46,0x1067,{0xB3,0x19,0x00,0xDD,0x01,0x06,0x62,0xDA}},{1,0}},
  44.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  45.     &whello_DispatchTable,
  46.     0,
  47.     0,
  48.     0,
  49.     0,
  50.     0
  51.     };
  52. RPC_IF_HANDLE whello_ServerIfHandle = (RPC_IF_HANDLE)& whello___RpcServerInterface;
  53.  
  54. extern const MIDL_STUB_DESC whello_StubDesc;
  55.  
  56. void __RPC_STUB
  57. whello_HelloProc(
  58.     PRPC_MESSAGE _pRpcMessage )
  59. {
  60.     MIDL_STUB_MESSAGE _StubMsg;
  61.     unsigned char __RPC_FAR *pszString;
  62.     RPC_STATUS _Status;
  63.     
  64.     ((void)(_Status));
  65.     NdrServerInitializeNew(
  66.                           _pRpcMessage,
  67.                           &_StubMsg,
  68.                           &whello_StubDesc);
  69.     
  70.     ( unsigned char __RPC_FAR * )pszString = 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.         NdrConformantStringUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  77.                                        (unsigned char __RPC_FAR * __RPC_FAR *)&pszString,
  78.                                        (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[2],
  79.                                        (unsigned char)0 );
  80.         
  81.         
  82.         HelloProc(pszString);
  83.         
  84.         }
  85.     RpcFinally
  86.         {
  87.         }
  88.     RpcEndFinally
  89.     _pRpcMessage->BufferLength = 
  90.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  91.     
  92. }
  93.  
  94. void __RPC_STUB
  95. whello_Shutdown(
  96.     PRPC_MESSAGE _pRpcMessage )
  97. {
  98.     MIDL_STUB_MESSAGE _StubMsg;
  99.     RPC_STATUS _Status;
  100.     
  101.     ((void)(_Status));
  102.     NdrServerInitializeNew(
  103.                           _pRpcMessage,
  104.                           &_StubMsg,
  105.                           &whello_StubDesc);
  106.     
  107.     RpcTryFinally
  108.         {
  109.         
  110.         Shutdown();
  111.         
  112.         }
  113.     RpcFinally
  114.         {
  115.         }
  116.     RpcEndFinally
  117.     _pRpcMessage->BufferLength = 
  118.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  119.     
  120. }
  121.  
  122.  
  123. static const MIDL_STUB_DESC whello_StubDesc = 
  124.     {
  125.     (void __RPC_FAR *)& whello___RpcServerInterface,
  126.     MIDL_user_allocate,
  127.     MIDL_user_free,
  128.     0,
  129.     0,
  130.     0,
  131.     0,
  132.     0,
  133.     __MIDL_TypeFormatString.Format,
  134.     0, /* -error bounds_check flag */
  135.     0x10001, /* Ndr library version */
  136.     0,
  137.     0x303006e, /* MIDL Version 3.3.110 */
  138.     0,
  139.     0,
  140.     0,  /* Reserved1 */
  141.     0,  /* Reserved2 */
  142.     0,  /* Reserved3 */
  143.     0,  /* Reserved4 */
  144.     0   /* Reserved5 */
  145.     };
  146.  
  147. static RPC_DISPATCH_FUNCTION whello_table[] =
  148.     {
  149.     whello_HelloProc,
  150.     whello_Shutdown,
  151.     0
  152.     };
  153. RPC_DISPATCH_TABLE whello_DispatchTable = 
  154.     {
  155.     2,
  156.     whello_table
  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.             0x4d,        /* FC_IN_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, 0x8,    /* FC_RP [simple_pointer] */
  189. /*  2 */    
  190.             0x22,        /* FC_C_CSTRING */
  191.             0x5c,        /* FC_PAD */
  192.  
  193.             0x0
  194.         }
  195.     };
  196.