NHELLO_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:08:16 1998
  4.  */
  5. /* Compiler settings for nhello.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 "nhello.h"
  15. #define TYPE_FORMAT_STRING_SIZE   5                                 
  16. #define PROC_FORMAT_STRING_SIZE   13                                
  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: nhello, ver. 1.0,
  30.    GUID={0x5D6E4DA0,0x0D21,0x1068,{0x94,0xB1,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
  31. static const RPC_CLIENT_INTERFACE nhello___RpcClientInterface =
  32.     {
  33.     sizeof(RPC_CLIENT_INTERFACE),
  34.     {{0x5D6E4DA0,0x0D21,0x1068,{0x94,0xB1,0x00,0xDD,0x01,0x06,0x62,0xDA}},{1,0}},
  35.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  36.     0,
  37.     0,
  38.     0,
  39.     0,
  40.     0,
  41.     0
  42.     };
  43. RPC_IF_HANDLE nhello_v1_0_c_ifspec = (RPC_IF_HANDLE)& nhello___RpcClientInterface;
  44. extern const MIDL_STUB_DESC nhello_StubDesc;
  45. static RPC_BINDING_HANDLE nhello__MIDL_AutoBindHandle;
  46. void HelloProc( 
  47.     handle_t nBinding,
  48.     /* [string][in] */ unsigned char __RPC_FAR *pszString)
  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  )&nhello_StubDesc,
  62.                           0);
  63.         
  64.         
  65.         _Handle = nBinding;
  66.         
  67.         
  68.         _StubMsg.BufferLength = 0U + 12U;
  69.         NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  70.                                        (unsigned char __RPC_FAR *)pszString,
  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 *)pszString,
  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 Shutdown( 
  91.     handle_t nBinding)
  92. {
  93.     RPC_BINDING_HANDLE _Handle = 0;
  94.     
  95.     RPC_MESSAGE _RpcMessage;
  96.     
  97.     MIDL_STUB_MESSAGE _StubMsg;
  98.     
  99.     RpcTryFinally
  100.         {
  101.         NdrClientInitializeNew(
  102.                           ( PRPC_MESSAGE  )&_RpcMessage,
  103.                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  104.                           ( PMIDL_STUB_DESC  )&nhello_StubDesc,
  105.                           1);
  106.         
  107.         
  108.         _Handle = nBinding;
  109.         
  110.         
  111.         _StubMsg.BufferLength = 0U;
  112.         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
  113.         
  114.         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
  115.         
  116.         }
  117.     RpcFinally
  118.         {
  119.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  120.         
  121.         }
  122.     RpcEndFinally
  123.     
  124. }
  125. static const MIDL_STUB_DESC nhello_StubDesc = 
  126.     {
  127.     (void __RPC_FAR *)& nhello___RpcClientInterface,
  128.     MIDL_user_allocate,
  129.     MIDL_user_free,
  130.     &nhello__MIDL_AutoBindHandle,
  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. #if !defined(__RPC_WIN32__)
  149. #error  Invalid build platform for this stub.
  150. #endif
  151. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  152.     {
  153.         0,
  154.         {
  155. 0x4e, /* FC_IN_PARAM_BASETYPE */
  156. 0xf, /* FC_IGNORE */
  157. /*  2 */
  158. 0x4d, /* FC_IN_PARAM */
  159. #ifndef _ALPHA_
  160. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  161. #else
  162. 0x2, /* Alpha Stack size = 2 */
  163. #endif
  164. /*  4 */ NdrFcShort( 0x0 ), /* Type Offset=0 */
  165. /*  6 */ 0x5b, /* FC_END */
  166. 0x5c, /* FC_PAD */
  167. /*  8 */ 0x4e, /* FC_IN_PARAM_BASETYPE */
  168. 0xf, /* FC_IGNORE */
  169. /* 10 */ 0x5b, /* FC_END */
  170. 0x5c, /* FC_PAD */
  171. 0x0
  172.         }
  173.     };
  174. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  175.     {
  176.         0,
  177.         {
  178. 0x11, 0x8, /* FC_RP [simple_pointer] */
  179. /*  2 */
  180. 0x22, /* FC_C_CSTRING */
  181. 0x5c, /* FC_PAD */
  182. 0x0
  183.         }
  184.     };