/* this ALWAYS GENERATED file contains the proxy stub code */


/* File created by MIDL compiler version 2.00.0102 */
/* at Sat Mar 30 14:26:02 1996
 */
//@@MIDL_FILE_HEADING(  )

#include "rpcproxy.h"
#include "eliza.h"


extern const MIDL_FORMAT_STRING __MIDLFormatString;

extern const MIDL_FORMAT_STRING __MIDLProcFormatString;


extern const MIDL_STUB_DESC Object_StubDesc;


#pragma code_seg(".orpc")

HRESULT __stdcall IEliza_Complain_Proxy( 
    IEliza __RPC_FAR * This,
    /* [in] */ LPOLESTR pIn,
    /* [size_is][out] */ LPOLESTR pOut)
{

    HRESULT _RetVal;
    
    RPC_MESSAGE _RpcMessage;
    
    MIDL_STUB_MESSAGE _StubMsg;
    
    RpcTryExcept
        {
        RpcTryFinally
            {
            NdrProxyInitialize(
                      ( void __RPC_FAR *  )This,
                      ( PRPC_MESSAGE  )&_RpcMessage,
                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
                      3);
            
            
            
            
            _StubMsg.BufferLength = 12U;
            NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
                                           (unsigned char __RPC_FAR *)pIn,
                                           (PFORMAT_STRING) &__MIDLFormatString.Format[2] );
            
            NdrProxyGetBuffer(This, &_StubMsg);
            NdrConformantStringMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
                                         (unsigned char __RPC_FAR *)pIn,
                                         (PFORMAT_STRING) &__MIDLFormatString.Format[2] );
            
            NdrProxySendReceive(This, &_StubMsg);
            
            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[0] );
            
            NdrConformantStringUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
                                           (unsigned char __RPC_FAR * __RPC_FAR *)&pOut,
                                           (PFORMAT_STRING) &__MIDLFormatString.Format[8],
                                           (unsigned char)0 );
            
            _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
            
            }
        RpcFinally
            {
            NdrProxyFreeBuffer(This, &_StubMsg);
            
            }
        RpcEndFinally
        
        }
    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
        {
        _StubMsg.MaxCount = 256;
        
        NdrClearOutParameters(
                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                         ( PFORMAT_STRING  )&__MIDLFormatString.Format[4],
                         ( void __RPC_FAR * )pOut);
        _RetVal = NdrProxyErrorHandler(GetExceptionCode());
        }
    RpcEndExcept
    return _RetVal;
}

void __RPC_STUB IEliza_Complain_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase)
{
    HRESULT _RetVal;
    MIDL_STUB_MESSAGE _StubMsg;
    LPOLESTR pIn;
    LPOLESTR pOut;
    
NdrStubInitialize(
                     _pRpcMessage,
                     &_StubMsg,
                     &Object_StubDesc,
                     _pRpcChannelBuffer);
    pIn = 0;
    pOut = 0;
    RpcTryFinally
        {
        if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
            NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[0] );
        
        NdrConformantStringUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
                                       (unsigned char __RPC_FAR * __RPC_FAR *)&pIn,
                                       (PFORMAT_STRING) &__MIDLFormatString.Format[2],
                                       (unsigned char)0 );
        
        pOut = _StubMsg.pfnAllocate(256 * 2);
        
        *_pdwStubPhase = STUB_CALL_SERVER;
        _RetVal = (((IEliza *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> Complain(
            (IEliza *) ((CStdStubBuffer *)This)->pvServerObject,
            pIn,
            pOut);
        
        *_pdwStubPhase = STUB_MARSHAL;
        
        _StubMsg.BufferLength = 12U + 10U;
        _StubMsg.MaxCount = 256;
        
        NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
                                       (unsigned char __RPC_FAR *)pOut,
                                       (PFORMAT_STRING) &__MIDLFormatString.Format[8] );
        
        _StubMsg.BufferLength += 16;
        
        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
        _StubMsg.MaxCount = 256;
        
        NdrConformantStringMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
                                     (unsigned char __RPC_FAR *)pOut,
                                     (PFORMAT_STRING) &__MIDLFormatString.Format[8] );
        
        _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
        
        }
    RpcFinally
        {
        _StubMsg.MaxCount = 256;
        
        NdrPointerFree( &_StubMsg,
                        (unsigned char __RPC_FAR *)pOut,
                        &__MIDLFormatString.Format[4] );
        
        }
    RpcEndFinally
    _pRpcMessage->BufferLength = 
        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
    
}


