如何将本机DLL包含到ClickOnce中 [英] How to include native DLL's to ClickOnce

查看:323
本文介绍了如何将本机DLL包含到ClickOnce中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我尝试将一些原生DLL包含在我的Click Once应用程序中。以下是我的快速事实:



  • 托管WPF应用程序
  • 从CD ROM驱动器本地安装
  • 安全=已满TRUST

因为本机DLL不是部署清单的一部分,所以我不得不使用"Manifest Manager Utility for ClickOnce"。手动编辑清单。 Codeplex提供了该工具,允许编辑和重新签署部署清单。这很好用
- 在安装期间,ClickOnce将所有必需的文件复制到本地计算机(包括我的本机DLL)。


但我的应用程序无法启动。相反,我在启动后立即收到以下错误:"程序入口点_ftol2无法在动态链接库中找到msvcrt.dll"


我不知道如何解决此错误。但是我可以告诉你我发现了什么:



  • 我在Windows资源管理器中打开了ClickOnce的App-Folder(很难找到,因为它非常神秘路径)。我双击EXE文件 - 然后我收到如上所示的错误信息。
  • 我删除了这个目录中的所有* .manifest文件 - 然后我再次双击EXE文件 - 它的工作原理!

所以似乎错误可能会在清单文件中找到。我是否必须在那里添加一些关于我的文件依赖性的信息?


非常感谢。


Jö rg

解决方案

您好Joergw,


如果您安装替换某些Windows NT 4.0的第三方程序,则可能会发生此行为动态链接库(DLL)文件与不同版本的文件。




当不匹配的DLL文件尝试引用Msvcrt.dll中的函数时,会出现此行为。


要解决此问题此问题,将Windows NT 4.0计算机中的新副本替换为以下DLL文件,该计算机更新到相同的Service Pack级别,并且运行与Windows NT安装相同版本的Microsoft Internet Explorer,您可以在其中获得
这个问题:

Msvcrt.dll

Msvcirt.dll

Msvcrt20.dll

Msvcrt40.dll

Hi,

I try to include some native DLL's to my Click Once Application. Here are my fast facts:

  • Managed WPF Application
  • installed locally from CD ROM Drive
  • Security = FULL TRUST

Because the native DLL was not part of the deployment manifest, I had to use "Manifest Manager Utility for ClickOnce" to edit the manifest manually. The Tool is available at Codeplex, which allows to edit and resign the deployment manifest. This works fine - during the installation wiith ClickOnce all necessary files are copied to the local computer (inclusive my native DLL).

But my App does not start. Instead I get the following error right after start: "The procedure entry point _ftol2 could not be located in the dynamic link library msvcrt.dll"

I have no idea how to resolve this error. But I can show you what I found out:

  • I opened the App-Folder of ClickOnce in the Windows Explorer (hard to find, because of the very cryptic path). I double clicked the EXE-File - then I get the error message as you see above.
  • I remove all *.manifest files in this directory - then I double click the EXE-File again - AND IT WORKS!

So it seems the error might be found somewhere in the manifest-files. Do I have to add some information there about my file dependencies?

Thanks a lot.

Jörg

解决方案

Hi Joergw,

This behavior may occur if you install a third-party program that replaces some of the Windows NT 4.0 dynamic-link library (DLL) files with those of a different version.

This behavior occurs when mismatched DLL files try to reference a function in Msvcrt.dll.

To resolve this issue, replace the following DLL files with new copies from a Windows NT 4.0 computer that is updated to the same service pack level and that is running the same version of Microsoft Internet Explorer as the Windows NT installation on which you experience this issue:

Msvcrt.dll
Msvcirt.dll
Msvcrt20.dll
Msvcrt40.dll


这篇关于如何将本机DLL包含到ClickOnce中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