惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
O
OpenAI News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
B
Blog
博客园 - 聂微东
博客园_首页
Latest news
Latest news
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
Recent Announcements
Recent Announcements
美团技术团队
Microsoft Azure Blog
Microsoft Azure Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tor Project blog
J
Java Code Geeks
WordPress大学
WordPress大学
L
Lohrmann on Cybersecurity
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
G
GRAHAM CLULEY
腾讯CDC
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
F
Full Disclosure
The Hacker News
The Hacker News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Spread Privacy
Spread Privacy
AWS News Blog
AWS News Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
有赞技术团队
有赞技术团队
K
Kaspersky official blog
Jina AI
Jina AI
Scott Helme
Scott Helme
P
Privacy & Cybersecurity Law Blog
Hugging Face - Blog
Hugging Face - Blog
H
Help Net Security
V2EX - 技术
V2EX - 技术
P
Privacy International News Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
博客园 - 【当耐特】
小众软件
小众软件
C
Cyber Attacks, Cyber Crime and Cyber Security
Cisco Talos Blog
Cisco Talos Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The Cloudflare Blog
Forbes - Security
Forbes - Security
S
Securelist
A
About on SuperTechFans

博客园 - 游游淡淡

ajaxpro在iis7.5上面客户端报未定义的另外一种情况 sql server 2008 64位连接sql 2000服务器的时候出现 MySQL忘记密码怎么修改密码 vs2015 行数统计 javascript和c#aes加密方法互解 vs2015 不能启动 iis express 修改oracle的字符集操作方法 PL/SQL Developer连接本地Oracle 11g 64位数据库 CodeSmith Generator 7.0.2激活步骤 PetaPoco利用ODP.NET Managed Driver连接Oracle html中 table 和 form的位置 android sdk镜像站点 jquery 判断checkbox是否选中几个版本的区别 sql获取汉字的拼音首字母 net 调用https接口 webservice jsonp格式调用 引用64位dll时候出现 未能加载文件或程序集“System.Data.SQLite”或它的某一个依赖项。试图加载格式不正确的程序。 SQL2008性能计数器注册表配置单元一致性失败 win8 下 IIS APPPOOL\DefaultAppPool 登录失败的解决方法 - 游游淡淡
Win8 x64环境下VS2010 C#工程运行报错:没有注册类 (异常来自 HRESULT:0x80040154
游游淡淡 · 2015-03-09 · via 博客园 - 游游淡淡

来源:http://blog.sina.com.cn/s/blog_7095482001019c2v.html

问题描述:

在Win8 x64环境下,VS2010的C#工程中引用了COM组件(Active X控件,且已正确注册),可是一运行工程就会报如下异常错误:

未处理 System.Runtime.InteropServices.COMException
  Message=没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG))
  Source=System.Windows.Forms
  ErrorCode=-2147221164
  StackTrace:
       在 System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
       在 System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
       在 System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
       在 System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
       在 System.Windows.Forms.AxHost.CreateInstance()
       在 System.Windows.Forms.AxHost.GetOcxCreate()
       在 System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
       在 System.Windows.Forms.AxHost.CreateHandle()
       在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       在 System.Windows.Forms.AxHost.EndInit()
       在 ORI.GTJDA.ImageProcessingControl.ImageViewControl.InitializeComponent()

解决办法:

造成上述错误的罪魁祸首就是工程文件“属性--生成”中的目标平台造成的,如下图,如果选择Any CPU或者x64就会出现上述问题,将它设置为x86,问题得以解决。

image