Windows 7 Forums


Reply
Thread Tools

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

 
 
nidheeshk nidheeshk is offline
New Member
Join Date: Aug 2011
Posts: 1
Thanked: 0
 
      08-16-2011
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
 
Reply With Quote
 
 
 
 
Ace Ace is offline
Established Member
Ace's Avatar
Join Date: Jul 2011
Location: Canada
Posts: 315
Thanked: 56
Send a message via MSN to Ace Ace's Twitter Pag
 
      08-17-2011
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:
string sss = ex.Message;


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 by Ace; 08-17-2011 at 04:02 PM..
 
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Class not registered sv_vijji General Discussion 0 05-31-2011 07:18 AM
32 bit software on Windows 7 x64 gr8Ashish General Discussion 6 05-13-2011 12:02 PM


All times are GMT +1. The time now is 10:50 PM.
W7Forums is an independent website and is not affiliated with Microsoft Corporation.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33