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

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:30 1998
  4.  */
  5. /* Compiler settings for usrdef.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 "usrdef.h"
  15. #define TYPE_FORMAT_STRING_SIZE   73                                
  16. #define PROC_FORMAT_STRING_SIZE   17                                
  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: usrdef, ver. 1.0,
  30.    GUID={0x85D7D1C0,0xCA47,0x1067,{0xB3,0x1E,0x00,0xDD,0x01,0x06,0x62,0xDA}} */
  31. handle_t hUnused;
  32. static const RPC_CLIENT_INTERFACE usrdef___RpcClientInterface =
  33.     {
  34.     sizeof(RPC_CLIENT_INTERFACE),
  35.     {{0x85D7D1C0,0xCA47,0x1067,{0xB3,0x1E,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 usrdef_ClientIfHandle = (RPC_IF_HANDLE)& usrdef___RpcClientInterface;
  45. extern const MIDL_STUB_DESC usrdef_StubDesc;
  46. static RPC_BINDING_HANDLE usrdef__MIDL_AutoBindHandle;
  47. void UsrdefProc( 
  48.     /* [in] */ DATA_HANDLE_TYPE hBinding,
  49.     /* [string][in] */ unsigned char __RPC_FAR *pszString)
  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  )&usrdef_StubDesc,
  63.                           0);
  64.         
  65.         
  66.         _Handle = DATA_HANDLE_TYPE_bind(hBinding);;
  67.         
  68.         if(_Handle == 0)
  69.             {
  70.             RpcRaiseException(RPC_S_INVALID_BINDING);
  71.             }
  72.         
  73.         _StubMsg.BufferLength = 0U + 13U;
  74.         NdrSimpleStructBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  75.                                    (unsigned char __RPC_FAR *)hBinding,
  76.                                    (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4] );
  77.         
  78.         NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  79.                                        (unsigned char __RPC_FAR *)pszString,
  80.                                        (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[70] );
  81.         
  82.         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
  83.         
  84.         NdrSimpleStructMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  85.                                  (unsigned char __RPC_FAR *)hBinding,
  86.                                  (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4] );
  87.         
  88.         NdrConformantStringMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  89.                                      (unsigned char __RPC_FAR *)pszString,
  90.                                      (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[70] );
  91.         
  92.         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
  93.         
  94.         }
  95.     RpcFinally
  96.         {
  97.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  98.         
  99.         
  100.         if(_Handle)
  101.             {
  102.             DATA_HANDLE_TYPE_unbind(hBinding,_Handle);
  103.             }
  104.         }
  105.     RpcEndFinally
  106.     
  107. }
  108. void Shutdown( 
  109.     /* [in] */ DATA_HANDLE_TYPE hBinding)
  110. {
  111.     RPC_BINDING_HANDLE _Handle = 0;
  112.     
  113.     RPC_MESSAGE _RpcMessage;
  114.     
  115.     MIDL_STUB_MESSAGE _StubMsg;
  116.     
  117.     RpcTryFinally
  118.         {
  119.         NdrClientInitializeNew(
  120.                           ( PRPC_MESSAGE  )&_RpcMessage,
  121.                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  122.                           ( PMIDL_STUB_DESC  )&usrdef_StubDesc,
  123.                           1);
  124.         
  125.         
  126.         _Handle = DATA_HANDLE_TYPE_bind(hBinding);;
  127.         
  128.         if(_Handle == 0)
  129.             {
  130.             RpcRaiseException(RPC_S_INVALID_BINDING);
  131.             }
  132.         
  133.         _StubMsg.BufferLength = 0U;
  134.         NdrSimpleStructBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  135.                                    (unsigned char __RPC_FAR *)hBinding,
  136.                                    (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4] );
  137.         
  138.         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
  139.         
  140.         NdrSimpleStructMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  141.                                  (unsigned char __RPC_FAR *)hBinding,
  142.                                  (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[4] );
  143.         
  144.         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
  145.         
  146.         }
  147.     RpcFinally
  148.         {
  149.         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
  150.         
  151.         
  152.         if(_Handle)
  153.             {
  154.             DATA_HANDLE_TYPE_unbind(hBinding,_Handle);
  155.             }
  156.         }
  157.     RpcEndFinally
  158.     
  159. }
  160. static const MIDL_STUB_DESC usrdef_StubDesc = 
  161.     {
  162.     (void __RPC_FAR *)& usrdef___RpcClientInterface,
  163.     MIDL_user_allocate,
  164.     MIDL_user_free,
  165.     &hUnused,
  166.     0,
  167.     0,
  168.     0,
  169.     0,
  170.     __MIDL_TypeFormatString.Format,
  171.     0, /* -error bounds_check flag */
  172.     0x10001, /* Ndr library version */
  173.     0,
  174.     0x303006e, /* MIDL Version 3.3.110 */
  175.     0,
  176.     0,
  177.     0,  /* Reserved1 */
  178.     0,  /* Reserved2 */
  179.     0,  /* Reserved3 */
  180.     0,  /* Reserved4 */
  181.     0   /* Reserved5 */
  182.     };
  183. #if !defined(__RPC_WIN32__)
  184. #error  Invalid build platform for this stub.
  185. #endif
  186. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  187.     {
  188.         0,
  189.         {
  190. 0x4d, /* FC_IN_PARAM */
  191. #ifndef _ALPHA_
  192. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  193. #else
  194. 0x2, /* Alpha Stack size = 2 */
  195. #endif
  196. /*  2 */ NdrFcShort( 0x0 ), /* Type Offset=0 */
  197. /*  4 */
  198. 0x4d, /* FC_IN_PARAM */
  199. #ifndef _ALPHA_
  200. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  201. #else
  202. 0x2, /* Alpha Stack size = 2 */
  203. #endif
  204. /*  6 */ NdrFcShort( 0x44 ), /* Type Offset=68 */
  205. /*  8 */ 0x5b, /* FC_END */
  206. 0x5c, /* FC_PAD */
  207. /* 10 */
  208. 0x4d, /* FC_IN_PARAM */
  209. #ifndef _ALPHA_
  210. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  211. #else
  212. 0x2, /* Alpha Stack size = 2 */
  213. #endif
  214. /* 12 */ NdrFcShort( 0x0 ), /* Type Offset=0 */
  215. /* 14 */ 0x5b, /* FC_END */
  216. 0x5c, /* FC_PAD */
  217. 0x0
  218.         }
  219.     };
  220. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  221.     {
  222.         0,
  223.         {
  224. 0x11, 0x0, /* FC_RP */
  225. /*  2 */ NdrFcShort( 0x2 ), /* Offset= 2 (4) */
  226. /*  4 */
  227. 0x16, /* FC_PSTRUCT */
  228. 0x3, /* 3 */
  229. /*  6 */ NdrFcShort( 0x14 ), /* 20 */
  230. /*  8 */
  231. 0x4b, /* FC_PP */
  232. 0x5c, /* FC_PAD */
  233. /* 10 */
  234. 0x46, /* FC_NO_REPEAT */
  235. 0x5c, /* FC_PAD */
  236. /* 12 */ NdrFcShort( 0x0 ), /* 0 */
  237. /* 14 */ NdrFcShort( 0x0 ), /* 0 */
  238. /* 16 */ 0x12, 0x8, /* FC_UP [simple_pointer] */
  239. /* 18 */ 0x2, /* FC_CHAR */
  240. 0x5c, /* FC_PAD */
  241. /* 20 */
  242. 0x46, /* FC_NO_REPEAT */
  243. 0x5c, /* FC_PAD */
  244. /* 22 */ NdrFcShort( 0x4 ), /* 4 */
  245. /* 24 */ NdrFcShort( 0x4 ), /* 4 */
  246. /* 26 */ 0x12, 0x8, /* FC_UP [simple_pointer] */
  247. /* 28 */ 0x2, /* FC_CHAR */
  248. 0x5c, /* FC_PAD */
  249. /* 30 */
  250. 0x46, /* FC_NO_REPEAT */
  251. 0x5c, /* FC_PAD */
  252. /* 32 */ NdrFcShort( 0x8 ), /* 8 */
  253. /* 34 */ NdrFcShort( 0x8 ), /* 8 */
  254. /* 36 */ 0x12, 0x8, /* FC_UP [simple_pointer] */
  255. /* 38 */ 0x2, /* FC_CHAR */
  256. 0x5c, /* FC_PAD */
  257. /* 40 */
  258. 0x46, /* FC_NO_REPEAT */
  259. 0x5c, /* FC_PAD */
  260. /* 42 */ NdrFcShort( 0xc ), /* 12 */
  261. /* 44 */ NdrFcShort( 0xc ), /* 12 */
  262. /* 46 */ 0x12, 0x8, /* FC_UP [simple_pointer] */
  263. /* 48 */ 0x2, /* FC_CHAR */
  264. 0x5c, /* FC_PAD */
  265. /* 50 */
  266. 0x46, /* FC_NO_REPEAT */
  267. 0x5c, /* FC_PAD */
  268. /* 52 */ NdrFcShort( 0x10 ), /* 16 */
  269. /* 54 */ NdrFcShort( 0x10 ), /* 16 */
  270. /* 56 */ 0x12, 0x8, /* FC_UP [simple_pointer] */
  271. /* 58 */ 0x2, /* FC_CHAR */
  272. 0x5c, /* FC_PAD */
  273. /* 60 */
  274. 0x5b, /* FC_END */
  275. 0x8, /* FC_LONG */
  276. /* 62 */ 0x8, /* FC_LONG */
  277. 0x8, /* FC_LONG */
  278. /* 64 */ 0x8, /* FC_LONG */
  279. 0x8, /* FC_LONG */
  280. /* 66 */ 0x5c, /* FC_PAD */
  281. 0x5b, /* FC_END */
  282. /* 68 */
  283. 0x11, 0x8, /* FC_RP [simple_pointer] */
  284. /* 70 */
  285. 0x22, /* FC_C_CSTRING */
  286. 0x5c, /* FC_PAD */
  287. 0x0
  288.         }
  289.     };