关于异常的疑难解答:System.Runtime.InteropServices.COMException
COMException exception is thrown when an unrecognized HRESULT is returned from a COM method call." data-guid="6fffbb9f1b13ca675066e3ef4057a393">当 COM 方法调用返回一个无法识别的 HRESULT 时,将引发 COMException 异常。
- 检查该异常的 ErrorCode 属性,以确定 COM 对象返回的 HRESULT
-
COMException exception, which includes a public ErrorCode property that contains the HRESULT returned by the call." data-guid="d7af2dce64dc133b8cf5fc4b60580caa">当运行时遇到不熟悉的 HRESULT 时,会引发 COMException 异常,该异常包含一个公共的 ErrorCode 属性,其中含有调用所返回的 HRESULT。 如果运行时有可用错误信息,则将相应信息返回调用方。 但是,如果 COM 组件开发人员未能包含错误信息,则运行时返回八位数的 HRESULT 代替消息字符串。 拥有 HRESULT 使调用方能够确定异常的原因。 How to: Map HRESULTs and Exceptions." data-guid="89ba5841a53333901be1ab7220488607">有关更多信息,请参见 如何:映射 HRESULT 和异常。
- 禁用宿主进程。
-
COM 用于在 Visual Studio 和宿主进程之间进行通信。 CoInitializeSecurity causes this exception to be thrown." data-guid="6829042bcbf788339b5858dfb782853b">因为它是在代码运行前使用的,所以调用 CoInitializeSecurity 将引发此异常。
备注
公共语言运行时 (CLR) 将已知的 HRESULTS 转换成 .NET 异常,这使 COM 对象能够将有意义的错误信息返回托管客户端。 HRESULTS 到异常的映射还可以反向工作,即将特定的 HRESULT 返回到非托管客户端。
COMException exception may be thrown when the objects are COM objects." data-guid="4f207b2f96974eb85ac5e295d1c289e1">将后期绑定参数传递给 Microsoft Office 对象的方法以后,如果这些对象是 COM 对象,则可能引发 COMException 异常。 ByRef parameter and that the property you pass has a Set accessor." data-guid="36905b328deb0670aad358f7a1a8c229">后期联编程序假定:此类方法调用涉及 ByRef 参数,并且所传递的属性具有 Set 访问器。 MissingMethodException exception (HRESULT CORE_E_MISSINGMETHOD)." data-guid="e7d4209accd14e61fa697749aea3781b">如果相应属性不具有该访问器,则 .NET Framework 生成一个 MissingMethodException 异常 (HRESULT CORE_E_MISSINGMETHOD)。 要处理此行为,请使用早期绑定对象或传递变量而不是对象的属性。
关于异常的疑难解答:System.Runtime.InteropServices.COMException的更多相关文章
- excel System.Runtime.InteropServices.COMException (0x80010105): 服务器出现意外情况。 (异常来自 HRESULT:0x80010105 (RPC_E
System.Runtime.InteropServices.COMException (0x80010105): 服务器出现意外情况. (异常来自 HRESULT:0x80010105 (RPC_E ...
- “System.Runtime.InteropServices.COMException”类型的第一次机会异常在 System.Windows.Forms.dll 中发生
最近做一个winform项目,在里面用了webbrowser控件进行html文档打印,遇到了标题所示问题.根据查到的一些资料,在调试>异常>查找中输入“System.Runtime.Int ...
- “System.Runtime.InteropServices.COMException”类型的第一次机会异常在 ESRI.ArcGIS.Version.dll 中发生
“System.Runtime.InteropServices.COMException”类型的第一次机会异常在 ESRI.ArcGIS.Version.dll 中发生 其他信息: The speci ...
- “System.Runtime.InteropServices.COMException (0x80070422): 无法启动服务”解决方法
应用程序中发生了无法处理的异常.如果单击“退出”,应用程序将立即关闭.无法启动服务,原因可能是已被禁用或其相关联设备没有启动.(异常来自HRESULT:0X80070422).点击详细内容:有关调用实 ...
- System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800AC472
更新至服务器后运行出错: System.Runtime.InteropServices.COMException: Exception from HRESULT: 0x800AC472 解决方法 注册 ...
- System.Runtime.InteropServices.COMException (0x800706BA) 解决方法
提示“操作失败:无法获取MAC地址.”错误的解决方法. .NET 获取 MAC地址可能会遇到 System.Runtime.InteropServices.COMException (0x8007 ...
- Visual Studio 2008 – ASP.NET “System.Runtime.InteropServices.COMException”
The Issue When openning an existing ASP.NET project for the first time in Visual Studio 2008 it retu ...
- VS2008,System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))
在VS2008环境中编译调试运行不报错,但在发布的exe文件运行就报错 System.Runtime.InteropServices.COMException (0x800401F3): Invali ...
- System.Runtime.InteropServices.COMException (0x800A03EC): 无法访问文件
使用Microsoft.Office.Interop.Excel 操作 今天在服务器部署,操作程序csv文件转xsl文件的时候,遇到一下问题: System.Runtime.InteropServic ...
- System.Runtime.InteropServices.COMException 检索COM类工厂中CLSID{xxxxxxxxx}的组件时失败解决方法
iis7.5中设定应用程序池中<进程模型>中<标识>为localSystem 提示:System.Runtime.InteropServices.COMException: 命 ...
随机推荐
- google yeoman
Yeoman是Google的团队和外部贡献者团队合作开发的,他的目标是通过Grunt(一个用于开发任务自动化的命令行工具)和Bower(一个HTML.CSS.Javascript和图片等前端资源的包管 ...
- 使用Flexible 实现手淘H5 页面的终端适配学习
Amfe阿里无线前端团队双11技术连载之际,一个实战案例来展示多终端适配. Device metrics 1.0 mdpi 2.0 xhdpi 3.0xxhdpi(iphone 6 plus) 手淘h ...
- The Child and Toy
Codeforces Round #250 (Div. 2) C:http://codeforces.com/problemset/problem/437/C 题意:给以一个无向图,每个点都有一点的权 ...
- Delphi控件的显示内容与显示边框是两回事
没有内容,不代表没有边框.比如设计期一个空的TImage仍是有边框的. if (csOpaque in image1.ControlStyle) then ShowMessage('不透明')else ...
- BZOJ1679: [Usaco2005 Jan]Moo Volume 牛的呼声
1679: [Usaco2005 Jan]Moo Volume 牛的呼声 Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 723 Solved: 346[ ...
- 【转】Java运算符优先级
原文网址:http://www.cnblogs.com/gw811/archive/2012/10/13/2722752.html Java运算符优先级 序列号 符号 名称 结合性(与操作数) 目数 ...
- 图论(floyd算法):NOI2007 社交网络
[NOI2007] 社交网络 ★★ 输入文件:network1.in 输出文件:network1.out 简单对比 时间限制:1 s 内存限制:128 MB [问题描述] 在社交网络( ...
- 高级数据结构(树状数组套主席树):ZOJ 2112 Dynamic Rankings
Dynamic Rankings Time Limit: 10 Seconds Memory Limit: 32768 KB The Company Dynamic Rankings has ...
- 如果在安装32位oracle 客户端组件时的情况下以64位模式运行,将出现问题
今天要写个程序,环境是win7+ vs2008+ oracle.首先得保证能连接到数据库.确认代码是没有问题的,但是拿过来直接.报错: “尝试加载 Oracle 客户端库时引发 BadImageFor ...
- 使用MockMvc编写spring boot的controller的测试用例
springboot自带测试模块. 注解需要: @SpringApplicationConfiguration(classes = ComputeServiceApplication.class) 这 ...