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 / cluuid / cluuid_s.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-30  |  5.0 KB  |  204 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:05:23 1998
  6.  */
  7. /* Compiler settings for cluuid.idl:
  8.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext, oldnames
  9.     error checks: none, use_epv
  10. */
  11. //@@MIDL_FILE_HEADING(  )
  12.  
  13. #include <string.h>
  14. #include "cluuid.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: cluuid, ver. 1.0,
  35.    GUID={0x4AF72C40,0x4DAA,0x1068,{0xA9,0xAD,0x08,0x00,0x2B,0x2E,0xB2,0x3C}} */
  36.  
  37.  
  38. extern RPC_DISPATCH_TABLE cluuid_DispatchTable;
  39.  
  40. extern cluuid_SERVER_EPV DEFAULT_EPV;
  41.  
  42. static const RPC_SERVER_INTERFACE cluuid___RpcServerInterface =
  43.     {
  44.     sizeof(RPC_SERVER_INTERFACE),
  45.     {{0x4AF72C40,0x4DAA,0x1068,{0xA9,0xAD,0x08,0x00,0x2B,0x2E,0xB2,0x3C}},{1,0}},
  46.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  47.     &cluuid_DispatchTable,
  48.     0,
  49.     0,
  50.     &DEFAULT_EPV,
  51.     0,
  52.     0
  53.     };
  54. RPC_IF_HANDLE cluuid_ServerIfHandle = (RPC_IF_HANDLE)& cluuid___RpcServerInterface;
  55.  
  56. extern const MIDL_STUB_DESC cluuid_StubDesc;
  57.  
  58. void __RPC_STUB
  59. cluuid_HelloProc(
  60.     PRPC_MESSAGE _pRpcMessage )
  61. {
  62.     MIDL_STUB_MESSAGE _StubMsg;
  63.     unsigned char __RPC_FAR *pszString;
  64.     RPC_STATUS _Status;
  65.     
  66.     ((void)(_Status));
  67.     NdrServerInitializeNew(
  68.                           _pRpcMessage,
  69.                           &_StubMsg,
  70.                           &cluuid_StubDesc);
  71.     
  72.     ( unsigned char __RPC_FAR * )pszString = 0;
  73.     RpcTryFinally
  74.         {
  75.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  76.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  77.         
  78.         NdrConformantStringUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  79.                                        (unsigned char __RPC_FAR * __RPC_FAR *)&pszString,
  80.                                        (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[2],
  81.                                        (unsigned char)0 );
  82.         
  83.         
  84.         ((cluuid_SERVER_EPV *)(_pRpcMessage->ManagerEpv)) -> HelloProc(pszString);
  85.         
  86.         }
  87.     RpcFinally
  88.         {
  89.         }
  90.     RpcEndFinally
  91.     _pRpcMessage->BufferLength = 
  92.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  93.     
  94. }
  95.  
  96. void __RPC_STUB
  97. cluuid_Shutdown(
  98.     PRPC_MESSAGE _pRpcMessage )
  99. {
  100.     MIDL_STUB_MESSAGE _StubMsg;
  101.     RPC_STATUS _Status;
  102.     
  103.     ((void)(_Status));
  104.     NdrServerInitializeNew(
  105.                           _pRpcMessage,
  106.                           &_StubMsg,
  107.                           &cluuid_StubDesc);
  108.     
  109.     RpcTryFinally
  110.         {
  111.         
  112.         ((cluuid_SERVER_EPV *)(_pRpcMessage->ManagerEpv)) -> Shutdown();
  113.         
  114.         }
  115.     RpcFinally
  116.         {
  117.         }
  118.     RpcEndFinally
  119.     _pRpcMessage->BufferLength = 
  120.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  121.     
  122. }
  123.  
  124.  
  125. static const MIDL_STUB_DESC cluuid_StubDesc = 
  126.     {
  127.     (void __RPC_FAR *)& cluuid___RpcServerInterface,
  128.     MIDL_user_allocate,
  129.     MIDL_user_free,
  130.     0,
  131.     0,
  132.     0,
  133.     0,
  134.     0,
  135.     __MIDL_TypeFormatString.Format,
  136.     0, /* -error bounds_check flag */
  137.     0x10001, /* Ndr library version */
  138.     0,
  139.     0x303006e, /* MIDL Version 3.3.110 */
  140.     0,
  141.     0,
  142.     0,  /* Reserved1 */
  143.     0,  /* Reserved2 */
  144.     0,  /* Reserved3 */
  145.     0,  /* Reserved4 */
  146.     0   /* Reserved5 */
  147.     };
  148.  
  149. static RPC_DISPATCH_FUNCTION cluuid_table[] =
  150.     {
  151.     cluuid_HelloProc,
  152.     cluuid_Shutdown,
  153.     0
  154.     };
  155. RPC_DISPATCH_TABLE cluuid_DispatchTable = 
  156.     {
  157.     2,
  158.     cluuid_table
  159.     };
  160.  
  161. static cluuid_SERVER_EPV DEFAULT_EPV = 
  162.     {
  163.     HelloProc,
  164.     Shutdown
  165. };
  166.  
  167. #if !defined(__RPC_WIN32__)
  168. #error  Invalid build platform for this stub.
  169. #endif
  170.  
  171. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  172.     {
  173.         0,
  174.         {
  175.             
  176.             0x4d,        /* FC_IN_PARAM */
  177. #ifndef _ALPHA_
  178.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  179. #else
  180.             0x2,        /* Alpha Stack size = 2 */
  181. #endif
  182. /*  2 */    NdrFcShort( 0x0 ),    /* Type Offset=0 */
  183. /*  4 */    0x5b,        /* FC_END */
  184.             0x5c,        /* FC_PAD */
  185. /*  6 */    0x5b,        /* FC_END */
  186.             0x5c,        /* FC_PAD */
  187.  
  188.             0x0
  189.         }
  190.     };
  191.  
  192. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  193.     {
  194.         0,
  195.         {
  196.             0x11, 0x8,    /* FC_RP [simple_pointer] */
  197. /*  2 */    
  198.             0x22,        /* FC_C_CSTRING */
  199.             0x5c,        /* FC_PAD */
  200.  
  201.             0x0
  202.         }
  203.     };
  204.