HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::QueryInterface()

in src/InstrumentationEngine/CorProfilerInfoWrapper.cpp [78:154]


HRESULT MicrosoftInstrumentationEngine::CCorProfilerInfoWrapper::QueryInterface(
    _In_ REFIID riid,
    _Out_ void **ppvObject
    )
{
    IfNullRetPointer(ppvObject);
    *ppvObject = NULL;

    if (riid == __uuidof(IUnknown))
    {
        AddRef();
        *ppvObject = (IUnknown*)this;
        return S_OK;
    }

    if (riid == __uuidof(ICorProfilerInfo))
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo*)this;
        return S_OK;
    }
    else if (riid == __uuidof(ICorProfilerInfo2) && m_pRealCorProfilerInfo2 != NULL)
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo2*)this;
        return S_OK;
    }
    else if (riid == __uuidof(ICorProfilerInfo3) && m_pRealCorProfilerInfo3 != NULL)
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo3*)this;
        return S_OK;
    }
    else if (riid == __uuidof(ICorProfilerInfo4) && m_pRealCorProfilerInfo4 != NULL)
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo4*)this;
        return S_OK;
    }
    else if (riid == __uuidof(ICorProfilerInfo5) && m_pRealCorProfilerInfo5 != NULL)
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo5*)this;
        return S_OK;
    }
    else if (riid == __uuidof(ICorProfilerInfo6) && m_pRealCorProfilerInfo6 != NULL)
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo6*)this;
        return S_OK;
    }
    else if (riid == __uuidof(ICorProfilerInfo7) && m_pRealCorProfilerInfo7 != NULL)
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo7*)this;
        return S_OK;
    }
    else if (riid == __uuidof(ICorProfilerInfo8) && m_pRealCorProfilerInfo8 != NULL)
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo8*)this;
        return S_OK;
    }
    else if (riid == __uuidof(ICorProfilerInfo9) && m_pRealCorProfilerInfo9 != NULL)
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo9*)this;
        return S_OK;
    }
    else if (riid == __uuidof(ICorProfilerInfo10) && m_pRealCorProfilerInfo10 != NULL)
    {
        AddRef();
        *ppvObject = (ICorProfilerInfo10*)this;
        return S_OK;
    }
    return E_NOINTERFACE;
}