“未注册的类(HRESULT的异常:0x80040154(REGDB_E_CLASSNOTREG))”在64位操作系统中 [英] "Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))" in 64 bit OS
问题描述
嗨朋友,
我们使用带有框架2.0的VS 2005开发了一个Windows应用程序。该应用程序在32位操作系统上运行良好。现在我们需要支持64位操作系统。
使用64位操作系统时,我们收到以下错误消息。
未注册的类别(HRESULT异常:0x80040154(REGDB_E_CLASSNOTREG))。
以下是代码块
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;
< br $> b $ B $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ >
axDriver .OcxState =((System.Windows.Forms.AxHost.State)(resources.GetObject(axDriver .OcxState)));
axDriver .Size = new System.Drawing.Size(41,42);
axDriver .TabIndex = 0;
//
//司机
//
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;
试试
{
((System.ComponentModel) .ISupportInitialize)(axDriver))。EndInit();
}
catch(Exception ex)
{
string sss = ex.Message;
}
ResumeLayout(false);
在try块中出现问题。
请帮助
问候,
Nidheehs
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
推荐答案
您正试图在64位应用程序中嵌入32位ocx。
您的应用程序可能运行得很好如果强制在64位操作系统上作为32位应用程序运行...项目属性 - >构建 - >平台目标= x86
最好的问候
Espen Harlinn
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
您可以在这里找到解决方案:
http://support.esri.com/en/knowledgebase/techarticles/detail/33000
You can find the solution here:
http://support.esri.com/en/knowledgebase/techarticles/detail/33000
这篇关于“未注册的类(HRESULT的异常:0x80040154(REGDB_E_CLASSNOTREG))”在64位操作系统中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!