简体   繁体   English

在VB中打开.Net(C#)COM应用程序时出错(2147024894)

[英]Error (2147024894) while opening .Net (C#) COM application into VB

I am developing plug in application for a third party software (They using COM technology to launch the plug in applications to their Software).I am using .Net(C#) for application development. 我正在开发用于第三方软件的插件应用程序(他们使用COM技术将插件应用程序启动到他们的软件)。我正在使用.Net(C#)进行应用程序开发。 The third party software was developed by VB. 第三方软件由VB开发。 When i am trying to launch my plug in application to Third party software i am getting following error, 当我尝试将插件应用程序启动到第三方软件时,出现以下错误,
DTM creation failed!(-2147024894 - File or assembly name TestComDTM, or one of its dependencies, was not found.) DTM创建失败!(-2147024894-未找到文件或程序集名称TestComDTM或其依赖项之一。)
But i had copied all the required dependencies to installation location, but still I couldn't able to launch my application through third party software. 但是我已将所有必需的依赖项复制到安装位置,但是仍然无法通过第三方软件启动我的应用程序。 Please help me 请帮我

Decoding the HRESULT: 解码HRESULT:

  • -2147024894 is 0x80070002 -2147024894是0x80070002
  • Which is much easier to look up in WinError.h (part of the Windows SDK). 在WinError.h(Windows SDK的一部分)中查找起来要容易得多。
  • 7 is FACILITY_WIN32, so this is Windows, so looking at Win32 error codes for 2, which is ERROR_FILE_NOT_FOUND. 7是FACILITY_WIN32,所以这是Windows,因此请查看Win32错误代码2,即ERROR_FILE_NOT_FOUND。
  • So this is a file not found error as an HRESULT. 因此,这是一个文件未找到错误,为HRESULT。

Which reflects the error message, but sometimes will tell you more about the route cause. 它反映了错误消息,但有时会告诉您更多有关路由原因的信息。

Next step: Process Monitor can be used to establish where COM is trying to load that file from. 下一步:可以使用Process Monitor建立COM试图从中加载该文件的位置。

You could try to check with dependency walker that all dependency are present, the profiling mode is really nice for that. 您可以尝试与依赖遍历器一起检查所有依赖项是否存在,分析模式确实非常适合。

One thing that the standard windows message doesn't say is that it could appear if any dependency in the dependency graph of the application isn't found (Like if a dll you call depends on another), and not only on direct dependencies not found. 标准Windows消息未说明的一件事是,如果未在应用程序的依赖关系图中找到任何依赖项,则可能会出现(就像您调用的dll依赖于另一个依赖项一样),而不仅是未找到直接依赖项, 。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM