Link to home
Start Free TrialLog in
Avatar of SimonPrice33
SimonPrice33

asked on

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

Hi Experts.... im in a spot of bother and need some help because I am most certainly bambooozled...

I have recently had to have my works laptop re-imaged due to various problems and since having it back I have had VS 2008 reinstalled and have re-downloaded my applications that I support and devlop.

One of the applications I work on, still works perfectly fine on one machine, but when I look to continue to develop this in VS2008 i get the following error.

Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))    
   
Instances of this error (2)  
 
1.   Hide Call Stack
 
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.CreateInstanceCore(Guid clsid)
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.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.ComponentCodeDomSerializer.DeserializeInstance(IDesignerSerializationManager manager, Type type, Object[] parameters, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeExpression(IDesignerSerializationManager manager, String name, CodeExpression expression)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.DeserializeStatementToInstance(IDesignerSerializationManager manager, CodeStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.Windows.Forms.Design.ControlCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, Object codeObject)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.DeserializeName(IDesignerSerializationManager manager, String name, CodeStatementCollection statements)  
 
2.   Hide Call Stack
 
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.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()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.Add(Control c)  
 
Previously it did say that it could not find a dll which I have readded as a reference in the application, and that error cleared but I cant seem to shift this on...

The only thing I can think of that is different is the lack of VS2005 which I am currently downloading from MSDN (slowly) to see if this will help.... but as a sceptic I dont think this will work.

Any ideas??
Avatar of umeli
umeli
Flag of Switzerland image

Do you use any 3rd party controls in your application? maybe they are not correctly installed or registered on your system.
Avatar of Nasir Razzaq
>Previously it did say that it could not find a dll which I have readded as a reference in the application, and that error cleared

What DLL was that? Is it a COM component? Did you register it as well?
Avatar of SimonPrice33
SimonPrice33

ASKER

the dll that it could not find was AxInterop.MSWinsockLib.dll.
and no... we dont use any third party controls
By 3rd party, I meant any library outside .NET and that happens to be winsocks library.
oh, quite probably as this has recently been converted from VB6
having chance to look more into this today its a COM object thats not registering... and I cant get the bloody thing to register properly...

any ideas?
What did you try? regsvr32?
I have tried that, but it doesnt know the insertion point...  

it stil works on one pc which is good.... and i have re-referenced it in the project, but its still unregistered....

any suggestions?
hmm. If its a COM component then it should register fine. Cant think of anything else.
me either...  :(
Let's not give up there... I have the same problem almost exactly. My ex-vb6 application was looking for: AxInterop.MSComctlLib and AxInterop.MSComDlg.

I added them as a reference out of the obj folder. It allowed it to compile now, but throws: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) at runtime.

dgerler, is this an issue you have now or something you previously experienced?

im reimaging my laptop again this week and starting again incase there is something different to the last time...

I think i am going to reinstate an old PC and pull it in through VS 2005, see if that works, upgrade it again to 2008 and then copy over my new files...  its a rediculous way round but doesnt hurt to try it...

plus i have nothing better to do in the office this week :)
ASKER CERTIFIED SOLUTION
Avatar of SimonPrice33
SimonPrice33

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
bloody computers!!!
That's all good, but what about when you deplay it to another computer for use? I found this website http://www.vbtonet.com it cross refences vb6 to .net
works fine... please tell me why you object to a solution to my problem??
I wasn't "Objecting". Sorry that I tried to assist. Certainly close  the question and keep the points. I don't usually post solutions, but thought I'd try to help you out.

I just know when I tried to deploy my app where I was having this problem, it didn't work. In your case, if you use it to another computer, you have to install vb6 again.
> please tell me why you object

There is a bug in EE currently which sends "Objection Posted" emails even when just a comment has been posted after a close request.
Hi CodeCruiser, thanks for the error notice....