⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dsnetifc_p.c

📁 最近在学习directshow, Directshow实务精选的源代码
💻 C
📖 第 1 页 / 共 2 页
字号:
    RpcTryFinally
        {
        if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
            NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[10] );
        
        ulIP = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++;
        
        usPort = *(( USHORT __RPC_FAR * )_StubMsg.Buffer)++;
        
        
        *_pdwStubPhase = STUB_CALL_SERVER;
        _RetVal = (((IMulticastConfig*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> SetMulticastGroup(
                     (IMulticastConfig *) ((CStdStubBuffer *)This)->pvServerObject,
                     ulIP,
                     usPort);
        
        *_pdwStubPhase = STUB_MARSHAL;
        
        _StubMsg.BufferLength = 4U;
        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
        
        }
    RpcFinally
        {
        }
    RpcEndFinally
    _pRpcMessage->BufferLength = 
        (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
    
}


HRESULT STDMETHODCALLTYPE IMulticastConfig_GetMulticastGroup_Proxy( 
    IMulticastConfig __RPC_FAR * This,
    /* [out] */ ULONG __RPC_FAR *pIP,
    /* [out] */ USHORT __RPC_FAR *pPort)
{

    HRESULT _RetVal;
    
    RPC_MESSAGE _RpcMessage;
    
    MIDL_STUB_MESSAGE _StubMsg;
    
    RpcTryExcept
        {
        NdrProxyInitialize(
                      ( void __RPC_FAR *  )This,
                      ( PRPC_MESSAGE  )&_RpcMessage,
                      ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                      ( PMIDL_STUB_DESC  )&Object_StubDesc,
                      6);
        
        
        
        if(!pIP)
            {
            RpcRaiseException(RPC_X_NULL_REF_POINTER);
            }
        if(!pPort)
            {
            RpcRaiseException(RPC_X_NULL_REF_POINTER);
            }
        RpcTryFinally
            {
            
            _StubMsg.BufferLength = 0U;
            NdrProxyGetBuffer(This, &_StubMsg);
            NdrProxySendReceive(This, &_StubMsg);
            
            if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
                NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[16] );
            
            *pIP = *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++;
            
            *pPort = *(( USHORT __RPC_FAR * )_StubMsg.Buffer)++;
            
            _StubMsg.Buffer += 2;
            _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
            
            }
        RpcFinally
            {
            NdrProxyFreeBuffer(This, &_StubMsg);
            
            }
        RpcEndFinally
        
        }
    RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
        {
        NdrClearOutParameters(
                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[2],
                         ( void __RPC_FAR * )pIP);
        NdrClearOutParameters(
                         ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                         ( PFORMAT_STRING  )&__MIDL_TypeFormatString.Format[6],
                         ( void __RPC_FAR * )pPort);
        _RetVal = NdrProxyErrorHandler(RpcExceptionCode());
        }
    RpcEndExcept
    return _RetVal;
}

void __RPC_STUB IMulticastConfig_GetMulticastGroup_Stub(
    IRpcStubBuffer *This,
    IRpcChannelBuffer *_pRpcChannelBuffer,
    PRPC_MESSAGE _pRpcMessage,
    DWORD *_pdwStubPhase)
{
    ULONG _M1;
    USHORT _M2;
    HRESULT _RetVal;
    MIDL_STUB_MESSAGE _StubMsg;
    ULONG __RPC_FAR *pIP;
    USHORT __RPC_FAR *pPort;
    
NdrStubInitialize(
                     _pRpcMessage,
                     &_StubMsg,
                     &Object_StubDesc,
                     _pRpcChannelBuffer);
    ( ULONG __RPC_FAR * )pIP = 0;
    ( USHORT __RPC_FAR * )pPort = 0;
    RpcTryFinally
        {
        pIP = &_M1;
        pPort = &_M2;
        
        *_pdwStubPhase = STUB_CALL_SERVER;
        _RetVal = (((IMulticastConfig*) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> GetMulticastGroup(
                     (IMulticastConfig *) ((CStdStubBuffer *)This)->pvServerObject,
                     pIP,
                     pPort);
        
        *_pdwStubPhase = STUB_MARSHAL;
        
        _StubMsg.BufferLength = 4U + 2U + 10U;
        NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
        *(( ULONG __RPC_FAR * )_StubMsg.Buffer)++ = *pIP;
        
        *(( USHORT __RPC_FAR * )_StubMsg.Buffer)++ = *pPort;
        
        _StubMsg.Buffer += 2;
        *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
        
        }
    RpcFinally
        {
        }
    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,
    __MIDL_TypeFormatString.Format,
    1, /* -error bounds_check flag */
    0x10001, /* Ndr library version */
    0,
    0x50100a4, /* MIDL Version 5.1.164 */
    0,
    0,
    0,  /* notify & notify_flag routine table */
    1,  /* Flags */
    0,  /* Reserved3 */
    0,  /* Reserved4 */
    0   /* Reserved5 */
    };

const CINTERFACE_PROXY_VTABLE(7) _IMulticastConfigProxyVtbl = 
{
    &IID_IMulticastConfig,
    IUnknown_QueryInterface_Proxy,
    IUnknown_AddRef_Proxy,
    IUnknown_Release_Proxy ,
    IMulticastConfig_SetNetworkInterface_Proxy ,
    IMulticastConfig_GetNetworkInterface_Proxy ,
    IMulticastConfig_SetMulticastGroup_Proxy ,
    IMulticastConfig_GetMulticastGroup_Proxy
};


static const PRPC_STUB_FUNCTION IMulticastConfig_table[] =
{
    IMulticastConfig_SetNetworkInterface_Stub,
    IMulticastConfig_GetNetworkInterface_Stub,
    IMulticastConfig_SetMulticastGroup_Stub,
    IMulticastConfig_GetMulticastGroup_Stub
};

const CInterfaceStubVtbl _IMulticastConfigStubVtbl =
{
    &IID_IMulticastConfig,
    0,
    7,
    &IMulticastConfig_table[-3],
    CStdStubBuffer_METHODS
};


/* Standard interface: __MIDL_itf_dsnetifc_0010, ver. 0.0,
   GUID={0x00000000,0x0000,0x0000,{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}} */

#pragma data_seg(".rdata")

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

static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
    {
        0,
        {
			0x4e,		/* FC_IN_PARAM_BASETYPE */
			0x8,		/* FC_LONG */
/*  2 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
			0x8,		/* FC_LONG */
/*  4 */	
			0x51,		/* FC_OUT_PARAM */
#ifndef _ALPHA_
			0x1,		/* x86, MIPS & PPC Stack size = 1 */
#else
			0x2,		/* Alpha Stack size = 2 */
#endif
/*  6 */	NdrFcShort( 0x2 ),	/* Type Offset=2 */
/*  8 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
			0x8,		/* FC_LONG */
/* 10 */	0x4e,		/* FC_IN_PARAM_BASETYPE */
			0x8,		/* FC_LONG */
/* 12 */	0x4e,		/* FC_IN_PARAM_BASETYPE */
			0x6,		/* FC_SHORT */
/* 14 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
			0x8,		/* FC_LONG */
/* 16 */	
			0x51,		/* FC_OUT_PARAM */
#ifndef _ALPHA_
			0x1,		/* x86, MIPS & PPC Stack size = 1 */
#else
			0x2,		/* Alpha Stack size = 2 */
#endif
/* 18 */	NdrFcShort( 0x2 ),	/* Type Offset=2 */
/* 20 */	
			0x51,		/* FC_OUT_PARAM */
#ifndef _ALPHA_
			0x1,		/* x86, MIPS & PPC Stack size = 1 */
#else
			0x2,		/* Alpha Stack size = 2 */
#endif
/* 22 */	NdrFcShort( 0x6 ),	/* Type Offset=6 */
/* 24 */	0x53,		/* FC_RETURN_PARAM_BASETYPE */
			0x8,		/* FC_LONG */

			0x0
        }
    };

static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
    {
        0,
        {
			NdrFcShort( 0x0 ),	/* 0 */
/*  2 */	
			0x11, 0xc,	/* FC_RP [alloced_on_stack] [simple_pointer] */
/*  4 */	0x8,		/* FC_LONG */
			0x5c,		/* FC_PAD */
/*  6 */	
			0x11, 0xc,	/* FC_RP [alloced_on_stack] [simple_pointer] */
/*  8 */	0x6,		/* FC_SHORT */
			0x5c,		/* FC_PAD */

			0x0
        }
    };

const CInterfaceProxyVtbl * _dsnetifc_ProxyVtblList[] = 
{
    ( CInterfaceProxyVtbl *) &_IMulticastConfigProxyVtbl,
    0
};

const CInterfaceStubVtbl * _dsnetifc_StubVtblList[] = 
{
    ( CInterfaceStubVtbl *) &_IMulticastConfigStubVtbl,
    0
};

PCInterfaceName const _dsnetifc_InterfaceNamesList[] = 
{
    "IMulticastConfig",
    0
};


#define _dsnetifc_CHECK_IID(n)	IID_GENERIC_CHECK_IID( _dsnetifc, pIID, n)

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

    return 0;
}

const ExtendedProxyFileInfo dsnetifc_ProxyFileInfo = 
{
    (PCInterfaceProxyVtblList *) & _dsnetifc_ProxyVtblList,
    (PCInterfaceStubVtblList *) & _dsnetifc_StubVtblList,
    (const PCInterfaceName * ) & _dsnetifc_InterfaceNamesList,
    0, // no delegation
    & _dsnetifc_IID_Lookup, 
    1,
    1,
    0, /* table of [async_uuid] interfaces */
    0, /* Filler1 */
    0, /* Filler2 */
    0  /* Filler3 */
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -