Question REGDB_E_CLASSNOTREG Error - Help needed!

bairdmw

New member
Joined
Jul 8, 2009
Messages
4
Programming Experience
5-10
I have a VB.Net application which is working perfectly fine on 3 other PCs, but on one particular PC I get a Microsoft.NET Framework error every time I try to open the application. The error relates to a form which loads on startup, and I think it is the FlexGrid (AxInterop.MSFlexGridLib) control which is causing the problem.

I have done a clean install of Windows XP SP3 and Microsoft Office 2003 SBE and the error still persists. I have Googled the error and have tried reinstalling .NET Framework 3.5 and MSXML 6.0 but to no avail. I have also tried copying and registering the AxInterop.MSFlexGridLib.dll file to the target PC but this does nothing either.

Someone please help....this is driving me crazy!!
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) ---> System.Runtime.InteropServices.COMException (0x80040154): Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
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()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at PTMS.frmDiary.InitializeComponent()
at PTMS.frmDiary..ctor()
--- End of inner exception stack trace ---
at PTMS.My.MyProject.MyForms.Create__Instance__[T](T Instance)
at PTMS.My.MyProject.MyForms.get_frmDiary()
at PTMS.frmMain.ShowDiary()
at PTMS.frmMain.frmMain_Load(Object eventSender, EventArgs eventArgs)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Public Tour Management System
Assembly Version: 1.1.3476.30635
Win32 Version: 1.1.3476.30635
CodeBase: file:///C:/Documents%20and%20Settings/dennis/Local%20Settings/Apps/2.0/O10QYEDG.Y1N/TQGJ3088.VVH/publ..tion_2e87edf88dab2940_0001.0001_325fe7a5fe95326b/Public%20Tour%20Management%20System.exe
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
AxInterop.MSFlexGridLib
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/dennis/Local%20Settings/Apps/2.0/O10QYEDG.Y1N/TQGJ3088.VVH/publ..tion_2e87edf88dab2940_0001.0001_325fe7a5fe95326b/AxInterop.MSFlexGridLib.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 
Well according to your dump here, the AxInterop.MSFlexGridLib is in fact loaded.
You sure the target computer has the right version of the framework?
 
AxInterop.MSFlexGridLib is just the managed wrapper library that interacts (interop) with the MSFlexGrid ActiveX control, which has to installed (registered) in system first.

Why not use the .Net DataGridView control?
 
Thanks!

Thanks for all the help/suggestions!

I've sorted it out. I had previously copied msflxgrd.ocx from another PC and tried to register it on the problematic PC but was getting an error. I found an older version of msflxgrd.ocx (dated 22-May-2000) and this registered fine and my app is now running well.

As for the DataGridView control, I found that it wasn't nearly as flexible as the old VB6 MSFlexGrid control as far as formatting individual cells goes, so I've stuck with what I know! I'm a relative newbie to .Net so it may just be my inexperience!

Cheers :D
 
Back
Top