locked
mshtml on win7 x64 compiled for ANY CPU platform RRS feed

  • Question

  • Hi everyone

     

    Our application use component 'Dynamic Html Editor' to allow user edit html text.

    Our application refer to microsoft.mshtml.

    When this application built in x86 mode - dynamic html editor works properly on windows 7 x64.

    But now we need include other component which need application be compiled for 64 target platform. So we cannot prepare application in x86 mode any more.

    So when we prepare application in Any CPU target platform, and install it on Windows 7 x64, application does not see registered dynamic html editor control and the following exception occurs:

         MESSAGE:          Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

         TYPE: System.Runtime.InteropServices.COMException

         SOURCE:           System.Windows.Forms

         STACK TRACE:     

       at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)

       at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
       at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
       at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
       at System.Windows.Forms.AxHost.CreateInstance()
       at System.Windows.Forms.AxHost.GetOcxCreate()
       at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
       at System.Windows.Forms.AxHost.CreateHandle()

    Please advice how we can use microsoft.mshtml in application compiled for any CPu platform.

     

    Thank you in advance.

    • Moved by Cindy Meister MVP Tuesday, November 30, 2010 9:43 AM not VSTO-related (From:Visual Studio Tools for Office)
    Tuesday, November 30, 2010 9:14 AM

Answers