Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 = "DriverContainer";

Text = "DriverContainer";

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
Posted

You are trying to embed a 32-bit ocx in a 64-bit application.

Your application will probably run just fine if you force to run as a 32-bit application on a 64-bit OS ... project properties -> build -> Platform Target = x86

Best regards
Espen Harlinn
 
Share this answer
 
Comments
gutierrezfdo 24-Aug-12 17:38pm    
It works
Espen Harlinn 25-Aug-12 4:24am    
That's good :-D
Lesha Dubenko 1-Oct-12 10:50am    
thanks!
Espen Harlinn 1-Oct-12 10:56am    
You're welcome :-D
MehranMsba 4-Oct-12 11:49am    
Thanks....
You can find the solution here:
http://support.esri.com/en/knowledgebase/techarticles/detail/33000
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900