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

Joined
Aug 16, 2011
Messages
1
Reaction score
0
Hi Friends,

We developed one windows application using VS 2005 with framework 2.0. This application is running perfectly on 32 bit Operating System. Now we need to give support for 64 bit OS.

While working with 64 bit Operating System we are getting the below error message.

"Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))".

Following is the code block

System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Driver));
this.axDriver = new AxCCNAccess.AxDriver();
((System.ComponentModel.ISupportInitialize)(axDriver)).BeginInit();
SuspendLayout();
//
// axDriver
//
axDriver .Enabled = true;
axDriver .Location = new System.Drawing.Point(241, 211);
axDriver .Name = "axDriver ";
axDriver .OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axDriver .OcxState")));
axDriver .Size = new System.Drawing.Size(41, 42);
axDriver .TabIndex = 0;
//
// driver
//
AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(292, 266);
Controls.Add(axDriver );
Name = "Driver";
Text = "Driver";
try
{
((System.ComponentModel.ISupportInitialize)(axDriver )).EndInit();
}
catch (Exception ex)
{
string sss = ex.Message;
}
ResumeLayout(false);

Getting issue in the try block.

Please help

Regards,
Nidheehs
 

Ace

Microsoft MVP
Joined
Jul 7, 2011
Messages
314
Reaction score
61
It would appear to me that one of the COM component references from your app isn't registered properly on the 64 bit machine. You'd have to register it using RegSvr32.

You are getting THIS error returned to you:
Code:
[SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] sss = ex.Message;[/SIZE]


Because the ComponentModel "
System.ComponentModel.ISupportInitialize" isn't registered properly on the system.

Also, for more in depth debugging purposes, try using ex.ToString instead. It will return a lot more information for you to go by because this will return the full exception to a string.
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top