简体   繁体   English

VB.NET COMException错误

[英]VB.NET COMException Error

I have written an application in VB.NET using MS Visual Studio 2005. I am using .NET version '2.0.50727'. 我已经使用MS Visual Studio 2005在VB.NET中编写了一个应用程序。我正在使用.NET版本“ 2.0.50727”。 The application was running without errors until recently. 直到最近,该应用程序仍在正常运行。 After being used for a while it begins to produce a System.Runtime.InteropServices.COMException error (80080005) . 使用一段时间后,它开始产生System.Runtime.InteropServices.COMException error (80080005) The error happens when I make a call to produce an instance of another external application. 当我进行调用以生成另一个外部应用程序的实例时发生错误。 Once this error has occurred it never goes away, occurring each time my application is opened. 一旦发生此错误,每次打开我的应用程序时都不会消失。 This error breaks the functionality of my program because it is reliant on the 2nd application it is calling. 此错误破坏了我程序的功能,因为它依赖于它正在调用的第二个应用程序。

I am not sure what starts this error to occurring but I do know that it is user specific and not the application. 我不确定是什么导致了此错误的发生,但是我确实知道它是用户特定的而不是应用程序。 It appears to be something that occurs in the user's Windows profile. 它似乎是在用户的Windows配置文件中发生的。 I can use a different user on the same machine or create a new profile for the user with the issue and the program will work without error for a while. 我可以在同一台计算机上使用其他用户,也可以为有此问题的用户创建新的配置文件,该程序将在一段时间内正常运行。 Eventually (within a few weeks) the error will return and stay until I resolve it again. 最终(在几周内)错误将再次出现并保留,直到我再次解决。 I am trying to debug the COM error to understand why this is happening but this is such strange behavior I'm not sure where to start. 我正在尝试调试COM错误,以了解为什么会发生这种情况,但是这种奇怪的行为我不确定从哪里开始。 I've never seen an error that would wire itself into a profile and cause it to be persistent. 我从未见过将自身连接到配置文件并使之持久化的错误。

I don't have a lot of .NET experience but I have done a lot of VB 6 application programming. 我没有太多的.NET经验,但是我做了很多VB 6应用程序编程。 Please offer any suggestions you have. 请提供您任何建议。 Your help is greatly appreciated. 非常感谢您的帮助。

Here is the CODE BLOCK where the error is occurring: 这是发生错误的代码块:

Public Class frmMain

Public btApp As BarTender.Application

Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Try

    btApp = New BarTender.Application

Catch COMex As Runtime.InteropServices.COMException

    MessageBox.Show("Error " + COMex.ErrorCode.ToString() + ": " + COMex.Message)

End Try

I declare the variable at the top of my frmMain.vb form (the first form to load). 我在frmMain.vb表单(要加载的第一个表单)的顶部声明变量。 I load the COM Object when the first form loads. 我在第一个表单加载时加载COM对象。 I leave it active until the application closes because I make a lot of calls to it. 我将其保持活动状态,直到应用程序关闭,因为我对其进行了多次调用。

It sounds like the error is security related. 听起来错误与安全性有关。 It it magically happens on a new user after a certain period of time, I would look at your user policy definitions. 一段时间后,它会神奇地发生在新用户上,我将研究您的用户策略定义。 Do passwords expire after a certain period of time? 密码会在一段时间后过期吗? Do the new users have small temp directories that are filling up based on your application usage (therefore causing out of disk errors that are masked as COM exceptions)? 新用户是否具有根据您的应用程序使用情况填充的临时目录(因此会导致磁盘不足错误被掩盖为COM异常)? What is this third party application? 什么是第三方应用程序? We're kind of short on details here. 我们在这里缺少一些细节。 But those are some things to start looking at. 但是这些是一些要开始研究的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 VB.Net“未处理COMException”错误 - VB.Net “COMException was unhandled” Error VB.net Excel Automation的随机ComException - Random ComException with VB.net Excel Automation 无法捕获COMException(vb.net) - Can't catch COMException (vb.net) 使用VB.Net通过Outlook发送电子邮件时出现COMException未处理的错误 - COMException unhandled error when sending an email through Outlook using VB.Net VB.NET 中的运行时错误:System.Runtime.InteropServices.COMException - Run Time Error in VB.NET: System.Runtime.InteropServices.COMException 无法捕获COMException(VB.net Excel workbook.styles) - Unable to Catch COMException ( VB.net Excel workbook.styles) VB.net程序犯下InteropServices.COMException错误 - VB.net program falling foul of InteropServices.COMException Bug System.Runtime.InteropServices.COMException | vb.net - System.Runtime.InteropServices.COMException | vb.net 在vb.net 3.5中创建Excel实例时出现System.Runtime.InteropServices.COMException(0x80010108) - System.Runtime.InteropServices.COMException (0x80010108) when creating an instance of Excel in vb.net 3.5 尝试将数据从一个 excel 文档粘贴到另一个文档时出现 VB.Net COMException - VB.Net COMException when trying to paste data from one excel doc to another
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM