CreateWithImplementation method

Invoked by MSHTML when an element behavior is created in Microsoft Internet Explorer 6 and later versions.


HRESULT retVal = object.CreateWithImplementation(pNamespace, bstrImplementation);


  • pNamespace [in]
    Type: [IElementNamespace](aa753698(v=vs.85).md)

    A pointer to the IElementNamespace that owns the element behavior.

  • bstrImplementation [in]
    Type: BSTR

    The implementation name for the behavior or the URN, for a host-provided namespace. This value can also be NULL.

Return value


If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


IElementNamespaceFactory2::CreateWithImplementation was introduced in Internet Explorer 6.

If the IElementNamespaceFactory2 interface is implemented by the host, the CreateWithImplementation method is called by MSHTML instead of IElementNamespaceFactory::Create.