[原创]微信界面逆向分析 | 宜武汇-ag真人国际厅网站

ccontrolui* cdialogbuilder::create(stringorid xml, lpctstr type, idialogbuildercallback* pcallback,

        cpaintmanagerui* pmanager, ccontrolui* pparent)

    {

        //资源id0-65535,两个字节;字符串指针为4个字节

        if(hiword(xml.m_lpstr) != null && *(xml.m_lpstr) != _t('<')) {

            lpctstr xmlpath = cresourcemanager::getinstance()->getxmlpath(xml.m_lpstr);

            if (xmlpath != null) {

                xml = xmlpath;

            }

        }

 

        if( hiword(xml.m_lpstr) != null ) {

            if( *(xml.m_lpstr) == _t('<') ) {

                if( !m_xml.load(xml.m_lpstr) ) return null;

            }

            else {

                if( !m_xml.loadfromfile(xml.m_lpstr) ) return null;

            }

        }

        else {

            hinstance dll_instence = null;

            if (m_instance)

            {

                dll_instence = m_instance;

            }

            else

            {

                dll_instence = cpaintmanagerui::getresourcedll();

            }

            hrsrc hresource = ::findresource(dll_instence, xml.m_lpstr, type);

            if( hresource == null ) return null;

            hglobal hglobal = ::loadresource(dll_instence, hresource);

            if( hglobal == null ) {

                freeresource(hresource);

                return null;

            }

 

            m_pcallback = pcallback;

            if( !m_xml.loadfrommem((byte*)::lockresource(hglobal), ::sizeofresource(dll_instence, hresource) )) return null;

            ::freeresource(hresource);

            m_pstrtype = type;

        }

 

        return create(pcallback, pmanager, pparent);

    }

原文链接:https://bbs.kanxue.com/thread-276479.htm

网络摘文,本文作者:15h,如若转载,请注明出处:https://www.15cov.cn/2023/08/27/原创微信界面逆向分析/

发表评论

邮箱地址不会被公开。 必填项已用*标注

网站地图