MSG_C.C
上传用户:bangxh
上传日期:2007-01-31
资源大小:42235k
文件大小:5k
源码类别:

Windows编程

开发平台:

Visual C++

  1. /* this ALWAYS GENERATED file contains the RPC client stubs */
  2. /* File created by MIDL compiler version 3.03.0110 */
  3. /* at Mon Mar 30 03:07:53 1998
  4.  */
  5. /* Compiler settings for msg.idl:
  6.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext
  7.     error checks: none
  8. */
  9. //@@MIDL_FILE_HEADING(  )
  10. #include <string.h>
  11. #if defined( _ALPHA_ )
  12. #include <stdarg.h>
  13. #endif
  14. #include "msg.h"
  15. #define TYPE_FORMAT_STRING_SIZE   5                                 
  16. #define PROC_FORMAT_STRING_SIZE   9                                 
  17. typedef struct _MIDL_TYPE_FORMAT_STRING
  18.     {
  19.     short          Pad;
  20.     unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
  21.     } MIDL_TYPE_FORMAT_STRING;
  22. typedef struct _MIDL_PROC_FORMAT_STRING
  23.     {
  24.     short          Pad;
  25.     unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
  26.     } MIDL_PROC_FORMAT_STRING;
  27. extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
  28. extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
  29. /* Standard interface: interop, ver. 1.0,
  30.    GUID={0x0E8BDF58,0xB3BF,0x101A,{0xA1,0x16,0x08,0x00,0x2B,0x2B,0x8C,0xD3}} */
  31. handle_t interop_binding_handle;
  32. static const RPC_CLIENT_INTERFACE interop___RpcClientInterface =
  33.     {
  34.     sizeof(RPC_CLIENT_INTERFACE),
  35.     {{0x0E8BDF58,0xB3BF,0x101A,{0xA1,0x16,0x08,0x00,0x2B,0x2B,0x8C,0xD3}},{1,0}},
  36.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  37.     0,
  38.     0,
  39.     0,
  40.     0,
  41.     0,
  42.     0
  43.     };
  44. RPC_IF_HANDLE interop_v1_0_c_ifspec = (RPC_IF_HANDLE)& interop___RpcClientInterface;
  45. extern const MIDL_STUB_DESC interop_StubDesc;
  46. static RPC_BINDING_HANDLE interop__MIDL_AutoBindHandle;
  47. void ClientMessage( 
  48.     /* [ref][string][in] */ unsigned char __RPC_FAR *pszMessage)
  49. {
  50.     RPC_BINDING_HANDLE _Handle = 0;
  51.     
  52.     RPC_MESSAGE _RpcMessage;
  53.     
  54.     MIDL_STUB_MESSAGE _StubMsg;
  55.     
  56.     RpcTryFinally
  57.         {
  58.         NdrClientInitializeNew(
  59.                           ( PRPC_MESSAGE  )&_RpcMessage,
  60.                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  61.                           ( PMIDL_STUB_DESC  )&interop_StubDesc,
  62.                           0);
  63.         
  64.         
  65.         _Handle = interop_binding_handle;
  66.         
  67.         
  68.         _StubMsg.BufferLength = 12U;
  69.         NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  70.                                        (unsigned char __RPC_FAR *)pszMessage,
  71.                                        (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[2] );
  72.         
  73.         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
  74.         
  75.         NdrConformantStringMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  76.                                      (unsigned char __RPC_FAR *)pszMessage,
  77.                                      (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[2] );
  78.         
  79.         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
  80.         
  81.         }
  82.     RpcFinally
  83.         {
  84.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  85.         
  86.         }
  87.     RpcEndFinally
  88.     
  89. }
  90. void ShutdownServer( void)
  91. {
  92.     RPC_BINDING_HANDLE _Handle = 0;
  93.     
  94.     RPC_MESSAGE _RpcMessage;
  95.     
  96.     MIDL_STUB_MESSAGE _StubMsg;
  97.     
  98.     RpcTryFinally
  99.         {
  100.         NdrClientInitializeNew(
  101.                           ( PRPC_MESSAGE  )&_RpcMessage,
  102.                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  103.                           ( PMIDL_STUB_DESC  )&interop_StubDesc,
  104.                           1);
  105.         
  106.         
  107.         _Handle = interop_binding_handle;
  108.         
  109.         
  110.         _StubMsg.BufferLength = 0U;
  111.         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
  112.         
  113.         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
  114.         
  115.         }
  116.     RpcFinally
  117.         {
  118.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  119.         
  120.         }
  121.     RpcEndFinally
  122.     
  123. }
  124. static const MIDL_STUB_DESC interop_StubDesc = 
  125.     {
  126.     (void __RPC_FAR *)& interop___RpcClientInterface,
  127.     MIDL_user_allocate,
  128.     MIDL_user_free,
  129.     &interop_binding_handle,
  130.     0,
  131.     0,
  132.     0,
  133.     0,
  134.     __MIDL_TypeFormatString.Format,
  135.     0, /* -error bounds_check flag */
  136.     0x10001, /* Ndr library version */
  137.     0,
  138.     0x303006e, /* MIDL Version 3.3.110 */
  139.     0,
  140.     0,
  141.     0,  /* Reserved1 */
  142.     0,  /* Reserved2 */
  143.     0,  /* Reserved3 */
  144.     0,  /* Reserved4 */
  145.     0   /* Reserved5 */
  146.     };
  147. #if !defined(__RPC_WIN32__)
  148. #error  Invalid build platform for this stub.
  149. #endif
  150. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  151.     {
  152.         0,
  153.         {
  154. 0x4d, /* FC_IN_PARAM */
  155. #ifndef _ALPHA_
  156. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  157. #else
  158. 0x2, /* Alpha Stack size = 2 */
  159. #endif
  160. /*  2 */ NdrFcShort( 0x0 ), /* Type Offset=0 */
  161. /*  4 */ 0x5b, /* FC_END */
  162. 0x5c, /* FC_PAD */
  163. /*  6 */ 0x5b, /* FC_END */
  164. 0x5c, /* FC_PAD */
  165. 0x0
  166.         }
  167.     };
  168. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  169.     {
  170.         0,
  171.         {
  172. 0x11, 0x8, /* FC_RP [simple_pointer] */
  173. /*  2 */
  174. 0x22, /* FC_C_CSTRING */
  175. 0x5c, /* FC_PAD */
  176. 0x0
  177.         }
  178.     };