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

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:49 1998
  4.  */
  5. /* Compiler settings for rpcssm.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 <malloc.h>
  15. #include "rpcssm.h"
  16. #define TYPE_FORMAT_STRING_SIZE   29                                
  17. #define PROC_FORMAT_STRING_SIZE   9                                 
  18. typedef struct _MIDL_TYPE_FORMAT_STRING
  19.     {
  20.     short          Pad;
  21.     unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
  22.     } MIDL_TYPE_FORMAT_STRING;
  23. typedef struct _MIDL_PROC_FORMAT_STRING
  24.     {
  25.     short          Pad;
  26.     unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
  27.     } MIDL_PROC_FORMAT_STRING;
  28. extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
  29. extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
  30. /* Standard interface: rpcssm, ver. 1.0,
  31.    GUID={0xA4F1DB00,0xCA47,0x1067,{0xB3,0x1F,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
  32. handle_t hStarter;
  33. static const RPC_CLIENT_INTERFACE rpcssm___RpcClientInterface =
  34.     {
  35.     sizeof(RPC_CLIENT_INTERFACE),
  36.     {{0xA4F1DB00,0xCA47,0x1067,{0xB3,0x1F,0x00,0xDD,0x01,0x06,0x62,0xDA}},{1,0}},
  37.     {{0x8A885D04,0x1CEB,0x11C9,{0x9F,0xE8,0x08,0x00,0x2B,0x10,0x48,0x60}},{2,0}},
  38.     0,
  39.     0,
  40.     0,
  41.     0,
  42.     0,
  43.     0
  44.     };
  45. RPC_IF_HANDLE rpcssm_ClientIfHandle = (RPC_IF_HANDLE)& rpcssm___RpcClientInterface;
  46. extern const MIDL_STUB_DESC rpcssm_StubDesc;
  47. static RPC_BINDING_HANDLE rpcssm__MIDL_AutoBindHandle;
  48. void InOutList( 
  49.     /* [out][in] */ PBOX __RPC_FAR *ppBox)
  50. {
  51.     RPC_BINDING_HANDLE _Handle = 0;
  52.     
  53.     RPC_MESSAGE _RpcMessage;
  54.     
  55.     MIDL_STUB_MESSAGE _StubMsg;
  56.     
  57.     RpcTryFinally
  58.         {
  59.         NdrClientInitializeNew(
  60.                           ( PRPC_MESSAGE  )&_RpcMessage,
  61.                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  62.                           ( PMIDL_STUB_DESC  )&rpcssm_StubDesc,
  63.                           0);
  64.         
  65.         
  66.         _Handle = hStarter;
  67.         
  68.         
  69.         _StubMsg.BufferLength = 4U;
  70.         NdrPointerBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  71.                               (unsigned char __RPC_FAR *)ppBox,
  72.                               (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[0] );
  73.         
  74.         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
  75.         
  76.         NdrPointerMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  77.                             (unsigned char __RPC_FAR *)ppBox,
  78.                             (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[0] );
  79.         
  80.         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
  81.         
  82.         if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  83.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  84.         
  85.         NdrPointerUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  86.                               (unsigned char __RPC_FAR * __RPC_FAR *)&ppBox,
  87.                               (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[0],
  88.                               (unsigned char)0 );
  89.         
  90.         }
  91.     RpcFinally
  92.         {
  93.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  94.         
  95.         }
  96.     RpcEndFinally
  97.     
  98. }
  99. void Shutdown( void)
  100. {
  101.     RPC_BINDING_HANDLE _Handle = 0;
  102.     
  103.     RPC_MESSAGE _RpcMessage;
  104.     
  105.     MIDL_STUB_MESSAGE _StubMsg;
  106.     
  107.     RpcTryFinally
  108.         {
  109.         NdrClientInitializeNew(
  110.                           ( PRPC_MESSAGE  )&_RpcMessage,
  111.                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  112.                           ( PMIDL_STUB_DESC  )&rpcssm_StubDesc,
  113.                           1);
  114.         
  115.         
  116.         _Handle = hStarter;
  117.         
  118.         
  119.         _StubMsg.BufferLength = 0U;
  120.         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
  121.         
  122.         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
  123.         
  124.         }
  125.     RpcFinally
  126.         {
  127.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  128.         
  129.         }
  130.     RpcEndFinally
  131.     
  132. }
  133. extern MALLOC_FREE_STRUCT _MallocFreeStruct;
  134. static const MIDL_STUB_DESC rpcssm_StubDesc = 
  135.     {
  136.     (void __RPC_FAR *)& rpcssm___RpcClientInterface,
  137.     NdrRpcSmClientAllocate,
  138.     NdrRpcSmClientFree,
  139.     &hStarter,
  140.     0,
  141.     0,
  142.     0,
  143.     0,
  144.     __MIDL_TypeFormatString.Format,
  145.     0, /* -error bounds_check flag */
  146.     0x10001, /* Ndr library version */
  147.     &_MallocFreeStruct,
  148.     0x303006e, /* MIDL Version 3.3.110 */
  149.     0,
  150.     0,
  151.     0,  /* Reserved1 */
  152.     0,  /* Reserved2 */
  153.     0,  /* Reserved3 */
  154.     0,  /* Reserved4 */
  155.     0   /* Reserved5 */
  156.     };
  157. static void __RPC_FAR * __RPC_USER
  158. rpcssm_malloc_wrapper( size_t _Size )
  159. {
  160.     return( malloc( _Size ) );
  161. }
  162. static void  __RPC_USER
  163. rpcssm_free_wrapper( void __RPC_FAR * _p )
  164. {
  165.     free( _p );
  166. }
  167. static MALLOC_FREE_STRUCT _MallocFreeStruct = 
  168. {
  169.     rpcssm_malloc_wrapper,
  170.     rpcssm_free_wrapper
  171. };
  172. #if !defined(__RPC_WIN32__)
  173. #error  Invalid build platform for this stub.
  174. #endif
  175. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  176.     {
  177.         0,
  178.         {
  179. 0x50, /* FC_IN_OUT_PARAM */
  180. #ifndef _ALPHA_
  181. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  182. #else
  183. 0x2, /* Alpha Stack size = 2 */
  184. #endif
  185. /*  2 */ NdrFcShort( 0x0 ), /* Type Offset=0 */
  186. /*  4 */ 0x5b, /* FC_END */
  187. 0x5c, /* FC_PAD */
  188. /*  6 */ 0x5b, /* FC_END */
  189. 0x5c, /* FC_PAD */
  190. 0x0
  191.         }
  192.     };
  193. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  194.     {
  195.         0,
  196.         {
  197. 0x11, 0x10, /* FC_RP */
  198. /*  2 */ NdrFcShort( 0x2 ), /* Offset= 2 (4) */
  199. /*  4 */
  200. 0x12, 0x0, /* FC_UP */
  201. /*  6 */ NdrFcShort( 0x2 ), /* Offset= 2 (8) */
  202. /*  8 */
  203. 0x16, /* FC_PSTRUCT */
  204. 0x3, /* 3 */
  205. /* 10 */ NdrFcShort( 0x8 ), /* 8 */
  206. /* 12 */
  207. 0x4b, /* FC_PP */
  208. 0x5c, /* FC_PAD */
  209. /* 14 */
  210. 0x46, /* FC_NO_REPEAT */
  211. 0x5c, /* FC_PAD */
  212. /* 16 */ NdrFcShort( 0x4 ), /* 4 */
  213. /* 18 */ NdrFcShort( 0x4 ), /* 4 */
  214. /* 20 */ 0x12, 0x0, /* FC_UP */
  215. /* 22 */ NdrFcShort( 0xfffffff2 ), /* Offset= -14 (8) */
  216. /* 24 */
  217. 0x5b, /* FC_END */
  218. 0x8, /* FC_LONG */
  219. /* 26 */ 0x8, /* FC_LONG */
  220. 0x5b, /* FC_END */
  221. 0x0
  222.         }
  223.     };