Microsoft KB Archive/934101

= Error message when you add a reference to a ProClarity component or when you add a ProClarity component in Visual Studio 2005: &quot;Failed to import the ActiveX control&quot; =

Article ID: 934101

Article Last Modified on 3/27/2007

-

APPLIES TO


 * ProClarity Desktop Professional 6.0
 * ProClarity Desktop Professional 6.1
 * ProClarity Web Professional 6.0
 * ProClarity Web Professional 6.1

-



SYMPTOMS
In Microsoft Visual Studio 2005, you receive the following error message when you add a reference to a ProClarity component or when you add a ProClarity component:

Failed to import the ActiveX control. Please ensure that it is properly registered.



CAUSE
When you add an ActiveX control to a project, Visual Studio 2005 automatically creates an AxHost class and automatically adds this AxHost class to the project. However, Visual Studio 2005 does not correctly generate the dependencies for this AxHost class.



WORKAROUND
To work around this issue, follow these steps:  Run the following command at a command prompt:

&quot;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\aximp&quot; &quot;c:\program files\common files\proclarity\client\PProClarityCtrl5.ocx&quot; /rcw:&quot;c:\program files\common files\proclarity\client\interop\ProClarity.Interop.PProClarityCtrl5.dll&quot;

Note The /rcw flag is important. The /rcw flag tells the Microsoft Windows Forms ActiveX Control Importer (Aximp.exe) to use the ProClarity primary interop assemblies instead of generating new dependencies. In the project, add the .dll file that is created in step 1 as a reference. In the project, add the references to the ProClarity primary interop assemblies.  In the project code, create a ProClarityCtrl component. For example, use the following example code. private void Form1_Load(object sender, EventArgs e)   { AxProClarity.Interop.PProClarityCtrl.AxKProClarity proclarity = new AxProClarity.Interop.PProClarityCtrl.AxKProClarity; proclarity.Dock = DockStyle.Fill; Controls.Add(proclarity); } 

Keywords: kbtshoot kbexpertiseinter kbprb KB934101

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.