• <tfoot id='JkG5C'></tfoot>

        <bdo id='JkG5C'></bdo><ul id='JkG5C'></ul>
      <legend id='JkG5C'><style id='JkG5C'><dir id='JkG5C'><q id='JkG5C'></q></dir></style></legend>
    1. <i id='JkG5C'><tr id='JkG5C'><dt id='JkG5C'><q id='JkG5C'><span id='JkG5C'><b id='JkG5C'><form id='JkG5C'><ins id='JkG5C'></ins><ul id='JkG5C'></ul><sub id='JkG5C'></sub></form><legend id='JkG5C'></legend><bdo id='JkG5C'><pre id='JkG5C'><center id='JkG5C'></center></pre></bdo></b><th id='JkG5C'></th></span></q></dt></tr></i><div id='JkG5C'><tfoot id='JkG5C'></tfoot><dl id='JkG5C'><fieldset id='JkG5C'></fieldset></dl></div>
    2. <small id='JkG5C'></small><noframes id='JkG5C'>

      1. COM 异常 - TYPE_E_CANTLOADLIBRARY?

        时间:2023-07-26
        <tfoot id='abXRy'></tfoot>

          <i id='abXRy'><tr id='abXRy'><dt id='abXRy'><q id='abXRy'><span id='abXRy'><b id='abXRy'><form id='abXRy'><ins id='abXRy'></ins><ul id='abXRy'></ul><sub id='abXRy'></sub></form><legend id='abXRy'></legend><bdo id='abXRy'><pre id='abXRy'><center id='abXRy'></center></pre></bdo></b><th id='abXRy'></th></span></q></dt></tr></i><div id='abXRy'><tfoot id='abXRy'></tfoot><dl id='abXRy'><fieldset id='abXRy'></fieldset></dl></div>

            <legend id='abXRy'><style id='abXRy'><dir id='abXRy'><q id='abXRy'></q></dir></style></legend>
              <tbody id='abXRy'></tbody>

                • <bdo id='abXRy'></bdo><ul id='abXRy'></ul>

                  <small id='abXRy'></small><noframes id='abXRy'>

                  本文介绍了COM 异常 - TYPE_E_CANTLOADLIBRARY?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在我的 .Net Web 应用程序中使用了 COM dll.这适用于多台不同的机器.
                  但是在一台特定的机器上,我收到以下错误:

                  I am using a COM dll in my .Net web application. This works fine on multiple different machines.
                  However on one particular machine I get the following error:

                  无法将CServer.CApplicationClass"类型的 COM 对象转换为接口类型CServer.ICApplication".此操作失败,因为 IID 为{CF0DFA28-046B-4C7D-8AA9-F4B7477D8CAE}"的接口的 COM 组件上的 QueryInterface 调用因以下错误而失败:加载类型库/DLL 时出错.(来自 HRESULT 的异常:0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

                  Unable to cast COM object of type 'CServer.CApplicationClass' to interface type 'CServer.ICApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{CF0DFA28-046B-4C7D-8AA9-F4B7477D8CAE} ' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

                  我已经使用 regsvr32 命令注册了 dll.
                  我还为这个 dll 创建了一个 COM+ 应用程序.通过注册表运行搜索
                  我可以在很多地方找到钥匙.我还尝试注销 dll 并删除计算机上对该 dll 的所有引用.然后重新添加dll并重新注册.

                  I have registerd the dll using the regsvr32 command.
                  I have also created a COM+ application for this dll. Running a search through the registry
                  I can find the key in numerous places. I have also tried unregistering the dll and deleting all referneces on the computer to this dll. And afterwards re-adding the dll and re-registering it.

                  我编写了一个简单的 windows 脚本文件来测试 dll.这工作正常.但是问题存在于我在 iis 中运行的 .net 项目中.

                  I have written a simple windows script file which tests the dll. This works fine. However the problem exists in my .net project which is running in iis.

                  谁能帮我解决这个问题?..

                  Can anyone help me with this?..

                  如果您需要更多信息,请发表评论.谢谢.

                  If you need anymore info please leave a comment. Thanks.

                  推荐答案

                  我遇到了类似的问题,TYPE_E_CANTLOADLIBRARY"消息.

                  I had a similar problem, with the "TYPE_E_CANTLOADLIBRARY" message.

                  背景:我有一个使用 Interop.ReferenceA.dll 的项目.该文件是使用 tlbimp ReferenceA.dll/out: Interop.ReferenceA.dll 创建的.

                  Background: I had a project which used Interop.ReferenceA.dll. This file was created using tlbimp ReferenceA.dll /out: Interop.ReferenceA.dll.

                  解决方案:当我使用 RegDllView 查看 ReferenceA.dll 时,我注意到 ReferenceA.dll 有一个子类,即错误消息中显示的 IID.我查看了子类的源代码,发现它依赖于 Interop.ReferenceB.dll.

                  Solution: When I took a look at ReferenceA.dll using RegDllView I noticed that ReferenceA.dll had a subclass, which was the IID shown in the error message. I looked around in the source code of the subclass and noticed that it had a dependency to Interop.ReferenceB.dll.

                  事实证明,子类需要 Interop.ReferenceB 作为类型库才能工作.所以我运行了这个:

                  Turns out that the subclass needed Interop.ReferenceB as a type-library to work. So I ran this:

                  regasm/tlb:Interop.ReferenceB.tlb Interop.ReferenceB.dll(使用了 32 位版本的 regasm.)

                  regasm /tlb:Interop.ReferenceB.tlb Interop.ReferenceB.dll (the 32-bit version of regasm was used.)

                  错误消失了.

                  这篇关于COM 异常 - TYPE_E_CANTLOADLIBRARY?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:.NET 和 COM 互操作性:从 .NET 客户端释放 COM 下一篇:来自 ASP.NET 的免注册 COM?

                  相关文章

                  1. <tfoot id='Yoscw'></tfoot>
                    1. <small id='Yoscw'></small><noframes id='Yoscw'>

                        <bdo id='Yoscw'></bdo><ul id='Yoscw'></ul>
                      <i id='Yoscw'><tr id='Yoscw'><dt id='Yoscw'><q id='Yoscw'><span id='Yoscw'><b id='Yoscw'><form id='Yoscw'><ins id='Yoscw'></ins><ul id='Yoscw'></ul><sub id='Yoscw'></sub></form><legend id='Yoscw'></legend><bdo id='Yoscw'><pre id='Yoscw'><center id='Yoscw'></center></pre></bdo></b><th id='Yoscw'></th></span></q></dt></tr></i><div id='Yoscw'><tfoot id='Yoscw'></tfoot><dl id='Yoscw'><fieldset id='Yoscw'></fieldset></dl></div>
                      <legend id='Yoscw'><style id='Yoscw'><dir id='Yoscw'><q id='Yoscw'></q></dir></style></legend>