Consider the following scenario:
- You install the 64-bit version of Microsoft InfoPath 2010.
- You create a Windows Forms project in Microsoft Visual Studio.
- You add an InfoPath FormControl control to the toolbox.
- You insert the FormControl control on the Windows form.
Failed to create component 'FormControl'. The error message follows:
'System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance (Guid&dsid, Object punkOuter, Int32 context, Guid&iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid dsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type compontentType, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType)
at System.Drawing.Design.Tool...'
'System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance (Guid&dsid, Object punkOuter, Int32 context, Guid&iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid dsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.set_Site(ISite value)
at System.ComponentModel.Container.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.Add(IComponent component, String name)
at System.ComponentModel.Design.DesignHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type compontentType, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType)
at System.Drawing.Design.Tool...'