home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / com / commap / commap_p.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-03  |  28.5 KB  |  959 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 Thu Feb 26 16:14:11 1998
  6.  */
  7. /* Compiler settings for COMMap.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 "COMMap.h"
  27.  
  28. #define TYPE_FORMAT_STRING_SIZE   81                                
  29. #define PROC_FORMAT_STRING_SIZE   27                                
  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: IOuter, ver. 0.0,
  57.    GUID={0x4F9A68EF,0xDD9D,0x11CF,{0x94,0x62,0x00,0xAA,0x00,0xBB,0xAD,0x7F}} */
  58.  
  59.  
  60. extern const MIDL_STUB_DESC Object_StubDesc;
  61.  
  62.  
  63. #pragma code_seg(".orpc")
  64.  
  65. /* [id] */ HRESULT STDMETHODCALLTYPE IOuter_GetName_Proxy( 
  66.     IOuter __RPC_FAR * This,
  67.     /* [in] */ short n,
  68.     /* [retval][out] */ BSTR __RPC_FAR *pbstrName)
  69. {
  70.  
  71.     HRESULT _RetVal;
  72.     
  73.     RPC_MESSAGE _RpcMessage;
  74.     
  75.     MIDL_STUB_MESSAGE _StubMsg;
  76.     
  77.     MIDL_memset(
  78.                pbstrName,
  79.                0,
  80.                sizeof( BSTR  ));
  81.     RpcTryExcept
  82.         {
  83.         NdrProxyInitialize(
  84.                       ( void __RPC_FAR *  )This,
  85.                       ( PRPC_MESSAGE  )&_RpcMessage,
  86.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  87.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  88.                       7);
  89.         
  90.         
  91.         
  92.         RpcTryFinally
  93.             {
  94.             
  95.             _StubMsg.BufferLength = 2U;
  96.             NdrProxyGetBuffer(This, &_StubMsg);
  97.             *(( short __RPC_FAR * )_StubMsg.Buffer)++ = n;
  98.             
  99.             NdrProxySendReceive(This, &_StubMsg);
  100.             
  101.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  102.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  103.             
  104.             NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  105.                                       (unsigned char __RPC_FAR * __RPC_FAR *)&pbstrName,
  106.                                       (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[28],
  107.                                       (unsigned char)0 );
  108.             
  109.             _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  110.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  111.             
  112.             }
  113.         RpcFinally
  114.             {
  115.             NdrProxyFreeBuffer(This, &_StubMsg);
  116.             
  117.             }
  118.         RpcEndFinally
  119.         
  120.         }
  121.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  122.         {
  123.         NdrClearOutParameters(
  124.                          ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  125.                          ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[0],
  126.                          ( void __RPC_FAR * )pbstrName);
  127.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  128.         }
  129.     RpcEndExcept
  130.     return _RetVal;
  131. }
  132.  
  133. void __RPC_STUB IOuter_GetName_Stub(
  134.     IRpcStubBuffer *This,
  135.     IRpcChannelBuffer *_pRpcChannelBuffer,
  136.     PRPC_MESSAGE _pRpcMessage,
  137.     DWORD *_pdwStubPhase)
  138. {
  139.     BSTR _M0;
  140.     HRESULT _RetVal;
  141.     MIDL_STUB_MESSAGE _StubMsg;
  142.     short n;
  143.     BSTR __RPC_FAR *pbstrName;
  144.     
  145. NdrStubInitialize(
  146.                      _pRpcMessage,
  147.                      &_StubMsg,
  148.                      &Object_StubDesc,
  149.                      _pRpcChannelBuffer);
  150.     ( BSTR __RPC_FAR * )pbstrName = 0;
  151.     RpcTryFinally
  152.         {
  153.         if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  154.             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
  155.         
  156.         n = *(( short __RPC_FAR * )_StubMsg.Buffer)++;
  157.         
  158.         pbstrName = &_M0;
  159.         MIDL_memset(
  160.                pbstrName,
  161.                0,
  162.                sizeof( BSTR  ));
  163.         
  164.         *_pdwStubPhase = STUB_CALL_SERVER;
  165.         _RetVal = (((IOuter *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> GetName(
  166.            (IOuter *) ((CStdStubBuffer *)This)->pvServerObject,
  167.            n,
  168.            pbstrName);
  169.         
  170.         *_pdwStubPhase = STUB_MARSHAL;
  171.         
  172.         _StubMsg.BufferLength = 4U + 11U;
  173.         NdrUserMarshalBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  174.                                   (unsigned char __RPC_FAR *)pbstrName,
  175.                                   (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[28] );
  176.         
  177.         _StubMsg.BufferLength += 16;
  178.         
  179.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  180.         NdrUserMarshalMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  181.                                 (unsigned char __RPC_FAR *)pbstrName,
  182.                                 (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[28] );
  183.         
  184.         _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  185.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  186.         
  187.         }
  188.     RpcFinally
  189.         {
  190.         NdrPointerFree( &_StubMsg,
  191.                         (unsigned char __RPC_FAR *)pbstrName,
  192.                         &__MIDL_TypeFormatString.Format[0] );
  193.         
  194.         }
  195.     RpcEndFinally
  196.     _pRpcMessage->BufferLength = 
  197.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  198.     
  199. }
  200.  
  201. CINTERFACE_PROXY_VTABLE(8) _IOuterProxyVtbl = 
  202. {
  203.     &IID_IOuter,
  204.     IUnknown_QueryInterface_Proxy,
  205.     IUnknown_AddRef_Proxy,
  206.     IUnknown_Release_Proxy ,
  207.     0 /* IDispatch_GetTypeInfoCount_Proxy */ ,
  208.     0 /* IDispatch_GetTypeInfo_Proxy */ ,
  209.     0 /* IDispatch_GetIDsOfNames_Proxy */ ,
  210.     0 /* IDispatch_Invoke_Proxy */ ,
  211.     IOuter_GetName_Proxy
  212. };
  213.  
  214.  
  215. static const PRPC_STUB_FUNCTION IOuter_table[] =
  216. {
  217.     STUB_FORWARDING_FUNCTION,
  218.     STUB_FORWARDING_FUNCTION,
  219.     STUB_FORWARDING_FUNCTION,
  220.     STUB_FORWARDING_FUNCTION,
  221.     IOuter_GetName_Stub
  222. };
  223.  
  224. CInterfaceStubVtbl _IOuterStubVtbl =
  225. {
  226.     &IID_IOuter,
  227.     0,
  228.     8,
  229.     &IOuter_table[-3],
  230.     CStdStubBuffer_DELEGATING_METHODS
  231. };
  232.  
  233.  
  234. /* Object interface: ITearOff1, ver. 0.0,
  235.    GUID={0x9B8A71F7,0xDB54,0x11CF,{0x94,0x62,0x00,0xAA,0x00,0xBB,0xAD,0x7F}} */
  236.  
  237.  
  238. extern const MIDL_STUB_DESC Object_StubDesc;
  239.  
  240.  
  241. #pragma code_seg(".orpc")
  242.  
  243. /* [id][propget] */ HRESULT STDMETHODCALLTYPE ITearOff1_get_Name_Proxy( 
  244.     ITearOff1 __RPC_FAR * This,
  245.     /* [retval][out] */ BSTR __RPC_FAR *pbstrName)
  246. {
  247.  
  248.     HRESULT _RetVal;
  249.     
  250.     RPC_MESSAGE _RpcMessage;
  251.     
  252.     MIDL_STUB_MESSAGE _StubMsg;
  253.     
  254.     MIDL_memset(
  255.                pbstrName,
  256.                0,
  257.                sizeof( BSTR  ));
  258.     RpcTryExcept
  259.         {
  260.         NdrProxyInitialize(
  261.                       ( void __RPC_FAR *  )This,
  262.                       ( PRPC_MESSAGE  )&_RpcMessage,
  263.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  264.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  265.                       7);
  266.         
  267.         
  268.         
  269.         RpcTryFinally
  270.             {
  271.             
  272.             _StubMsg.BufferLength = 0U;
  273.             NdrProxyGetBuffer(This, &_StubMsg);
  274.             NdrProxySendReceive(This, &_StubMsg);
  275.             
  276.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  277.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[8] );
  278.             
  279.             NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  280.                                       (unsigned char __RPC_FAR * __RPC_FAR *)&pbstrName,
  281.                                       (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[42],
  282.                                       (unsigned char)0 );
  283.             
  284.             _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  285.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  286.             
  287.             }
  288.         RpcFinally
  289.             {
  290.             NdrProxyFreeBuffer(This, &_StubMsg);
  291.             
  292.             }
  293.         RpcEndFinally
  294.         
  295.         }
  296.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  297.         {
  298.         NdrClearOutParameters(
  299.                          ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  300.                          ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[38],
  301.                          ( void __RPC_FAR * )pbstrName);
  302.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  303.         }
  304.     RpcEndExcept
  305.     return _RetVal;
  306. }
  307.  
  308. void __RPC_STUB ITearOff1_get_Name_Stub(
  309.     IRpcStubBuffer *This,
  310.     IRpcChannelBuffer *_pRpcChannelBuffer,
  311.     PRPC_MESSAGE _pRpcMessage,
  312.     DWORD *_pdwStubPhase)
  313. {
  314.     BSTR _M1;
  315.     HRESULT _RetVal;
  316.     MIDL_STUB_MESSAGE _StubMsg;
  317.     BSTR __RPC_FAR *pbstrName;
  318.     
  319. NdrStubInitialize(
  320.                      _pRpcMessage,
  321.                      &_StubMsg,
  322.                      &Object_StubDesc,
  323.                      _pRpcChannelBuffer);
  324.     ( BSTR __RPC_FAR * )pbstrName = 0;
  325.     RpcTryFinally
  326.         {
  327.         pbstrName = &_M1;
  328.         MIDL_memset(
  329.                pbstrName,
  330.                0,
  331.                sizeof( BSTR  ));
  332.         
  333.         *_pdwStubPhase = STUB_CALL_SERVER;
  334.         _RetVal = (((ITearOff1 *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> get_Name((ITearOff1 *) ((CStdStubBuffer *)This)->pvServerObject,pbstrName);
  335.         
  336.         *_pdwStubPhase = STUB_MARSHAL;
  337.         
  338.         _StubMsg.BufferLength = 4U + 11U;
  339.         NdrUserMarshalBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  340.                                   (unsigned char __RPC_FAR *)pbstrName,
  341.                                   (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[42] );
  342.         
  343.         _StubMsg.BufferLength += 16;
  344.         
  345.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  346.         NdrUserMarshalMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  347.                                 (unsigned char __RPC_FAR *)pbstrName,
  348.                                 (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[42] );
  349.         
  350.         _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  351.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  352.         
  353.         }
  354.     RpcFinally
  355.         {
  356.         NdrPointerFree( &_StubMsg,
  357.                         (unsigned char __RPC_FAR *)pbstrName,
  358.                         &__MIDL_TypeFormatString.Format[38] );
  359.         
  360.         }
  361.     RpcEndFinally
  362.     _pRpcMessage->BufferLength = 
  363.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  364.     
  365. }
  366.  
  367. CINTERFACE_PROXY_VTABLE(8) _ITearOff1ProxyVtbl = 
  368. {
  369.     &IID_ITearOff1,
  370.     IUnknown_QueryInterface_Proxy,
  371.     IUnknown_AddRef_Proxy,
  372.     IUnknown_Release_Proxy ,
  373.     0 /* IDispatch_GetTypeInfoCount_Proxy */ ,
  374.     0 /* IDispatch_GetTypeInfo_Proxy */ ,
  375.     0 /* IDispatch_GetIDsOfNames_Proxy */ ,
  376.     0 /* IDispatch_Invoke_Proxy */ ,
  377.     ITearOff1_get_Name_Proxy
  378. };
  379.  
  380.  
  381. static const PRPC_STUB_FUNCTION ITearOff1_table[] =
  382. {
  383.     STUB_FORWARDING_FUNCTION,
  384.     STUB_FORWARDING_FUNCTION,
  385.     STUB_FORWARDING_FUNCTION,
  386.     STUB_FORWARDING_FUNCTION,
  387.     ITearOff1_get_Name_Stub
  388. };
  389.  
  390. CInterfaceStubVtbl _ITearOff1StubVtbl =
  391. {
  392.     &IID_ITearOff1,
  393.     0,
  394.     8,
  395.     &ITearOff1_table[-3],
  396.     CStdStubBuffer_DELEGATING_METHODS
  397. };
  398.  
  399.  
  400. /* Object interface: ITearOff2, ver. 0.0,
  401.    GUID={0x9B8A71F8,0xDB54,0x11CF,{0x94,0x62,0x00,0xAA,0x00,0xBB,0xAD,0x7F}} */
  402.  
  403.  
  404. extern const MIDL_STUB_DESC Object_StubDesc;
  405.  
  406.  
  407. #pragma code_seg(".orpc")
  408.  
  409. /* [id][propget] */ HRESULT STDMETHODCALLTYPE ITearOff2_get_Name_Proxy( 
  410.     ITearOff2 __RPC_FAR * This,
  411.     /* [retval][out] */ BSTR __RPC_FAR *pbstrName)
  412. {
  413.  
  414.     HRESULT _RetVal;
  415.     
  416.     RPC_MESSAGE _RpcMessage;
  417.     
  418.     MIDL_STUB_MESSAGE _StubMsg;
  419.     
  420.     MIDL_memset(
  421.                pbstrName,
  422.                0,
  423.                sizeof( BSTR  ));
  424.     RpcTryExcept
  425.         {
  426.         NdrProxyInitialize(
  427.                       ( void __RPC_FAR *  )This,
  428.                       ( PRPC_MESSAGE  )&_RpcMessage,
  429.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  430.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  431.                       7);
  432.         
  433.         
  434.         
  435.         RpcTryFinally
  436.             {
  437.             
  438.             _StubMsg.BufferLength = 0U;
  439.             NdrProxyGetBuffer(This, &_StubMsg);
  440.             NdrProxySendReceive(This, &_StubMsg);
  441.             
  442.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  443.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[14] );
  444.             
  445.             NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  446.                                       (unsigned char __RPC_FAR * __RPC_FAR *)&pbstrName,
  447.                                       (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[56],
  448.                                       (unsigned char)0 );
  449.             
  450.             _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  451.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  452.             
  453.             }
  454.         RpcFinally
  455.             {
  456.             NdrProxyFreeBuffer(This, &_StubMsg);
  457.             
  458.             }
  459.         RpcEndFinally
  460.         
  461.         }
  462.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  463.         {
  464.         NdrClearOutParameters(
  465.                          ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  466.                          ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[52],
  467.                          ( void __RPC_FAR * )pbstrName);
  468.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  469.         }
  470.     RpcEndExcept
  471.     return _RetVal;
  472. }
  473.  
  474. void __RPC_STUB ITearOff2_get_Name_Stub(
  475.     IRpcStubBuffer *This,
  476.     IRpcChannelBuffer *_pRpcChannelBuffer,
  477.     PRPC_MESSAGE _pRpcMessage,
  478.     DWORD *_pdwStubPhase)
  479. {
  480.     BSTR _M2;
  481.     HRESULT _RetVal;
  482.     MIDL_STUB_MESSAGE _StubMsg;
  483.     BSTR __RPC_FAR *pbstrName;
  484.     
  485. NdrStubInitialize(
  486.                      _pRpcMessage,
  487.                      &_StubMsg,
  488.                      &Object_StubDesc,
  489.                      _pRpcChannelBuffer);
  490.     ( BSTR __RPC_FAR * )pbstrName = 0;
  491.     RpcTryFinally
  492.         {
  493.         pbstrName = &_M2;
  494.         MIDL_memset(
  495.                pbstrName,
  496.                0,
  497.                sizeof( BSTR  ));
  498.         
  499.         *_pdwStubPhase = STUB_CALL_SERVER;
  500.         _RetVal = (((ITearOff2 *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> get_Name((ITearOff2 *) ((CStdStubBuffer *)This)->pvServerObject,pbstrName);
  501.         
  502.         *_pdwStubPhase = STUB_MARSHAL;
  503.         
  504.         _StubMsg.BufferLength = 4U + 11U;
  505.         NdrUserMarshalBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  506.                                   (unsigned char __RPC_FAR *)pbstrName,
  507.                                   (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[56] );
  508.         
  509.         _StubMsg.BufferLength += 16;
  510.         
  511.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  512.         NdrUserMarshalMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  513.                                 (unsigned char __RPC_FAR *)pbstrName,
  514.                                 (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[56] );
  515.         
  516.         _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  517.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  518.         
  519.         }
  520.     RpcFinally
  521.         {
  522.         NdrPointerFree( &_StubMsg,
  523.                         (unsigned char __RPC_FAR *)pbstrName,
  524.                         &__MIDL_TypeFormatString.Format[52] );
  525.         
  526.         }
  527.     RpcEndFinally
  528.     _pRpcMessage->BufferLength = 
  529.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  530.     
  531. }
  532.  
  533. CINTERFACE_PROXY_VTABLE(8) _ITearOff2ProxyVtbl = 
  534. {
  535.     &IID_ITearOff2,
  536.     IUnknown_QueryInterface_Proxy,
  537.     IUnknown_AddRef_Proxy,
  538.     IUnknown_Release_Proxy ,
  539.     0 /* IDispatch_GetTypeInfoCount_Proxy */ ,
  540.     0 /* IDispatch_GetTypeInfo_Proxy */ ,
  541.     0 /* IDispatch_GetIDsOfNames_Proxy */ ,
  542.     0 /* IDispatch_Invoke_Proxy */ ,
  543.     ITearOff2_get_Name_Proxy
  544. };
  545.  
  546.  
  547. static const PRPC_STUB_FUNCTION ITearOff2_table[] =
  548. {
  549.     STUB_FORWARDING_FUNCTION,
  550.     STUB_FORWARDING_FUNCTION,
  551.     STUB_FORWARDING_FUNCTION,
  552.     STUB_FORWARDING_FUNCTION,
  553.     ITearOff2_get_Name_Stub
  554. };
  555.  
  556. CInterfaceStubVtbl _ITearOff2StubVtbl =
  557. {
  558.     &IID_ITearOff2,
  559.     0,
  560.     8,
  561.     &ITearOff2_table[-3],
  562.     CStdStubBuffer_DELEGATING_METHODS
  563. };
  564.  
  565.  
  566. /* Object interface: IChain, ver. 0.0,
  567.    GUID={0x4F9A68F4,0xDD9D,0x11CF,{0x94,0x62,0x00,0xAA,0x00,0xBB,0xAD,0x7F}} */
  568.  
  569.  
  570. extern const MIDL_STUB_DESC Object_StubDesc;
  571.  
  572.  
  573. #pragma code_seg(".orpc")
  574.  
  575. /* [id][propget] */ HRESULT STDMETHODCALLTYPE IChain_get_Name2_Proxy( 
  576.     IChain __RPC_FAR * This,
  577.     /* [retval][out] */ BSTR __RPC_FAR *pbstrName)
  578. {
  579.  
  580.     HRESULT _RetVal;
  581.     
  582.     RPC_MESSAGE _RpcMessage;
  583.     
  584.     MIDL_STUB_MESSAGE _StubMsg;
  585.     
  586.     MIDL_memset(
  587.                pbstrName,
  588.                0,
  589.                sizeof( BSTR  ));
  590.     RpcTryExcept
  591.         {
  592.         NdrProxyInitialize(
  593.                       ( void __RPC_FAR *  )This,
  594.                       ( PRPC_MESSAGE  )&_RpcMessage,
  595.                       ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  596.                       ( PMIDL_STUB_DESC  )&Object_StubDesc,
  597.                       7);
  598.         
  599.         
  600.         
  601.         RpcTryFinally
  602.             {
  603.             
  604.             _StubMsg.BufferLength = 0U;
  605.             NdrProxyGetBuffer(This, &_StubMsg);
  606.             NdrProxySendReceive(This, &_StubMsg);
  607.             
  608.             if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  609.                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[20] );
  610.             
  611.             NdrUserMarshalUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  612.                                       (unsigned char __RPC_FAR * __RPC_FAR *)&pbstrName,
  613.                                       (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[70],
  614.                                       (unsigned char)0 );
  615.             
  616.             _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  617.             _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  618.             
  619.             }
  620.         RpcFinally
  621.             {
  622.             NdrProxyFreeBuffer(This, &_StubMsg);
  623.             
  624.             }
  625.         RpcEndFinally
  626.         
  627.         }
  628.     RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  629.         {
  630.         NdrClearOutParameters(
  631.                          ( PMIDL_STUB_MESSAGE  )&_StubMsg,
  632.                          ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[66],
  633.                          ( void __RPC_FAR * )pbstrName);
  634.         _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
  635.         }
  636.     RpcEndExcept
  637.     return _RetVal;
  638. }
  639.  
  640. void __RPC_STUB IChain_get_Name2_Stub(
  641.     IRpcStubBuffer *This,
  642.     IRpcChannelBuffer *_pRpcChannelBuffer,
  643.     PRPC_MESSAGE _pRpcMessage,
  644.     DWORD *_pdwStubPhase)
  645. {
  646.     BSTR _M3;
  647.     HRESULT _RetVal;
  648.     MIDL_STUB_MESSAGE _StubMsg;
  649.     BSTR __RPC_FAR *pbstrName;
  650.     
  651. NdrStubInitialize(
  652.                      _pRpcMessage,
  653.                      &_StubMsg,
  654.                      &Object_StubDesc,
  655.                      _pRpcChannelBuffer);
  656.     ( BSTR __RPC_FAR * )pbstrName = 0;
  657.     RpcTryFinally
  658.         {
  659.         pbstrName = &_M3;
  660.         MIDL_memset(
  661.                pbstrName,
  662.                0,
  663.                sizeof( BSTR  ));
  664.         
  665.         *_pdwStubPhase = STUB_CALL_SERVER;
  666.         _RetVal = (((IChain *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> get_Name2((IChain *) ((CStdStubBuffer *)This)->pvServerObject,pbstrName);
  667.         
  668.         *_pdwStubPhase = STUB_MARSHAL;
  669.         
  670.         _StubMsg.BufferLength = 4U + 11U;
  671.         NdrUserMarshalBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  672.                                   (unsigned char __RPC_FAR *)pbstrName,
  673.                                   (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[70] );
  674.         
  675.         _StubMsg.BufferLength += 16;
  676.         
  677.         NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  678.         NdrUserMarshalMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  679.                                 (unsigned char __RPC_FAR *)pbstrName,
  680.                                 (PFORMAT_STRING) &__MIDL_TypeFormatString.Format[70] );
  681.         
  682.         _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  683.         *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  684.         
  685.         }
  686.     RpcFinally
  687.         {
  688.         NdrPointerFree( &_StubMsg,
  689.                         (unsigned char __RPC_FAR *)pbstrName,
  690.                         &__MIDL_TypeFormatString.Format[66] );
  691.         
  692.         }
  693.     RpcEndFinally
  694.     _pRpcMessage->BufferLength = 
  695.         (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  696.     
  697. }
  698.  
  699. extern const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1];
  700.  
  701. static const MIDL_STUB_DESC Object_StubDesc = 
  702.     {
  703.     0,
  704.     NdrOleAllocate,
  705.     NdrOleFree,
  706.     0,
  707.     0,
  708.     0,
  709.     0,
  710.     0,
  711.     __MIDL_TypeFormatString.Format,
  712.     0, /* -error bounds_check flag */
  713.     0x20000, /* Ndr library version */
  714.     0,
  715.     0x303006e, /* MIDL Version 3.3.110 */
  716.     0,
  717.     UserMarshalRoutines,
  718.     0,  /* Reserved1 */
  719.     0,  /* Reserved2 */
  720.     0,  /* Reserved3 */
  721.     0,  /* Reserved4 */
  722.     0   /* Reserved5 */
  723.     };
  724.  
  725. CINTERFACE_PROXY_VTABLE(8) _IChainProxyVtbl = 
  726. {
  727.     &IID_IChain,
  728.     IUnknown_QueryInterface_Proxy,
  729.     IUnknown_AddRef_Proxy,
  730.     IUnknown_Release_Proxy ,
  731.     0 /* IDispatch_GetTypeInfoCount_Proxy */ ,
  732.     0 /* IDispatch_GetTypeInfo_Proxy */ ,
  733.     0 /* IDispatch_GetIDsOfNames_Proxy */ ,
  734.     0 /* IDispatch_Invoke_Proxy */ ,
  735.     IChain_get_Name2_Proxy
  736. };
  737.  
  738.  
  739. static const PRPC_STUB_FUNCTION IChain_table[] =
  740. {
  741.     STUB_FORWARDING_FUNCTION,
  742.     STUB_FORWARDING_FUNCTION,
  743.     STUB_FORWARDING_FUNCTION,
  744.     STUB_FORWARDING_FUNCTION,
  745.     IChain_get_Name2_Stub
  746. };
  747.  
  748. CInterfaceStubVtbl _IChainStubVtbl =
  749. {
  750.     &IID_IChain,
  751.     0,
  752.     8,
  753.     &IChain_table[-3],
  754.     CStdStubBuffer_DELEGATING_METHODS
  755. };
  756.  
  757. #pragma data_seg(".rdata")
  758.  
  759. static const USER_MARSHAL_ROUTINE_QUADRUPLE UserMarshalRoutines[1] = 
  760.         {
  761.             
  762.             {
  763.             BSTR_UserSize
  764.             ,BSTR_UserMarshal
  765.             ,BSTR_UserUnmarshal
  766.             ,BSTR_UserFree
  767.             }
  768.  
  769.         };
  770.  
  771.  
  772. #if !defined(__RPC_WIN32__)
  773. #error  Invalid build platform for this stub.
  774. #endif
  775.  
  776. #if !(TARGET_IS_NT40_OR_LATER)
  777. #error You need a Windows NT 4.0 or later to run this stub because it uses these features:
  778. #error   [wire_marshal] or [user_marshal] attribute, more than 32 methods in the interface.
  779. #error However, your C/C++ compilation flags indicate you intend to run this app on earlier systems.
  780. #error This app will die there with the RPC_X_WRONG_STUB_VERSION error.
  781. #endif
  782.  
  783.  
  784. static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
  785.     {
  786.         0,
  787.         {
  788.             0x4e,        /* FC_IN_PARAM_BASETYPE */
  789.             0x6,        /* FC_SHORT */
  790. /*  2 */    
  791.             0x51,        /* FC_OUT_PARAM */
  792. #ifndef _ALPHA_
  793.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  794. #else
  795.             0x2,        /* Alpha Stack size = 2 */
  796. #endif
  797. /*  4 */    NdrFcShort( 0x0 ),    /* Type Offset=0 */
  798. /*  6 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  799.             0x8,        /* FC_LONG */
  800. /*  8 */    
  801.             0x51,        /* FC_OUT_PARAM */
  802. #ifndef _ALPHA_
  803.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  804. #else
  805.             0x2,        /* Alpha Stack size = 2 */
  806. #endif
  807. /* 10 */    NdrFcShort( 0x26 ),    /* Type Offset=38 */
  808. /* 12 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  809.             0x8,        /* FC_LONG */
  810. /* 14 */    
  811.             0x51,        /* FC_OUT_PARAM */
  812. #ifndef _ALPHA_
  813.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  814. #else
  815.             0x2,        /* Alpha Stack size = 2 */
  816. #endif
  817. /* 16 */    NdrFcShort( 0x34 ),    /* Type Offset=52 */
  818. /* 18 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  819.             0x8,        /* FC_LONG */
  820. /* 20 */    
  821.             0x51,        /* FC_OUT_PARAM */
  822. #ifndef _ALPHA_
  823.             0x1,        /* x86, MIPS & PPC Stack size = 1 */
  824. #else
  825.             0x2,        /* Alpha Stack size = 2 */
  826. #endif
  827. /* 22 */    NdrFcShort( 0x42 ),    /* Type Offset=66 */
  828. /* 24 */    0x53,        /* FC_RETURN_PARAM_BASETYPE */
  829.             0x8,        /* FC_LONG */
  830.  
  831.             0x0
  832.         }
  833.     };
  834.  
  835. static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
  836.     {
  837.         0,
  838.         {
  839.             0x11, 0x4,    /* FC_RP [alloced_on_stack] */
  840. /*  2 */    NdrFcShort( 0x1a ),    /* Offset= 26 (28) */
  841. /*  4 */    
  842.             0x13, 0x0,    /* FC_OP */
  843. /*  6 */    NdrFcShort( 0xc ),    /* Offset= 12 (18) */
  844. /*  8 */    
  845.             0x1b,        /* FC_CARRAY */
  846.             0x1,        /* 1 */
  847. /* 10 */    NdrFcShort( 0x2 ),    /* 2 */
  848. /* 12 */    0x9,        /* 9 */
  849.             0x0,        /*  */
  850. /* 14 */    NdrFcShort( 0xfffffffc ),    /* -4 */
  851. /* 16 */    0x6,        /* FC_SHORT */
  852.             0x5b,        /* FC_END */
  853. /* 18 */    
  854.             0x17,        /* FC_CSTRUCT */
  855.             0x3,        /* 3 */
  856. /* 20 */    NdrFcShort( 0x8 ),    /* 8 */
  857. /* 22 */    NdrFcShort( 0xfffffff2 ),    /* Offset= -14 (8) */
  858. /* 24 */    0x8,        /* FC_LONG */
  859.             0x8,        /* FC_LONG */
  860. /* 26 */    0x5c,        /* FC_PAD */
  861.             0x5b,        /* FC_END */
  862. /* 28 */    0xb4,        /* FC_USER_MARSHAL */
  863.             0x83,        /* 131 */
  864. /* 30 */    NdrFcShort( 0x0 ),    /* 0 */
  865. /* 32 */    NdrFcShort( 0x4 ),    /* 4 */
  866. /* 34 */    NdrFcShort( 0x0 ),    /* 0 */
  867. /* 36 */    NdrFcShort( 0xffffffe0 ),    /* Offset= -32 (4) */
  868. /* 38 */    
  869.             0x11, 0x4,    /* FC_RP [alloced_on_stack] */
  870. /* 40 */    NdrFcShort( 0x2 ),    /* Offset= 2 (42) */
  871. /* 42 */    0xb4,        /* FC_USER_MARSHAL */
  872.             0x83,        /* 131 */
  873. /* 44 */    NdrFcShort( 0x0 ),    /* 0 */
  874. /* 46 */    NdrFcShort( 0x4 ),    /* 4 */
  875. /* 48 */    NdrFcShort( 0x0 ),    /* 0 */
  876. /* 50 */    NdrFcShort( 0xffffffd2 ),    /* Offset= -46 (4) */
  877. /* 52 */    
  878.             0x11, 0x4,    /* FC_RP [alloced_on_stack] */
  879. /* 54 */    NdrFcShort( 0x2 ),    /* Offset= 2 (56) */
  880. /* 56 */    0xb4,        /* FC_USER_MARSHAL */
  881.             0x83,        /* 131 */
  882. /* 58 */    NdrFcShort( 0x0 ),    /* 0 */
  883. /* 60 */    NdrFcShort( 0x4 ),    /* 4 */
  884. /* 62 */    NdrFcShort( 0x0 ),    /* 0 */
  885. /* 64 */    NdrFcShort( 0xffffffc4 ),    /* Offset= -60 (4) */
  886. /* 66 */    
  887.             0x11, 0x4,    /* FC_RP [alloced_on_stack] */
  888. /* 68 */    NdrFcShort( 0x2 ),    /* Offset= 2 (70) */
  889. /* 70 */    0xb4,        /* FC_USER_MARSHAL */
  890.             0x83,        /* 131 */
  891. /* 72 */    NdrFcShort( 0x0 ),    /* 0 */
  892. /* 74 */    NdrFcShort( 0x4 ),    /* 4 */
  893. /* 76 */    NdrFcShort( 0x0 ),    /* 0 */
  894. /* 78 */    NdrFcShort( 0xffffffb6 ),    /* Offset= -74 (4) */
  895.  
  896.             0x0
  897.         }
  898.     };
  899.  
  900. const CInterfaceProxyVtbl * _COMMap_ProxyVtblList[] = 
  901. {
  902.     ( CInterfaceProxyVtbl *) &_IOuterProxyVtbl,
  903.     ( CInterfaceProxyVtbl *) &_IChainProxyVtbl,
  904.     ( CInterfaceProxyVtbl *) &_ITearOff1ProxyVtbl,
  905.     ( CInterfaceProxyVtbl *) &_ITearOff2ProxyVtbl,
  906.     0
  907. };
  908.  
  909. const CInterfaceStubVtbl * _COMMap_StubVtblList[] = 
  910. {
  911.     ( CInterfaceStubVtbl *) &_IOuterStubVtbl,
  912.     ( CInterfaceStubVtbl *) &_IChainStubVtbl,
  913.     ( CInterfaceStubVtbl *) &_ITearOff1StubVtbl,
  914.     ( CInterfaceStubVtbl *) &_ITearOff2StubVtbl,
  915.     0
  916. };
  917.  
  918. PCInterfaceName const _COMMap_InterfaceNamesList[] = 
  919. {
  920.     "IOuter",
  921.     "IChain",
  922.     "ITearOff1",
  923.     "ITearOff2",
  924.     0
  925. };
  926.  
  927. const IID *  _COMMap_BaseIIDList[] = 
  928. {
  929.     &IID_IDispatch,
  930.     &IID_IDispatch,
  931.     &IID_IDispatch,
  932.     &IID_IDispatch,
  933.     0
  934. };
  935.  
  936.  
  937. #define _COMMap_CHECK_IID(n)    IID_GENERIC_CHECK_IID( _COMMap, pIID, n)
  938.  
  939. int __stdcall _COMMap_IID_Lookup( const IID * pIID, int * pIndex )
  940. {
  941.     IID_BS_LOOKUP_SETUP
  942.  
  943.     IID_BS_LOOKUP_INITIAL_TEST( _COMMap, 4, 2 )
  944.     IID_BS_LOOKUP_NEXT_TEST( _COMMap, 1 )
  945.     IID_BS_LOOKUP_RETURN_RESULT( _COMMap, 4, *pIndex )
  946.     
  947. }
  948.  
  949. const ExtendedProxyFileInfo COMMap_ProxyFileInfo = 
  950. {
  951.     (PCInterfaceProxyVtblList *) & _COMMap_ProxyVtblList,
  952.     (PCInterfaceStubVtblList *) & _COMMap_StubVtblList,
  953.     (const PCInterfaceName * ) & _COMMap_InterfaceNamesList,
  954.     (const IID ** ) & _COMMap_BaseIIDList,
  955.     & _COMMap_IID_Lookup, 
  956.     4,
  957.     1
  958. };
  959.