home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / tutsamp / marshal2 / micars_p.c < prev    next >
C/C++ Source or Header  |  1998-03-30  |  29KB  |  1,032 lines

  1. /* this ALWAYS GENERATED file contains the proxy stub code */
  2.  
  3.  
  4. /* File created by MIDL compiler version 3.03.0110 */
  5. /* at Mon Mar 30 03:35:25 1998
  6.  */
  7. /* Compiler settings for micars.idl:
  8.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, app_config, c_ext
  9.     error checks: none
  10. */
  11. //@@MIDL_FILE_HEADING(  )
  12.  
  13.  
  14. /* verify that the <rpcproxy.h> version is high enough to compile this file*/
  15. #ifndef __REDQ_RPCPROXY_H_VERSION__
  16. #define __REQUIRED_RPCPROXY_H_VERSION__ 440
  17. #endif
  18.  
  19.  
  20. #include "rpcproxy.h"
  21. #ifndef __RPCPROXY_H_VERSION__
  22. #error this stub requires an updated version of <rpcproxy.h>
  23. #endif // __RPCPROXY_H_VERSION__
  24.  
  25.  
  26. #include "micars.h"
  27.  
  28. #define TYPE_FORMAT_STRING_SIZE   1                                 
  29. #define PROC_FORMAT_STRING_SIZE   9                                 
  30.  
  31. typedef struct _MIDL_TYPE_FORMAT_STRING
  32.     {
  33.     short          Pad;
  34.     unsigned char  Format[ TYPE_FORMAT_STRING_SIZE ];
  35.     } MIDL_TYPE_FORMAT_STRING;
  36.  
  37. typedef struct _MIDL_PROC_FORMAT_STRING
  38.     {
  39.     short          Pad;
  40.     unsigned char  Format[ PROC_FORMAT_STRING_SIZE ];
  41.     } MIDL_PROC_FORMAT_STRING;
  42.  
  43.  
  44. extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
  45. extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
  46.  
  47.  
  48. /* Object interface: IUnknown, ver. 0.0,
  49.    GUID={0x00000000,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
  50.  
  51.  
  52. /* Object interface: ICar, ver. 0.0,
  53.    GUID={0x0002da00,0x0000,0x0000,{0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
  54.  
  55.  
  56. extern const MIDL_STUB_DESC Object_StubDesc;
  57.  
  58.  
  59. #pragma code_seg(".orpc")
  60.  
  61. HRESULT STDMETHODCALLTYPE ICar_Shift_Proxy( 
  62.     ICar __RPC_FAR * This,
  63.     /* [in] */ short nGear)
  64. {
  65.  
  66.     HRESULT _RetVal;
  67.     
  68.     RPC_MESSAGE _RpcMessage;
  69.     
  70.     MIDL_STUB_MESSAGE _StubMsg;
  71.     
  72.     RpcTryExcept
  73.         {
  74.         NdrProxyInitialize(
  75.                       ( void __RPC_FAR *  )This,
  76.                       ( PRPC_MESSAGE  )&_RpcMessage,
  77.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  78.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  79.                       3);
  80.         
  81.         
  82.         
  83.         RpcTryFinally
  84.             {
  85.             
  86.             _StubMsg.BufferLength = 2U;
  87.             NdrProxyGetBuffer(This, &_StubMsg);
  88.             *(( short __RPC_FAR * )_StubMsg.Buffer)++ = nGear;
  89.             
  90.             NdrProxySendReceive(This, &_StubMsg);
  91.             
  92.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  93.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  94.             
  95.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  96.             
  97.             }
  98.         RpcFinally
  99.             {
  100.             NdrProxyFreeBuffer(This, &_StubMsg);
  101.             
  102.             }
  103.         RpcEndFinally
  104.         
  105.         }
  106.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  107.         {
  108.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  109.         }
  110.     RpcEndExcept
  111.     return _RetVal;
  112. }
  113.  
  114. void __RPC_STUB ICar_Shift_Stub(
  115.     IRpcStubBuffer *This,
  116.     IRpcChannelBuffer *_pRpcChannelBuffer,
  117.     PRPC_MESSAGE _pRpcMessage,
  118.     DWORD *_pdwStubPhase)
  119. {
  120.     HRESULT _RetVal;
  121.     MIDL_STUB_MESSAGE _StubMsg;
  122.     short nGear;
  123.     
  124. NdrStubInitialize(
  125.                      _pRpcMessage,
  126.                      &_StubMsg,
  127.                      &Object_StubDesc,
  128.                      _pRpcChannelBuffer);
  129.     RpcTryFinally
  130.         {
  131.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  132.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  133.         
  134.         nGear = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  135.         
  136.         
  137.         *_pdwStubPhase = STUB_CALL_SERVER;
  138.         _RetVal = (((ICar *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Shift((ICar *) ((CStdStubBuffer *)This)->pvServerObject,nGear);
  139.         
  140.         *_pdwStubPhase = STUB_MARSHAL;
  141.         
  142.         _StubMsg.BufferLength = 4U;
  143.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  144.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  145.         
  146.         }
  147.     RpcFinally
  148.         {
  149.         }
  150.     RpcEndFinally
  151.     _pRpcMessage->BufferLength = 
  152.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  153.     
  154. }
  155.  
  156.  
  157. HRESULT STDMETHODCALLTYPE ICar_Clutch_Proxy( 
  158.     ICar __RPC_FAR * This,
  159.     /* [in] */ short nEngaged)
  160. {
  161.  
  162.     HRESULT _RetVal;
  163.     
  164.     RPC_MESSAGE _RpcMessage;
  165.     
  166.     MIDL_STUB_MESSAGE _StubMsg;
  167.     
  168.     RpcTryExcept
  169.         {
  170.         NdrProxyInitialize(
  171.                       ( void __RPC_FAR *  )This,
  172.                       ( PRPC_MESSAGE  )&_RpcMessage,
  173.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  174.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  175.                       4);
  176.         
  177.         
  178.         
  179.         RpcTryFinally
  180.             {
  181.             
  182.             _StubMsg.BufferLength = 2U;
  183.             NdrProxyGetBuffer(This, &_StubMsg);
  184.             *(( short __RPC_FAR * )_StubMsg.Buffer)++ = nEngaged;
  185.             
  186.             NdrProxySendReceive(This, &_StubMsg);
  187.             
  188.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  189.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  190.             
  191.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  192.             
  193.             }
  194.         RpcFinally
  195.             {
  196.             NdrProxyFreeBuffer(This, &_StubMsg);
  197.             
  198.             }
  199.         RpcEndFinally
  200.         
  201.         }
  202.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  203.         {
  204.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  205.         }
  206.     RpcEndExcept
  207.     return _RetVal;
  208. }
  209.  
  210. void __RPC_STUB ICar_Clutch_Stub(
  211.     IRpcStubBuffer *This,
  212.     IRpcChannelBuffer *_pRpcChannelBuffer,
  213.     PRPC_MESSAGE _pRpcMessage,
  214.     DWORD *_pdwStubPhase)
  215. {
  216.     HRESULT _RetVal;
  217.     MIDL_STUB_MESSAGE _StubMsg;
  218.     short nEngaged;
  219.     
  220. NdrStubInitialize(
  221.                      _pRpcMessage,
  222.                      &_StubMsg,
  223.                      &Object_StubDesc,
  224.                      _pRpcChannelBuffer);
  225.     RpcTryFinally
  226.         {
  227.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  228.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  229.         
  230.         nEngaged = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  231.         
  232.         
  233.         *_pdwStubPhase = STUB_CALL_SERVER;
  234.         _RetVal = (((ICar *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Clutch((ICar *) ((CStdStubBuffer *)This)->pvServerObject,nEngaged);
  235.         
  236.         *_pdwStubPhase = STUB_MARSHAL;
  237.         
  238.         _StubMsg.BufferLength = 4U;
  239.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  240.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  241.         
  242.         }
  243.     RpcFinally
  244.         {
  245.         }
  246.     RpcEndFinally
  247.     _pRpcMessage->BufferLength = 
  248.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  249.     
  250. }
  251.  
  252.  
  253. HRESULT STDMETHODCALLTYPE ICar_Speed_Proxy( 
  254.     ICar __RPC_FAR * This,
  255.     /* [in] */ short nMph)
  256. {
  257.  
  258.     HRESULT _RetVal;
  259.     
  260.     RPC_MESSAGE _RpcMessage;
  261.     
  262.     MIDL_STUB_MESSAGE _StubMsg;
  263.     
  264.     RpcTryExcept
  265.         {
  266.         NdrProxyInitialize(
  267.                       ( void __RPC_FAR *  )This,
  268.                       ( PRPC_MESSAGE  )&_RpcMessage,
  269.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  270.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  271.                       5);
  272.         
  273.         
  274.         
  275.         RpcTryFinally
  276.             {
  277.             
  278.             _StubMsg.BufferLength = 2U;
  279.             NdrProxyGetBuffer(This, &_StubMsg);
  280.             *(( short __RPC_FAR * )_StubMsg.Buffer)++ = nMph;
  281.             
  282.             NdrProxySendReceive(This, &_StubMsg);
  283.             
  284.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  285.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  286.             
  287.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  288.             
  289.             }
  290.         RpcFinally
  291.             {
  292.             NdrProxyFreeBuffer(This, &_StubMsg);
  293.             
  294.             }
  295.         RpcEndFinally
  296.         
  297.         }
  298.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  299.         {
  300.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  301.         }
  302.     RpcEndExcept
  303.     return _RetVal;
  304. }
  305.  
  306. void __RPC_STUB ICar_Speed_Stub(
  307.     IRpcStubBuffer *This,
  308.     IRpcChannelBuffer *_pRpcChannelBuffer,
  309.     PRPC_MESSAGE _pRpcMessage,
  310.     DWORD *_pdwStubPhase)
  311. {
  312.     HRESULT _RetVal;
  313.     MIDL_STUB_MESSAGE _StubMsg;
  314.     short nMph;
  315.     
  316. NdrStubInitialize(
  317.                      _pRpcMessage,
  318.                      &_StubMsg,
  319.                      &Object_StubDesc,
  320.                      _pRpcChannelBuffer);
  321.     RpcTryFinally
  322.         {
  323.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  324.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  325.         
  326.         nMph = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  327.         
  328.         
  329.         *_pdwStubPhase = STUB_CALL_SERVER;
  330.         _RetVal = (((ICar *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Speed((ICar *) ((CStdStubBuffer *)This)->pvServerObject,nMph);
  331.         
  332.         *_pdwStubPhase = STUB_MARSHAL;
  333.         
  334.         _StubMsg.BufferLength = 4U;
  335.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  336.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  337.         
  338.         }
  339.     RpcFinally
  340.         {
  341.         }
  342.     RpcEndFinally
  343.     _pRpcMessage->BufferLength = 
  344.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  345.     
  346. }
  347.  
  348.  
  349. HRESULT STDMETHODCALLTYPE ICar_Steer_Proxy( 
  350.     ICar __RPC_FAR * This,
  351.     /* [in] */ short nAngle)
  352. {
  353.  
  354.     HRESULT _RetVal;
  355.     
  356.     RPC_MESSAGE _RpcMessage;
  357.     
  358.     MIDL_STUB_MESSAGE _StubMsg;
  359.     
  360.     RpcTryExcept
  361.         {
  362.         NdrProxyInitialize(
  363.                       ( void __RPC_FAR *  )This,
  364.                       ( PRPC_MESSAGE  )&_RpcMessage,
  365.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  366.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  367.                       6);
  368.         
  369.         
  370.         
  371.         RpcTryFinally
  372.             {
  373.             
  374.             _StubMsg.BufferLength = 2U;
  375.             NdrProxyGetBuffer(This, &_StubMsg);
  376.             *(( short __RPC_FAR * )_StubMsg.Buffer)++ = nAngle;
  377.             
  378.             NdrProxySendReceive(This, &_StubMsg);
  379.             
  380.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  381.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  382.             
  383.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  384.             
  385.             }
  386.         RpcFinally
  387.             {
  388.             NdrProxyFreeBuffer(This, &_StubMsg);
  389.             
  390.             }
  391.         RpcEndFinally
  392.         
  393.         }
  394.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  395.         {
  396.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  397.         }
  398.     RpcEndExcept
  399.     return _RetVal;
  400. }
  401.  
  402. void __RPC_STUB ICar_Steer_Stub(
  403.     IRpcStubBuffer *This,
  404.     IRpcChannelBuffer *_pRpcChannelBuffer,
  405.     PRPC_MESSAGE _pRpcMessage,
  406.     DWORD *_pdwStubPhase)
  407. {
  408.     HRESULT _RetVal;
  409.     MIDL_STUB_MESSAGE _StubMsg;
  410.     short nAngle;
  411.     
  412. NdrStubInitialize(
  413.                      _pRpcMessage,
  414.                      &_StubMsg,
  415.                      &Object_StubDesc,
  416.                      _pRpcChannelBuffer);
  417.     RpcTryFinally
  418.         {
  419.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  420.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  421.         
  422.         nAngle = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  423.         
  424.         
  425.         *_pdwStubPhase = STUB_CALL_SERVER;
  426.         _RetVal = (((ICar *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Steer((ICar *) ((CStdStubBuffer *)This)->pvServerObject,nAngle);
  427.         
  428.         *_pdwStubPhase = STUB_MARSHAL;
  429.         
  430.         _StubMsg.BufferLength = 4U;
  431.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  432.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  433.         
  434.         }
  435.     RpcFinally
  436.         {
  437.         }
  438.     RpcEndFinally
  439.     _pRpcMessage->BufferLength = 
  440.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  441.     
  442. }
  443.  
  444. const CINTERFACE_PROXY_VTABLE(7) _ICarProxyVtbl = 
  445. {
  446.     &IID_ICar,
  447.     IUnknown_QueryInterface_Proxy,
  448.     IUnknown_AddRef_Proxy,
  449.     IUnknown_Release_Proxy ,
  450.     ICar_Shift_Proxy ,
  451.     ICar_Clutch_Proxy ,
  452.     ICar_Speed_Proxy ,
  453.     ICar_Steer_Proxy
  454. };
  455.  
  456.  
  457. static const PRPC_STUB_FUNCTION ICar_table[] =
  458. {
  459.     ICar_Shift_Stub,
  460.     ICar_Clutch_Stub,
  461.     ICar_Speed_Stub,
  462.     ICar_Steer_Stub
  463. };
  464.  
  465. const CInterfaceStubVtbl _ICarStubVtbl =
  466. {
  467.     &IID_ICar,
  468.     0,
  469.     7,
  470.     &ICar_table[-3],
  471.     CStdStubBuffer_METHODS
  472. };
  473.  
  474.  
  475. /* Object interface: IUtility, ver. 0.0,
  476.    GUID={0x0002da01,0x0000,0x0000,{0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
  477.  
  478.  
  479. extern const MIDL_STUB_DESC Object_StubDesc;
  480.  
  481.  
  482. #pragma code_seg(".orpc")
  483.  
  484. HRESULT STDMETHODCALLTYPE IUtility_Offroad_Proxy( 
  485.     IUtility __RPC_FAR * This,
  486.     /* [in] */ short nGear)
  487. {
  488.  
  489.     HRESULT _RetVal;
  490.     
  491.     RPC_MESSAGE _RpcMessage;
  492.     
  493.     MIDL_STUB_MESSAGE _StubMsg;
  494.     
  495.     RpcTryExcept
  496.         {
  497.         NdrProxyInitialize(
  498.                       ( void __RPC_FAR *  )This,
  499.                       ( PRPC_MESSAGE  )&_RpcMessage,
  500.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  501.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  502.                       3);
  503.         
  504.         
  505.         
  506.         RpcTryFinally
  507.             {
  508.             
  509.             _StubMsg.BufferLength = 2U;
  510.             NdrProxyGetBuffer(This, &_StubMsg);
  511.             *(( short __RPC_FAR * )_StubMsg.Buffer)++ = nGear;
  512.             
  513.             NdrProxySendReceive(This, &_StubMsg);
  514.             
  515.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  516.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  517.             
  518.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  519.             
  520.             }
  521.         RpcFinally
  522.             {
  523.             NdrProxyFreeBuffer(This, &_StubMsg);
  524.             
  525.             }
  526.         RpcEndFinally
  527.         
  528.         }
  529.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  530.         {
  531.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  532.         }
  533.     RpcEndExcept
  534.     return _RetVal;
  535. }
  536.  
  537. void __RPC_STUB IUtility_Offroad_Stub(
  538.     IRpcStubBuffer *This,
  539.     IRpcChannelBuffer *_pRpcChannelBuffer,
  540.     PRPC_MESSAGE _pRpcMessage,
  541.     DWORD *_pdwStubPhase)
  542. {
  543.     HRESULT _RetVal;
  544.     MIDL_STUB_MESSAGE _StubMsg;
  545.     short nGear;
  546.     
  547. NdrStubInitialize(
  548.                      _pRpcMessage,
  549.                      &_StubMsg,
  550.                      &Object_StubDesc,
  551.                      _pRpcChannelBuffer);
  552.     RpcTryFinally
  553.         {
  554.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  555.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  556.         
  557.         nGear = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  558.         
  559.         
  560.         *_pdwStubPhase = STUB_CALL_SERVER;
  561.         _RetVal = (((IUtility *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Offroad((IUtility *) ((CStdStubBuffer *)This)->pvServerObject,nGear);
  562.         
  563.         *_pdwStubPhase = STUB_MARSHAL;
  564.         
  565.         _StubMsg.BufferLength = 4U;
  566.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  567.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  568.         
  569.         }
  570.     RpcFinally
  571.         {
  572.         }
  573.     RpcEndFinally
  574.     _pRpcMessage->BufferLength = 
  575.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  576.     
  577. }
  578.  
  579.  
  580. HRESULT STDMETHODCALLTYPE IUtility_Winch_Proxy( 
  581.     IUtility __RPC_FAR * This,
  582.     /* [in] */ short nRpm)
  583. {
  584.  
  585.     HRESULT _RetVal;
  586.     
  587.     RPC_MESSAGE _RpcMessage;
  588.     
  589.     MIDL_STUB_MESSAGE _StubMsg;
  590.     
  591.     RpcTryExcept
  592.         {
  593.         NdrProxyInitialize(
  594.                       ( void __RPC_FAR *  )This,
  595.                       ( PRPC_MESSAGE  )&_RpcMessage,
  596.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  597.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  598.                       4);
  599.         
  600.         
  601.         
  602.         RpcTryFinally
  603.             {
  604.             
  605.             _StubMsg.BufferLength = 2U;
  606.             NdrProxyGetBuffer(This, &_StubMsg);
  607.             *(( short __RPC_FAR * )_StubMsg.Buffer)++ = nRpm;
  608.             
  609.             NdrProxySendReceive(This, &_StubMsg);
  610.             
  611.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  612.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  613.             
  614.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  615.             
  616.             }
  617.         RpcFinally
  618.             {
  619.             NdrProxyFreeBuffer(This, &_StubMsg);
  620.             
  621.             }
  622.         RpcEndFinally
  623.         
  624.         }
  625.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  626.         {
  627.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  628.         }
  629.     RpcEndExcept
  630.     return _RetVal;
  631. }
  632.  
  633. void __RPC_STUB IUtility_Winch_Stub(
  634.     IRpcStubBuffer *This,
  635.     IRpcChannelBuffer *_pRpcChannelBuffer,
  636.     PRPC_MESSAGE _pRpcMessage,
  637.     DWORD *_pdwStubPhase)
  638. {
  639.     HRESULT _RetVal;
  640.     MIDL_STUB_MESSAGE _StubMsg;
  641.     short nRpm;
  642.     
  643. NdrStubInitialize(
  644.                      _pRpcMessage,
  645.                      &_StubMsg,
  646.                      &Object_StubDesc,
  647.                      _pRpcChannelBuffer);
  648.     RpcTryFinally
  649.         {
  650.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  651.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  652.         
  653.         nRpm = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  654.         
  655.         
  656.         *_pdwStubPhase = STUB_CALL_SERVER;
  657.         _RetVal = (((IUtility *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Winch((IUtility *) ((CStdStubBuffer *)This)->pvServerObject,nRpm);
  658.         
  659.         *_pdwStubPhase = STUB_MARSHAL;
  660.         
  661.         _StubMsg.BufferLength = 4U;
  662.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  663.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  664.         
  665.         }
  666.     RpcFinally
  667.         {
  668.         }
  669.     RpcEndFinally
  670.     _pRpcMessage->BufferLength = 
  671.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  672.     
  673. }
  674.  
  675. const CINTERFACE_PROXY_VTABLE(5) _IUtilityProxyVtbl = 
  676. {
  677.     &IID_IUtility,
  678.     IUnknown_QueryInterface_Proxy,
  679.     IUnknown_AddRef_Proxy,
  680.     IUnknown_Release_Proxy ,
  681.     IUtility_Offroad_Proxy ,
  682.     IUtility_Winch_Proxy
  683. };
  684.  
  685.  
  686. static const PRPC_STUB_FUNCTION IUtility_table[] =
  687. {
  688.     IUtility_Offroad_Stub,
  689.     IUtility_Winch_Stub
  690. };
  691.  
  692. const CInterfaceStubVtbl _IUtilityStubVtbl =
  693. {
  694.     &IID_IUtility,
  695.     0,
  696.     5,
  697.     &IUtility_table[-3],
  698.     CStdStubBuffer_METHODS
  699. };
  700.  
  701.  
  702. /* Object interface: ICruise, ver. 0.0,
  703.    GUID={0x0002da02,0x0000,0x0000,{0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
  704.  
  705.  
  706. extern const MIDL_STUB_DESC Object_StubDesc;
  707.  
  708.  
  709. #pragma code_seg(".orpc")
  710.  
  711. HRESULT STDMETHODCALLTYPE ICruise_Engage_Proxy( 
  712.     ICruise __RPC_FAR * This,
  713.     /* [in] */ BOOL bOnOff)
  714. {
  715.  
  716.     HRESULT _RetVal;
  717.     
  718.     RPC_MESSAGE _RpcMessage;
  719.     
  720.     MIDL_STUB_MESSAGE _StubMsg;
  721.     
  722.     RpcTryExcept
  723.         {
  724.         NdrProxyInitialize(
  725.                       ( void __RPC_FAR *  )This,
  726.                       ( PRPC_MESSAGE  )&_RpcMessage,
  727.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  728.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  729.                       3);
  730.         
  731.         
  732.         
  733.         RpcTryFinally
  734.             {
  735.             
  736.             _StubMsg.BufferLength = 4U;
  737.             NdrProxyGetBuffer(This, &_StubMsg);
  738.             *(( BOOL __RPC_FAR * )_StubMsg.Buffer)++ = bOnOff;
  739.             
  740.             NdrProxySendReceive(This, &_StubMsg);
  741.             
  742.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  743.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[4] );
  744.             
  745.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  746.             
  747.             }
  748.         RpcFinally
  749.             {
  750.             NdrProxyFreeBuffer(This, &_StubMsg);
  751.             
  752.             }
  753.         RpcEndFinally
  754.         
  755.         }
  756.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  757.         {
  758.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  759.         }
  760.     RpcEndExcept
  761.     return _RetVal;
  762. }
  763.  
  764. void __RPC_STUB ICruise_Engage_Stub(
  765.     IRpcStubBuffer *This,
  766.     IRpcChannelBuffer *_pRpcChannelBuffer,
  767.     PRPC_MESSAGE _pRpcMessage,
  768.     DWORD *_pdwStubPhase)
  769. {
  770.     HRESULT _RetVal;
  771.     MIDL_STUB_MESSAGE _StubMsg;
  772.     BOOL bOnOff;
  773.     
  774. NdrStubInitialize(
  775.                      _pRpcMessage,
  776.                      &_StubMsg,
  777.                      &Object_StubDesc,
  778.                      _pRpcChannelBuffer);
  779.     RpcTryFinally
  780.         {
  781.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  782.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[4] );
  783.         
  784.         bOnOff = *(( BOOL __RPC_FAR * )_StubMsg.Buffer)++;
  785.         
  786.         
  787.         *_pdwStubPhase = STUB_CALL_SERVER;
  788.         _RetVal = (((ICruise *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Engage((ICruise *) ((CStdStubBuffer *)This)->pvServerObject,bOnOff);
  789.         
  790.         *_pdwStubPhase = STUB_MARSHAL;
  791.         
  792.         _StubMsg.BufferLength = 4U;
  793.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  794.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  795.         
  796.         }
  797.     RpcFinally
  798.         {
  799.         }
  800.     RpcEndFinally
  801.     _pRpcMessage->BufferLength = 
  802.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  803.     
  804. }
  805.  
  806.  
  807. HRESULT STDMETHODCALLTYPE ICruise_Adjust_Proxy( 
  808.     ICruise __RPC_FAR * This,
  809.     /* [in] */ BOOL bUpDown)
  810. {
  811.  
  812.     HRESULT _RetVal;
  813.     
  814.     RPC_MESSAGE _RpcMessage;
  815.     
  816.     MIDL_STUB_MESSAGE _StubMsg;
  817.     
  818.     RpcTryExcept
  819.         {
  820.         NdrProxyInitialize(
  821.                       ( void __RPC_FAR *  )This,
  822.                       ( PRPC_MESSAGE  )&_RpcMessage,
  823.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  824.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  825.                       4);
  826.         
  827.         
  828.         
  829.         RpcTryFinally
  830.             {
  831.             
  832.             _StubMsg.BufferLength = 4U;
  833.             NdrProxyGetBuffer(This, &_StubMsg);
  834.             *(( BOOL __RPC_FAR * )_StubMsg.Buffer)++ = bUpDown;
  835.             
  836.             NdrProxySendReceive(This, &_StubMsg);
  837.             
  838.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  839.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[4] );
  840.             
  841.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  842.             
  843.             }
  844.         RpcFinally
  845.             {
  846.             NdrProxyFreeBuffer(This, &_StubMsg);
  847.             
  848.             }
  849.         RpcEndFinally
  850.         
  851.         }
  852.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  853.         {
  854.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  855.         }
  856.     RpcEndExcept
  857.     return _RetVal;
  858. }
  859.  
  860. void __RPC_STUB ICruise_Adjust_Stub(
  861.     IRpcStubBuffer *This,
  862.     IRpcChannelBuffer *_pRpcChannelBuffer,
  863.     PRPC_MESSAGE _pRpcMessage,
  864.     DWORD *_pdwStubPhase)
  865. {
  866.     HRESULT _RetVal;
  867.     MIDL_STUB_MESSAGE _StubMsg;
  868.     BOOL bUpDown;
  869.     
  870. NdrStubInitialize(
  871.                      _pRpcMessage,
  872.                      &_StubMsg,
  873.                      &Object_StubDesc,
  874.                      _pRpcChannelBuffer);
  875.     RpcTryFinally
  876.         {
  877.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  878.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[4] );
  879.         
  880.         bUpDown = *(( BOOL __RPC_FAR * )_StubMsg.Buffer)++;
  881.         
  882.         
  883.         *_pdwStubPhase = STUB_CALL_SERVER;
  884.         _RetVal = (((ICruise *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Adjust((ICruise *) ((CStdStubBuffer *)This)->pvServerObject,bUpDown);
  885.         
  886.         *_pdwStubPhase = STUB_MARSHAL;
  887.         
  888.         _StubMsg.BufferLength = 4U;
  889.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  890.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  891.         
  892.         }
  893.     RpcFinally
  894.         {
  895.         }
  896.     RpcEndFinally
  897.     _pRpcMessage->BufferLength = 
  898.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  899.     
  900. }
  901.  
  902.  
  903. static const MIDL_STUB_DESC Object_StubDesc = 
  904.     {
  905.     0,
  906.     NdrOleAllocate,
  907.     NdrOleFree,
  908.     0,
  909.     0,
  910.     0,
  911.     0,
  912.     0,
  913.     __MIDL_TypeFormatString.Format,
  914.     0, /* -error bounds_check flag */
  915.     0x10001, /* Ndr library version */
  916.     0,
  917.     0x303006e, /* MIDL Version 3.3.110 */
  918.     0,
  919.     0,
  920.     0,  /* Reserved1 */
  921.     0,  /* Reserved2 */
  922.     0,  /* Reserved3 */
  923.     0,  /* Reserved4 */
  924.     0   /* Reserved5 */
  925.     };
  926.  
  927. const CINTERFACE_PROXY_VTABLE(5) _ICruiseProxyVtbl = 
  928. {
  929.     &IID_ICruise,
  930.     IUnknown_QueryInterface_Proxy,
  931.     IUnknown_AddRef_Proxy,
  932.     IUnknown_Release_Proxy ,
  933.     ICruise_Engage_Proxy ,
  934.     ICruise_Adjust_Proxy
  935. };
  936.  
  937.  
  938. static const PRPC_STUB_FUNCTION ICruise_table[] =
  939. {
  940.     ICruise_Engage_Stub,
  941.     ICruise_Adjust_Stub
  942. };
  943.  
  944. const CInterfaceStubVtbl _ICruiseStubVtbl =
  945. {
  946.     &IID_ICruise,
  947.     0,
  948.     5,
  949.     &ICruise_table[-3],
  950.     CStdStubBuffer_METHODS
  951. };
  952.  
  953. #pragma data_seg(".rdata")
  954.  
  955. #if !defined(__RPC_WIN32__)
  956. #error  Invalid build platform for this stub.
  957. #endif
  958.  
  959. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  960.     {
  961.         0,
  962.         {
  963.             0x4e,        /* FC_IN_PARAM_BASETYPE */
  964.             0x6,        /* FC_SHORT */
  965. /*  2 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  966.             0x8,        /* FC_LONG */
  967. /*  4 */    0x4e,        /* FC_IN_PARAM_BASETYPE */
  968.             0x8,        /* FC_LONG */
  969. /*  6 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  970.             0x8,        /* FC_LONG */
  971.  
  972.             0x0
  973.         }
  974.     };
  975.  
  976. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  977.     {
  978.         0,
  979.         {
  980.  
  981.             0x0
  982.         }
  983.     };
  984.  
  985. const CInterfaceProxyVtbl * _micars_ProxyVtblList[] = 
  986. {
  987.     ( CInterfaceProxyVtbl *) &_ICarProxyVtbl,
  988.     ( CInterfaceProxyVtbl *) &_IUtilityProxyVtbl,
  989.     ( CInterfaceProxyVtbl *) &_ICruiseProxyVtbl,
  990.     0
  991. };
  992.  
  993. const CInterfaceStubVtbl * _micars_StubVtblList[] = 
  994. {
  995.     ( CInterfaceStubVtbl *) &_ICarStubVtbl,
  996.     ( CInterfaceStubVtbl *) &_IUtilityStubVtbl,
  997.     ( CInterfaceStubVtbl *) &_ICruiseStubVtbl,
  998.     0
  999. };
  1000.  
  1001. PCInterfaceName const _micars_InterfaceNamesList[] = 
  1002. {
  1003.     "ICar",
  1004.     "IUtility",
  1005.     "ICruise",
  1006.     0
  1007. };
  1008.  
  1009.  
  1010. #define _micars_CHECK_IID(n)    IID_GENERIC_CHECK_IID( _micars, pIID, n)
  1011.  
  1012. int __stdcall _micars_IID_Lookup( const IID * pIID, int * pIndex )
  1013. {
  1014.     IID_BS_LOOKUP_SETUP
  1015.  
  1016.     IID_BS_LOOKUP_INITIAL_TEST( _micars, 3, 2 )
  1017.     IID_BS_LOOKUP_NEXT_TEST( _micars, 1 )
  1018.     IID_BS_LOOKUP_RETURN_RESULT( _micars, 3, *pIndex )
  1019.     
  1020. }
  1021.  
  1022. const ExtendedProxyFileInfo micars_ProxyFileInfo = 
  1023. {
  1024.     (PCInterfaceProxyVtblList *) & _micars_ProxyVtblList,
  1025.     (PCInterfaceStubVtblList *) & _micars_StubVtblList,
  1026.     (const PCInterfaceName * ) & _micars_InterfaceNamesList,
  1027.     0, // no delegation
  1028.     & _micars_IID_Lookup, 
  1029.     3,
  1030.     1
  1031. };
  1032.