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 / pipes / pipe_s.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-30  |  5.5 KB  |  223 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:08:39 1998
  6.  */
  7. /* Compiler settings for pipe.idl:
  8.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
  9.     error checks: none
  10. */
  11. //@@MIDL_FILE_HEADING(  )
  12.  
  13. #include <string.h>
  14. #include "pipe.h"
  15.  
  16. #define TYPE_FORMAT_STRING_SIZE   15                                
  17. #define PROC_FORMAT_STRING_SIZE   27                                
  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: pipe_sample, ver. 1.0,
  35.    GUID={0x60ceb4a0,0xc2f1,0x11cf,{0x95,0x56,0x00,0xaa,0x00,0x37,0x4e,0x69}} */
  36.  
  37.  
  38. extern const MIDL_SERVER_INFO pipe_sample_ServerInfo;
  39.  
  40. extern RPC_DISPATCH_TABLE pipe_sample_v1_0_DispatchTable;
  41.  
  42. static const RPC_SERVER_INTERFACE pipe_sample___RpcServerInterface =
  43.     {
  44.     sizeof(RPC_SERVER_INTERFACE),
  45.     {{0x60ceb4a0,0xc2f1,0x11cf,{0x95,0x56,0x00,0xaa,0x00,0x37,0x4e,0x69}},{1,0}},
  46.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  47.     &pipe_sample_v1_0_DispatchTable,
  48.     0,
  49.     0,
  50.     0,
  51.     &pipe_sample_ServerInfo,
  52.     RPC_INTERFACE_HAS_PIPES
  53.     };
  54. RPC_IF_HANDLE pipe_sample_v1_0_s_ifspec = (RPC_IF_HANDLE)& pipe_sample___RpcServerInterface;
  55.  
  56. extern const MIDL_STUB_DESC pipe_sample_StubDesc;
  57.  
  58. void __RPC_STUB
  59. pipe_sample_ShutDown(
  60.     PRPC_MESSAGE _pRpcMessage )
  61. {
  62.     MIDL_STUB_MESSAGE _StubMsg;
  63.     RPC_STATUS _Status;
  64.     
  65.     ((void)(_Status));
  66.     NdrServerInitializeNew(
  67.                           _pRpcMessage,
  68.                           &_StubMsg,
  69.                           &pipe_sample_StubDesc);
  70.     
  71.     RpcTryFinally
  72.         {
  73.         
  74.         ShutDown();
  75.         
  76.         }
  77.     RpcFinally
  78.         {
  79.         }
  80.     RpcEndFinally
  81.     _pRpcMessage->BufferLength = 
  82.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  83.     
  84. }
  85.  
  86.  
  87. static const MIDL_STUB_DESC pipe_sample_StubDesc = 
  88.     {
  89.     (void __RPC_FAR *)& pipe_sample___RpcServerInterface,
  90.     MIDL_user_allocate,
  91.     MIDL_user_free,
  92.     0,
  93.     0,
  94.     0,
  95.     0,
  96.     0,
  97.     __MIDL_TypeFormatString.Format,
  98.     0, /* -error bounds_check flag */
  99.     0x20000, /* Ndr library version */
  100.     0,
  101.     0x303006e, /* MIDL Version 3.3.110 */
  102.     0,
  103.     0,
  104.     0,  /* Reserved1 */
  105.     0,  /* Reserved2 */
  106.     0,  /* Reserved3 */
  107.     0,  /* Reserved4 */
  108.     0   /* Reserved5 */
  109.     };
  110.  
  111. static RPC_DISPATCH_FUNCTION pipe_sample_table[] =
  112.     {
  113.     NdrServerCall2,
  114.     pipe_sample_ShutDown,
  115.     0
  116.     };
  117. RPC_DISPATCH_TABLE pipe_sample_v1_0_DispatchTable = 
  118.     {
  119.     2,
  120.     pipe_sample_table
  121.     };
  122.  
  123. static const SERVER_ROUTINE pipe_sample_ServerRoutineTable[] = 
  124.     {
  125.     (SERVER_ROUTINE)ScrambleFile,
  126.     (SERVER_ROUTINE)ShutDown
  127.     };
  128.  
  129. static const unsigned short pipe_sample_FormatStringOffsetTable[] = 
  130.     {
  131.     0,
  132.     24
  133.     };
  134.  
  135. static const MIDL_SERVER_INFO pipe_sample_ServerInfo = 
  136.     {
  137.     &pipe_sample_StubDesc,
  138.     pipe_sample_ServerRoutineTable,
  139.     __MIDL_ProcFormatString.Format,
  140.     pipe_sample_FormatStringOffsetTable,
  141.     0,
  142.     0,
  143.     0,
  144.     0
  145.     };
  146.  
  147. #if !defined(__RPC_WIN32__)
  148. #error  Invalid build platform for this stub.
  149. #endif
  150.  
  151. #if !(TARGET_IS_NT40_OR_LATER)
  152. #error You need a Windows NT 4.0 or later to run this stub because it uses these features:
  153. #error   -Oif or -Oicf, idl pipes.
  154. #error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
  155. #error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
  156. #endif
  157.  
  158.  
  159. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  160.     {
  161.         0,
  162.         {
  163.  
  164.     /* Procedure ScrambleFile */
  165.  
  166.             0x32,        /* FC_BIND_PRIMITIVE */
  167.             0x40,        /* 64 */
  168. /*  2 */    NdrFcShort( 0x0 ),    /* 0 */
  169. #ifndef _ALPHA_
  170. /*  4 */    NdrFcShort( 0x8 ),    /* x86, MIPS, PPC Stack size/offset = 8 */
  171. #else
  172.             NdrFcShort( 0x10 ),    /* Alpha Stack size/offset = 16 */
  173. #endif
  174. /*  6 */    NdrFcShort( 0x8 ),    /* 8 */
  175. /*  8 */    NdrFcShort( 0x0 ),    /* 0 */
  176. /* 10 */    0x8,        /* 8 */
  177.             0x2,        /* 2 */
  178.  
  179.     /* Parameter Action */
  180.  
  181. /* 12 */    NdrFcShort( 0x48 ),    /* 72 */
  182. #ifndef _ALPHA_
  183. /* 14 */    NdrFcShort( 0x0 ),    /* x86, MIPS, PPC Stack size/offset = 0 */
  184. #else
  185.             NdrFcShort( 0x0 ),    /* Alpha Stack size/offset = 0 */
  186. #endif
  187. /* 16 */    0x8,        /* FC_LONG */
  188.             0x0,        /* 0 */
  189.  
  190.     /* Parameter pipe_data */
  191.  
  192. /* 18 */    NdrFcShort( 0x11c ),    /* 284 */
  193. #ifndef _ALPHA_
  194. /* 20 */    NdrFcShort( 0x4 ),    /* x86, MIPS, PPC Stack size/offset = 4 */
  195. #else
  196.             NdrFcShort( 0x8 ),    /* Alpha Stack size/offset = 8 */
  197. #endif
  198. /* 22 */    NdrFcShort( 0x6 ),    /* Type Offset=6 */
  199. /* 24 */    0x5b,        /* FC_END */
  200.             0x5c,        /* FC_PAD */
  201.  
  202.             0x0
  203.         }
  204.     };
  205.  
  206. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  207.     {
  208.         0,
  209.         {
  210.             0x11, 0x0,    /* FC_RP */
  211. /*  2 */    NdrFcShort( 0x4 ),    /* Offset= 4 (6) */
  212. /*  4 */    0x2,        /* FC_CHAR */
  213.             0x5c,        /* FC_PAD */
  214. /*  6 */    0xb5,        /* FC_PIPE */
  215.             0x0,        /* 0 */
  216. /*  8 */    NdrFcShort( 0xfffffffc ),    /* Offset= -4 (4) */
  217. /* 10 */    NdrFcShort( 0x1 ),    /* 1 */
  218. /* 12 */    NdrFcShort( 0x1 ),    /* 1 */
  219.  
  220.             0x0
  221.         }
  222.     };
  223.