static const MIDL_STUB_DESC Object_StubDesc = 
    {
    0,
    NdrOleAllocate,
    NdrOleFree,
    0,
    0,
    0,
    0,
    0,
    __MIDLFormatString.Format,
    0, /* -error bounds_check flag */
    0x10001, /* Ndr library version */
    0,
    0x2000066, /* MIDL Version 2.0.102 */
    0
    };

const CInterfaceProxyVtbl _IElizaProxyVtbl = 
{
    &IID_IEliza,
    IUnknown_QueryInterface_Proxy,
    IUnknown_AddRef_Proxy,
    IUnknown_Release_Proxy ,
    IEliza_Complain_Proxy
};


static const PRPC_STUB_FUNCTION IEliza_table[] =
{
    IEliza_Complain_Stub
};

const CInterfaceStubVtbl _IElizaStubVtbl =
{
    &IID_IEliza,
    0,
    4,
    &IEliza_table[-3],
    CStdStubBuffer_METHODS
};

#pragma data_seg(".rdata")

#if !defined(__RPC_WIN32__)
#error  Invalid build platform for this stub.
#endif

static const MIDL_FORMAT_STRING __MIDLProcFormatString =
    {
        0,
        {
			
			0x4d,		/* FC_IN_PARAM */
#ifndef _ALPHA_
			0x1,		/* x86, MIPS & PPC Stack size = 1 */
#else
			0x2,		/* Alpha Stack size = 2 */
#endif
/*  2 */	NdrFcShort( 0x0 ),	/* Type Offset=0 */
/*  4 */	
			0x51,		/* FC_OUT_PARAM */
#ifndef _ALPHA_
			0x1,		/* x86, MIPS & PPC Stack size = 1 */
#else
			0x2,		/* Alpha Stack size = 2 */
#endif
/*  6 */	NdrFcShort( 0x4 ),	/* Type Offset=4 */
/*  8 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
			0x8,		/* FC_LONG */

			0x0
        }
    };

static const MIDL_FORMAT_STRING __MIDLFormatString =
    {
        0,
        {
			0x11, 0x8,	/* FC_RP [simple_pointer] */
/*  2 */	
			0x25,		/* FC_C_WSTRING */
			0x5c,		/* FC_PAD */
/*  4 */	
			0x11, 0x0,	/* FC_RP */
/*  6 */	NdrFcShort( 0x2 ),	/* Offset= 2 (8) */
/*  8 */	
			0x25,		/* FC_C_WSTRING */
			0x44,		/* FC_STRING_SIZED */
/* 10 */	0x40,		/* 64 */
			0x0,		/* 0 */
/* 12 */	NdrFcShort( 0x100 ),	/* 256 */

			0x0
        }
    };

const CInterfaceProxyVtbl * _eliza_ProxyVtblList[] = 
{
    ( CInterfaceProxyVtbl *) &_IElizaProxyVtbl,
    0
};

const CInterfaceStubVtbl * _eliza_StubVtblList[] = 
{
    ( CInterfaceStubVtbl *) &_IElizaStubVtbl,
    0
};

PCInterfaceName const _eliza_InterfaceNamesList[] = 
{
    "IEliza",
    0
};


#define _eliza_CHECK_IID(n)	IID_GENERIC_CHECK_IID( _eliza, pIID, n)

int __stdcall _eliza_IID_Lookup( const IID * pIID, int * pIndex )
{
    
    if(!_eliza_CHECK_IID(0))
        {
        *pIndex = 0;
        return 1;
        }

    return 0;
}

const ExtendedProxyFileInfo eliza_ProxyFileInfo = 
{
    (PCInterfaceProxyVtblList *) & _eliza_ProxyVtblList,
    (PCInterfaceStubVtblList *) & _eliza_StubVtblList,
    (const PCInterfaceName * ) & _eliza_InterfaceNamesList,
    0, // no delegation
    & _eliza_IID_Lookup, 
    1,
    1
};
