Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

"System.Runtime.InteropServices.COMException (0x80040154)" error message when you add a FormControl control to a Windows Forms project in Visual Studio together with the 64-bit version of InfoPath 2010


View products that this article applies to.

Symptoms

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.
In this scenario, you receive the following error message:
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...'

↑ Back to the top


Workaround

There is no workaround for this issue when you use the 64-bit version of InfoPath 2010. To use the InfoPath FormControl control, install the 32-bit version of InfoPath 2010.

↑ Back to the top


Keywords: kberrmsg, kbtshoot, kbexpertiseinter, kbsurveynew, kbprb, kb

↑ Back to the top

Article Info
Article ID : 982255
Revision : 3
Created on : 4/23/2018
Published on : 4/23/2018
Exists online : False
Views : 485