The CreateNormalizedObject function creates an instance of a COM object using the strings of the param lpszTricsData. 共有
static HRESULT CreateNormalizedObject(LPCOLESTR lpszTricsData, REFIID riid, void** ppvObj, bool& bWasHTML, BSTR bstrLicKey) atlhost.h ln 66
三种情况:1.It's HTML, so let's create mshtml(HTMLDocument)。2.URL so let's create shdocvw.(WebBrowser). 3.assume ProgID Or CLSID.(If the license key is present Create using IClassFactory2)
接下来是HRESULT ActivateAx(IUnknown* pUnkControl, bool bInited, IStream* pStream)
他负责的工作有:
1.通过控制的IOleObject实现设置客户站点,也就是CAxHostWindow的IOleClientSite实现。
2.通过控制的IPersistStreamInit实现调用,InitNew或者load。
3.把CAxHostWindow的IAdviseSink实现传递给控制的IViewObject实现。
4.。。。
待续