home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / com / connect / server / connect_p.c < prev    next >
C/C++ Source or Header  |  1998-04-02  |  21KB  |  744 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 Wed Feb 11 11:48:29 1998
  6.  */
  7. /* Compiler settings for Connect.idl:
  8.     Os (OptLev=s), W1, Zp8, env=Win32, ms_ext, 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 "Connect.h"
  27.  
  28. #define TYPE_FORMAT_STRING_SIZE   5                                 
  29. #define PROC_FORMAT_STRING_SIZE   13                                
  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: IDispatch, ver. 0.0,
  53.    GUID={0x00020400,0x0000,0x0000,{0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46}} */
  54.  
  55.  
  56. /* Object interface: IRandom, ver. 0.0,
  57.    GUID={0xCCE84211,0xDB31,0x11CF,{0x9D,0x75,0x00,0xA0,0xC9,0x03,0x91,0xD3}} */
  58.  
  59.  
  60. extern const MIDL_STUB_DESC Object_StubDesc;
  61.  
  62.  
  63. #pragma code_seg(".orpc")
  64.  
  65. /* [propget][id] */ HRESULT STDMETHODCALLTYPE IRandom_get_Start_Proxy( 
  66.     IRandom __RPC_FAR * This,
  67.     /* [retval][out] */ long __RPC_FAR *pnID)
  68. {
  69.  
  70.     HRESULT _RetVal;
  71.     
  72.     RPC_MESSAGE _RpcMessage;
  73.     
  74.     MIDL_STUB_MESSAGE _StubMsg;
  75.     
  76.     RpcTryExcept
  77.         {
  78.         NdrProxyInitialize(
  79.                       ( void __RPC_FAR *  )This,
  80.                       ( PRPC_MESSAGE  )&_RpcMessage,
  81.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  82.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  83.                       7);
  84.         
  85.         
  86.         
  87.         RpcTryFinally
  88.             {
  89.             
  90.             _StubMsg.BufferLength = 0U;
  91.             NdrProxyGetBuffer(This, &_StubMsg);
  92.             NdrProxySendReceive(This, &_StubMsg);
  93.             
  94.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  95.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  96.             
  97.             *pnID = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
  98.             
  99.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  100.             
  101.             }
  102.         RpcFinally
  103.             {
  104.             NdrProxyFreeBuffer(This, &_StubMsg);
  105.             
  106.             }
  107.         RpcEndFinally
  108.         
  109.         }
  110.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  111.         {
  112.         NdrClearOutParameters(
  113.                          ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  114.                          ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[0],
  115.                          ( void __RPC_FAR * )pnID);
  116.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  117.         }
  118.     RpcEndExcept
  119.     return _RetVal;
  120. }
  121.  
  122. void __RPC_STUB IRandom_get_Start_Stub(
  123.     IRpcStubBuffer *This,
  124.     IRpcChannelBuffer *_pRpcChannelBuffer,
  125.     PRPC_MESSAGE _pRpcMessage,
  126.     DWORD *_pdwStubPhase)
  127. {
  128.     long _M0;
  129.     HRESULT _RetVal;
  130.     MIDL_STUB_MESSAGE _StubMsg;
  131.     long __RPC_FAR *pnID;
  132.     
  133. NdrStubInitialize(
  134.                      _pRpcMessage,
  135.                      &_StubMsg,
  136.                      &Object_StubDesc,
  137.                      _pRpcChannelBuffer);
  138.     ( long __RPC_FAR * )pnID = 0;
  139.     RpcTryFinally
  140.         {
  141.         pnID = &_M0;
  142.         
  143.         *_pdwStubPhase = STUB_CALL_SERVER;
  144.         _RetVal = (((IRandom *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> get_Start((IRandom *) ((CStdStubBuffer *)This)->pvServerObject,pnID);
  145.         
  146.         *_pdwStubPhase = STUB_MARSHAL;
  147.         
  148.         _StubMsg.BufferLength = 4U + 4U;
  149.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  150.         *(( long __RPC_FAR * )_StubMsg.Buffer)++ = *pnID;
  151.         
  152.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  153.         
  154.         }
  155.     RpcFinally
  156.         {
  157.         }
  158.     RpcEndFinally
  159.     _pRpcMessage->BufferLength = 
  160.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  161.     
  162. }
  163.  
  164.  
  165. /* [propput][id] */ HRESULT STDMETHODCALLTYPE IRandom_put_Stop_Proxy( 
  166.     IRandom __RPC_FAR * This,
  167.     /* [in] */ long nID)
  168. {
  169.  
  170.     HRESULT _RetVal;
  171.     
  172.     RPC_MESSAGE _RpcMessage;
  173.     
  174.     MIDL_STUB_MESSAGE _StubMsg;
  175.     
  176.     RpcTryExcept
  177.         {
  178.         NdrProxyInitialize(
  179.                       ( void __RPC_FAR *  )This,
  180.                       ( PRPC_MESSAGE  )&_RpcMessage,
  181.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  182.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  183.                       8);
  184.         
  185.         
  186.         
  187.         RpcTryFinally
  188.             {
  189.             
  190.             _StubMsg.BufferLength = 4U;
  191.             NdrProxyGetBuffer(This, &_StubMsg);
  192.             *(( long __RPC_FAR * )_StubMsg.Buffer)++ = nID;
  193.             
  194.             NdrProxySendReceive(This, &_StubMsg);
  195.             
  196.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  197.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
  198.             
  199.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  200.             
  201.             }
  202.         RpcFinally
  203.             {
  204.             NdrProxyFreeBuffer(This, &_StubMsg);
  205.             
  206.             }
  207.         RpcEndFinally
  208.         
  209.         }
  210.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  211.         {
  212.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  213.         }
  214.     RpcEndExcept
  215.     return _RetVal;
  216. }
  217.  
  218. void __RPC_STUB IRandom_put_Stop_Stub(
  219.     IRpcStubBuffer *This,
  220.     IRpcChannelBuffer *_pRpcChannelBuffer,
  221.     PRPC_MESSAGE _pRpcMessage,
  222.     DWORD *_pdwStubPhase)
  223. {
  224.     HRESULT _RetVal;
  225.     MIDL_STUB_MESSAGE _StubMsg;
  226.     long nID;
  227.     
  228. NdrStubInitialize(
  229.                      _pRpcMessage,
  230.                      &_StubMsg,
  231.                      &Object_StubDesc,
  232.                      _pRpcChannelBuffer);
  233.     RpcTryFinally
  234.         {
  235.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  236.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
  237.         
  238.         nID = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
  239.         
  240.         
  241.         *_pdwStubPhase = STUB_CALL_SERVER;
  242.         _RetVal = (((IRandom *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> put_Stop((IRandom *) ((CStdStubBuffer *)This)->pvServerObject,nID);
  243.         
  244.         *_pdwStubPhase = STUB_MARSHAL;
  245.         
  246.         _StubMsg.BufferLength = 4U;
  247.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  248.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  249.         
  250.         }
  251.     RpcFinally
  252.         {
  253.         }
  254.     RpcEndFinally
  255.     _pRpcMessage->BufferLength = 
  256.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  257.     
  258. }
  259.  
  260.  
  261. /* [id] */ HRESULT STDMETHODCALLTYPE IRandom_StopAll_Proxy( 
  262.     IRandom __RPC_FAR * This)
  263. {
  264.  
  265.     HRESULT _RetVal;
  266.     
  267.     RPC_MESSAGE _RpcMessage;
  268.     
  269.     MIDL_STUB_MESSAGE _StubMsg;
  270.     
  271.     RpcTryExcept
  272.         {
  273.         NdrProxyInitialize(
  274.                       ( void __RPC_FAR *  )This,
  275.                       ( PRPC_MESSAGE  )&_RpcMessage,
  276.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  277.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  278.                       9);
  279.         
  280.         
  281.         
  282.         RpcTryFinally
  283.             {
  284.             
  285.             _StubMsg.BufferLength = 0U;
  286.             NdrProxyGetBuffer(This, &_StubMsg);
  287.             NdrProxySendReceive(This, &_StubMsg);
  288.             
  289.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  290.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[10] );
  291.             
  292.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  293.             
  294.             }
  295.         RpcFinally
  296.             {
  297.             NdrProxyFreeBuffer(This, &_StubMsg);
  298.             
  299.             }
  300.         RpcEndFinally
  301.         
  302.         }
  303.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  304.         {
  305.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  306.         }
  307.     RpcEndExcept
  308.     return _RetVal;
  309. }
  310.  
  311. void __RPC_STUB IRandom_StopAll_Stub(
  312.     IRpcStubBuffer *This,
  313.     IRpcChannelBuffer *_pRpcChannelBuffer,
  314.     PRPC_MESSAGE _pRpcMessage,
  315.     DWORD *_pdwStubPhase)
  316. {
  317.     HRESULT _RetVal;
  318.     MIDL_STUB_MESSAGE _StubMsg;
  319.     
  320. NdrStubInitialize(
  321.                      _pRpcMessage,
  322.                      &_StubMsg,
  323.                      &Object_StubDesc,
  324.                      _pRpcChannelBuffer);
  325.     RpcTryFinally
  326.         {
  327.         
  328.         *_pdwStubPhase = STUB_CALL_SERVER;
  329.         _RetVal = (((IRandom *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> StopAll((IRandom *) ((CStdStubBuffer *)This)->pvServerObject);
  330.         
  331.         *_pdwStubPhase = STUB_MARSHAL;
  332.         
  333.         _StubMsg.BufferLength = 4U;
  334.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  335.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  336.         
  337.         }
  338.     RpcFinally
  339.         {
  340.         }
  341.     RpcEndFinally
  342.     _pRpcMessage->BufferLength = 
  343.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  344.     
  345. }
  346.  
  347. CINTERFACE_PROXY_VTABLE(10) _IRandomProxyVtbl = 
  348. {
  349.     &IID_IRandom,
  350.     IUnknown_QueryInterface_Proxy,
  351.     IUnknown_AddRef_Proxy,
  352.     IUnknown_Release_Proxy ,
  353.     0 /* IDispatch_GetTypeInfoCount_Proxy */ ,
  354.     0 /* IDispatch_GetTypeInfo_Proxy */ ,
  355.     0 /* IDispatch_GetIDsOfNames_Proxy */ ,
  356.     0 /* IDispatch_Invoke_Proxy */ ,
  357.     IRandom_get_Start_Proxy ,
  358.     IRandom_put_Stop_Proxy ,
  359.     IRandom_StopAll_Proxy
  360. };
  361.  
  362.  
  363. static const PRPC_STUB_FUNCTION IRandom_table[] =
  364. {
  365.     STUB_FORWARDING_FUNCTION,
  366.     STUB_FORWARDING_FUNCTION,
  367.     STUB_FORWARDING_FUNCTION,
  368.     STUB_FORWARDING_FUNCTION,
  369.     IRandom_get_Start_Stub,
  370.     IRandom_put_Stop_Stub,
  371.     IRandom_StopAll_Stub
  372. };
  373.  
  374. CInterfaceStubVtbl _IRandomStubVtbl =
  375. {
  376.     &IID_IRandom,
  377.     0,
  378.     10,
  379.     &IRandom_table[-3],
  380.     CStdStubBuffer_DELEGATING_METHODS
  381. };
  382.  
  383.  
  384. /* Object interface: IRandomEvent, ver. 0.0,
  385.    GUID={0xCCE84212,0xDB31,0x11CF,{0x9D,0x75,0x00,0xA0,0xC9,0x03,0x91,0xD3}} */
  386.  
  387.  
  388. extern const MIDL_STUB_DESC Object_StubDesc;
  389.  
  390.  
  391. #pragma code_seg(".orpc")
  392.  
  393. /* [propput][id] */ HRESULT STDMETHODCALLTYPE IRandomEvent_put_Fire_Proxy( 
  394.     IRandomEvent __RPC_FAR * This,
  395.     /* [in] */ long nID)
  396. {
  397.  
  398.     HRESULT _RetVal;
  399.     
  400.     RPC_MESSAGE _RpcMessage;
  401.     
  402.     MIDL_STUB_MESSAGE _StubMsg;
  403.     
  404.     RpcTryExcept
  405.         {
  406.         NdrProxyInitialize(
  407.                       ( void __RPC_FAR *  )This,
  408.                       ( PRPC_MESSAGE  )&_RpcMessage,
  409.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  410.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  411.                       7);
  412.         
  413.         
  414.         
  415.         RpcTryFinally
  416.             {
  417.             
  418.             _StubMsg.BufferLength = 4U;
  419.             NdrProxyGetBuffer(This, &_StubMsg);
  420.             *(( long __RPC_FAR * )_StubMsg.Buffer)++ = nID;
  421.             
  422.             NdrProxySendReceive(This, &_StubMsg);
  423.             
  424.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  425.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
  426.             
  427.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  428.             
  429.             }
  430.         RpcFinally
  431.             {
  432.             NdrProxyFreeBuffer(This, &_StubMsg);
  433.             
  434.             }
  435.         RpcEndFinally
  436.         
  437.         }
  438.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  439.         {
  440.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  441.         }
  442.     RpcEndExcept
  443.     return _RetVal;
  444. }
  445.  
  446. void __RPC_STUB IRandomEvent_put_Fire_Stub(
  447.     IRpcStubBuffer *This,
  448.     IRpcChannelBuffer *_pRpcChannelBuffer,
  449.     PRPC_MESSAGE _pRpcMessage,
  450.     DWORD *_pdwStubPhase)
  451. {
  452.     HRESULT _RetVal;
  453.     MIDL_STUB_MESSAGE _StubMsg;
  454.     long nID;
  455.     
  456. NdrStubInitialize(
  457.                      _pRpcMessage,
  458.                      &_StubMsg,
  459.                      &Object_StubDesc,
  460.                      _pRpcChannelBuffer);
  461.     RpcTryFinally
  462.         {
  463.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  464.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
  465.         
  466.         nID = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
  467.         
  468.         
  469.         *_pdwStubPhase = STUB_CALL_SERVER;
  470.         _RetVal = (((IRandomEvent *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> put_Fire((IRandomEvent *) ((CStdStubBuffer *)This)->pvServerObject,nID);
  471.         
  472.         *_pdwStubPhase = STUB_MARSHAL;
  473.         
  474.         _StubMsg.BufferLength = 4U;
  475.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  476.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  477.         
  478.         }
  479.     RpcFinally
  480.         {
  481.         }
  482.     RpcEndFinally
  483.     _pRpcMessage->BufferLength = 
  484.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  485.     
  486. }
  487.  
  488.  
  489. /* [propput][id] */ HRESULT STDMETHODCALLTYPE IRandomEvent_put_ID_Proxy( 
  490.     IRandomEvent __RPC_FAR * This,
  491.     /* [in] */ int n)
  492. {
  493.  
  494.     HRESULT _RetVal;
  495.     
  496.     RPC_MESSAGE _RpcMessage;
  497.     
  498.     MIDL_STUB_MESSAGE _StubMsg;
  499.     
  500.     RpcTryExcept
  501.         {
  502.         NdrProxyInitialize(
  503.                       ( void __RPC_FAR *  )This,
  504.                       ( PRPC_MESSAGE  )&_RpcMessage,
  505.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  506.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  507.                       8);
  508.         
  509.         
  510.         
  511.         RpcTryFinally
  512.             {
  513.             
  514.             _StubMsg.BufferLength = 4U;
  515.             NdrProxyGetBuffer(This, &_StubMsg);
  516.             *(( int __RPC_FAR * )_StubMsg.Buffer)++ = n;
  517.             
  518.             NdrProxySendReceive(This, &_StubMsg);
  519.             
  520.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  521.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
  522.             
  523.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  524.             
  525.             }
  526.         RpcFinally
  527.             {
  528.             NdrProxyFreeBuffer(This, &_StubMsg);
  529.             
  530.             }
  531.         RpcEndFinally
  532.         
  533.         }
  534.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  535.         {
  536.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  537.         }
  538.     RpcEndExcept
  539.     return _RetVal;
  540. }
  541.  
  542. void __RPC_STUB IRandomEvent_put_ID_Stub(
  543.     IRpcStubBuffer *This,
  544.     IRpcChannelBuffer *_pRpcChannelBuffer,
  545.     PRPC_MESSAGE _pRpcMessage,
  546.     DWORD *_pdwStubPhase)
  547. {
  548.     HRESULT _RetVal;
  549.     MIDL_STUB_MESSAGE _StubMsg;
  550.     int n;
  551.     
  552. NdrStubInitialize(
  553.                      _pRpcMessage,
  554.                      &_StubMsg,
  555.                      &Object_StubDesc,
  556.                      _pRpcChannelBuffer);
  557.     RpcTryFinally
  558.         {
  559.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  560.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[6] );
  561.         
  562.         n = *(( int __RPC_FAR * )_StubMsg.Buffer)++;
  563.         
  564.         
  565.         *_pdwStubPhase = STUB_CALL_SERVER;
  566.         _RetVal = (((IRandomEvent *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> put_ID((IRandomEvent *) ((CStdStubBuffer *)This)->pvServerObject,n);
  567.         
  568.         *_pdwStubPhase = STUB_MARSHAL;
  569.         
  570.         _StubMsg.BufferLength = 4U;
  571.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  572.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  573.         
  574.         }
  575.     RpcFinally
  576.         {
  577.         }
  578.     RpcEndFinally
  579.     _pRpcMessage->BufferLength = 
  580.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  581.     
  582. }
  583.  
  584.  
  585. static const MIDL_STUB_DESC Object_StubDesc = 
  586.     {
  587.     0,
  588.     NdrOleAllocate,
  589.     NdrOleFree,
  590.     0,
  591.     0,
  592.     0,
  593.     0,
  594.     0,
  595.     __MIDL_TypeFormatString.Format,
  596.     0, /* -error bounds_check flag */
  597.     0x20000, /* Ndr library version */
  598.     0,
  599.     0x303006e, /* MIDL Version 3.3.110 */
  600.     0,
  601.     0,
  602.     0,  /* Reserved1 */
  603.     0,  /* Reserved2 */
  604.     0,  /* Reserved3 */
  605.     0,  /* Reserved4 */
  606.     0   /* Reserved5 */
  607.     };
  608.  
  609. CINTERFACE_PROXY_VTABLE(9) _IRandomEventProxyVtbl = 
  610. {
  611.     &IID_IRandomEvent,
  612.     IUnknown_QueryInterface_Proxy,
  613.     IUnknown_AddRef_Proxy,
  614.     IUnknown_Release_Proxy ,
  615.     0 /* IDispatch_GetTypeInfoCount_Proxy */ ,
  616.     0 /* IDispatch_GetTypeInfo_Proxy */ ,
  617.     0 /* IDispatch_GetIDsOfNames_Proxy */ ,
  618.     0 /* IDispatch_Invoke_Proxy */ ,
  619.     IRandomEvent_put_Fire_Proxy ,
  620.     IRandomEvent_put_ID_Proxy
  621. };
  622.  
  623.  
  624. static const PRPC_STUB_FUNCTION IRandomEvent_table[] =
  625. {
  626.     STUB_FORWARDING_FUNCTION,
  627.     STUB_FORWARDING_FUNCTION,
  628.     STUB_FORWARDING_FUNCTION,
  629.     STUB_FORWARDING_FUNCTION,
  630.     IRandomEvent_put_Fire_Stub,
  631.     IRandomEvent_put_ID_Stub
  632. };
  633.  
  634. CInterfaceStubVtbl _IRandomEventStubVtbl =
  635. {
  636.     &IID_IRandomEvent,
  637.     0,
  638.     9,
  639.     &IRandomEvent_table[-3],
  640.     CStdStubBuffer_DELEGATING_METHODS
  641. };
  642.  
  643. #pragma data_seg(".rdata")
  644.  
  645. #if !defined(__RPC_WIN32__)
  646. #error  Invalid build platform for this stub.
  647. #endif
  648.  
  649. #if !(TARGET_IS_NT40_OR_LATER)
  650. #error You need a Windows NT 4.0 or later to run this stub because it uses these features:
  651. #error   more than 32 methods in the interface.
  652. #error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
  653. #error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
  654. #endif
  655.  
  656.  
  657. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  658.     {
  659.         0,
  660.         {
  661.             
  662.             0x51,        /* FC_OUT_PARAM */
  663. #ifndef _ALPHA_
  664.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  665. #else
  666.             0x2,        /* Alpha Stack size = 2 */
  667. #endif
  668. /*  2 */    NdrFcShort( 0x0 ),    /* Type Offset=0 */
  669. /*  4 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  670.             0x8,        /* FC_LONG */
  671. /*  6 */    0x4e,        /* FC_IN_PARAM_BASETYPE */
  672.             0x8,        /* FC_LONG */
  673. /*  8 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  674.             0x8,        /* FC_LONG */
  675. /* 10 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  676.             0x8,        /* FC_LONG */
  677.  
  678.             0x0
  679.         }
  680.     };
  681.  
  682. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  683.     {
  684.         0,
  685.         {
  686.             0x11, 0xc,    /* FC_RP [alloced_on_stack] [simple_pointer] */
  687. /*  2 */    0x8,        /* FC_LONG */
  688.             0x5c,        /* FC_PAD */
  689.  
  690.             0x0
  691.         }
  692.     };
  693.  
  694. const CInterfaceProxyVtbl * _Connect_ProxyVtblList[] = 
  695. {
  696.     ( CInterfaceProxyVtbl *) &_IRandomProxyVtbl,
  697.     ( CInterfaceProxyVtbl *) &_IRandomEventProxyVtbl,
  698.     0
  699. };
  700.  
  701. const CInterfaceStubVtbl * _Connect_StubVtblList[] = 
  702. {
  703.     ( CInterfaceStubVtbl *) &_IRandomStubVtbl,
  704.     ( CInterfaceStubVtbl *) &_IRandomEventStubVtbl,
  705.     0
  706. };
  707.  
  708. PCInterfaceName const _Connect_InterfaceNamesList[] = 
  709. {
  710.     "IRandom",
  711.     "IRandomEvent",
  712.     0
  713. };
  714.  
  715. const IID *  _Connect_BaseIIDList[] = 
  716. {
  717.     &IID_IDispatch,
  718.     &IID_IDispatch,
  719.     0
  720. };
  721.  
  722.  
  723. #define _Connect_CHECK_IID(n)    IID_GENERIC_CHECK_IID( _Connect, pIID, n)
  724.  
  725. int __stdcall _Connect_IID_Lookup( const IID * pIID, int * pIndex )
  726. {
  727.     IID_BS_LOOKUP_SETUP
  728.  
  729.     IID_BS_LOOKUP_INITIAL_TEST( _Connect, 2, 1 )
  730.     IID_BS_LOOKUP_RETURN_RESULT( _Connect, 2, *pIndex )
  731.     
  732. }
  733.  
  734. const ExtendedProxyFileInfo Connect_ProxyFileInfo = 
  735. {
  736.     (PCInterfaceProxyVtblList *) & _Connect_ProxyVtblList,
  737.     (PCInterfaceStubVtblList *) & _Connect_StubVtblList,
  738.     (const PCInterfaceName * ) & _Connect_InterfaceNamesList,
  739.     (const IID ** ) & _Connect_BaseIIDList,
  740.     & _Connect_IID_Lookup, 
  741.     2,
  742.     1
  743. };
  744.