HRESULT Import()

in ProfilingAPI/ReJITEnterLeaveHooks/ILRewriter.cpp [206:227]


    HRESULT Import()
    {
        LPCBYTE pMethodBytes;

        IfFailRet(m_pICorProfilerInfo->GetILFunctionBody(
            m_moduleId, m_tkMethod, &pMethodBytes, NULL));

        COR_ILMETHOD_DECODER decoder((COR_ILMETHOD*)pMethodBytes);

        // Import the header flags
        m_tkLocalVarSig = decoder.GetLocalVarSigTok();
        m_maxStack = decoder.GetMaxStack();
        m_flags = (decoder.GetFlags() & CorILMethod_InitLocals);

        m_CodeSize = decoder.GetCodeSize();

        IfFailRet(ImportIL(decoder.Code));

        IfFailRet(ImportEH(decoder.EH, decoder.EHCount()));

        return S_OK;
    }