在DLL'ComCtl32'中找不到名为'TaskDialogIndirect'的入口点 [英] Unable to find an entry point named 'TaskDialogIndirect' in DLL 'ComCtl32'

查看:321
本文介绍了在DLL'ComCtl32'中找不到名为'TaskDialogIndirect'的入口点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一台特定的Vista x64计算机,在运行我们的C#WinForms应用程序时,显示以下错误:

We have a particular Vista x64 machine that, when running our C# WinForms app, displays the following error:

System.EntryPointNotFoundException: 找不到名为的入口点 DLL中的"TaskDialogIndirect" 'ComCtl32'.

System.EntryPointNotFoundException: Unable to find an entry point named 'TaskDialogIndirect' in DLL 'ComCtl32'.

相同的代码在其他Vista机器上也可以正常工作.由于某些原因,这台特定的Vista计算机始终会引发此异常.

This same code works fine on other Vista machines. For some reason, this particular Vista machine always throws this exception.

我们如何解决这个问题?

How can we fix this?

推荐答案

我对此有疑问,而Naughter的免费 XTaskDialog API ,可通过仿真在Windows XP计算机上获得后备机制,从而使该对话框实现更加有用. :)

I had problems with this and Naughter's free XTaskDialog API, to get a fallback mechanism on Windows XP machines via emulation, rendering this dialog implementation much more useful. :)

就我而言,这是一个激活上下文问题,如本

In my case it was an activation context issue, as mentioned in this blog entry.

或者,在此引用,以防某天博客帖子在网络空间丢失(适用于Visual Studio):

Or, quoted here, in case the blog post is lost in cyberspace some day (applies to Visual Studio):

  1. 在解决方案资源管理器中打开您的项目属性,
  2. 在安全"选项卡上,选中启用ClickOnce安全设置",
  3. 现在您可以看到app.manifest文件出现在解决方案的Properties文件夹中,将其打开,
  4. 在</trustInfo>下标签,在下面插入代码.
  5. 如果您尝试构建,则可能存在错误.要对其进行修复,请取消选中启用ClickOnce安全设置".

要在步骤4中插入的代码:

The code to insert in step 4:

<dependency>
  <dependentAssembly>
    <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" 
        version="6.0.0.0" processorArchitecture="*"
        publicKeyToken="6595b64144ccf1df" language="*" />
  </dependentAssembly>
</dependency>

这篇关于在DLL'ComCtl32'中找不到名为'TaskDialogIndirect'的入口点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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