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

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:06:39 1998
  4.  */
  5. /* Compiler settings for doctor.idl:
  6.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, c_ext, oldnames
  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 "doctor.h"
  15. #define TYPE_FORMAT_STRING_SIZE   11                                
  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: doctor, ver. 1.0,
  30.    GUID={0xC2557720,0xCA46,0x1067,{0xB3,0x1C,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
  31. handle_t doctor_IfHandle;
  32. static const RPC_CLIENT_INTERFACE doctor___RpcClientInterface =
  33.     {
  34.     sizeof(RPC_CLIENT_INTERFACE),
  35.     {{0xC2557720,0xCA46,0x1067,{0xB3,0x1C,0x00,0xDD,0x01,0x06,0x62,0xDA}},{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 doctor_ClientIfHandle = (RPC_IF_HANDLE)& doctor___RpcClientInterface;
  45. extern const MIDL_STUB_DESC doctor_StubDesc;
  46. static RPC_BINDING_HANDLE doctor__MIDL_AutoBindHandle;
  47. void Analyze( 
  48.     /* [size_is][string][out][in] */ unsigned char __RPC_FAR *pszInOut)
  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  )&doctor_StubDesc,
  62.                           0);
  63.         
  64.         
  65.         _Handle = doctor_IfHandle;
  66.         
  67.         
  68.         _StubMsg.BufferLength = 12U;
  69.         _StubMsg.MaxCount = STRSIZE;
  70.         
  71.         NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  72.                                        (unsigned char __RPC_FAR *)pszInOut,
  73.                                        (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4] );
  74.         
  75.         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
  76.         
  77.         _StubMsg.MaxCount = STRSIZE;
  78.         
  79.         NdrConformantStringMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  80.                                      (unsigned char __RPC_FAR *)pszInOut,
  81.                                      (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4] );
  82.         
  83.         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
  84.         
  85.         if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  86.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  87.         
  88.         NdrConformantStringUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  89.                                        (unsigned char __RPC_FAR * __RPC_FAR *)&pszInOut,
  90.                                        (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4],
  91.                                        (unsigned char)0 );
  92.         
  93.         }
  94.     RpcFinally
  95.         {
  96.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  97.         
  98.         }
  99.     RpcEndFinally
  100.     
  101. }
  102. void Shutdown( void)
  103. {
  104.     RPC_BINDING_HANDLE _Handle = 0;
  105.     
  106.     RPC_MESSAGE _RpcMessage;
  107.     
  108.     MIDL_STUB_MESSAGE _StubMsg;
  109.     
  110.     RpcTryFinally
  111.         {
  112.         NdrClientInitializeNew(
  113.                           ( PRPC_MESSAGE  )&_RpcMessage,
  114.                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  115.                           ( PMIDL_STUB_DESC  )&doctor_StubDesc,
  116.                           1);
  117.         
  118.         
  119.         _Handle = doctor_IfHandle;
  120.         
  121.         
  122.         _StubMsg.BufferLength = 0U;
  123.         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
  124.         
  125.         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
  126.         
  127.         }
  128.     RpcFinally
  129.         {
  130.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  131.         
  132.         }
  133.     RpcEndFinally
  134.     
  135. }
  136. static const MIDL_STUB_DESC doctor_StubDesc = 
  137.     {
  138.     (void __RPC_FAR *)& doctor___RpcClientInterface,
  139.     MIDL_user_allocate,
  140.     MIDL_user_free,
  141.     &doctor_IfHandle,
  142.     0,
  143.     0,
  144.     0,
  145.     0,
  146.     __MIDL_TypeFormatString.Format,
  147.     0, /* -error bounds_check flag */
  148.     0x10001, /* Ndr library version */
  149.     0,
  150.     0x303006e, /* MIDL Version 3.3.110 */
  151.     0,
  152.     0,
  153.     0,  /* Reserved1 */
  154.     0,  /* Reserved2 */
  155.     0,  /* Reserved3 */
  156.     0,  /* Reserved4 */
  157.     0   /* Reserved5 */
  158.     };
  159. #if !defined(__RPC_WIN32__)
  160. #error  Invalid build platform for this stub.
  161. #endif
  162. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  163.     {
  164.         0,
  165.         {
  166. 0x50, /* FC_IN_OUT_PARAM */
  167. #ifndef _ALPHA_
  168. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  169. #else
  170. 0x2, /* Alpha Stack size = 2 */
  171. #endif
  172. /*  2 */ NdrFcShort( 0x0 ), /* Type Offset=0 */
  173. /*  4 */ 0x5b, /* FC_END */
  174. 0x5c, /* FC_PAD */
  175. /*  6 */ 0x5b, /* FC_END */
  176. 0x5c, /* FC_PAD */
  177. 0x0
  178.         }
  179.     };
  180. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  181.     {
  182.         0,
  183.         {
  184. 0x11, 0x0, /* FC_RP */
  185. /*  2 */ NdrFcShort( 0x2 ), /* Offset= 2 (4) */
  186. /*  4 */
  187. 0x22, /* FC_C_CSTRING */
  188. 0x44, /* FC_STRING_SIZED */
  189. /*  6 */ 0x40, /* 64 */
  190. 0x0, /* 0 */
  191. /*  8 */ NdrFcShort( 0x1f4 ), /* 500 */
  192. 0x0
  193.         }
  194.     };