windows - 64 位应用程序的应用程序 list

标签 windows manifest

我已经创建了一个 64 位 Windows 应用程序,并且想要包含一个应用程序 list 。

我已经比较了其他供应商的几个 DLL,例如shell32.dll ,并看到他们将值“x86”设置为 processorArchitecture;示例:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
  xmlns="urn:schemas-microsoft-com:asm.v1"
  manifestVersion="1.0">
<assemblyIdentity
    name="...."
    processorArchitecture="x86"
    version="...."
    type="win32"/>
<description>....</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="x86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
</assembly> 

我的问题:

  1. 64 位应用程序获得带有 processorArchitecture="x86"的 list 真的可以吗?

  2. 微软 describes处理器架构如下:

Specifies the processor. The valid values are x86 for 32-bit Windows and ia64 for 64-bit Windows. Optional.

这让我很困惑。为什么没有列出 amd64/x86-64?我有 64 位 Windows,但没有 Intel Itanium 架构。

编辑 2021 年 7 月:Microsoft 更新了说明。新的描述是:“指定处理器。有效值包括 x86、amd64、arm 和 arm64。可选。”

  1. 根据 list ,我的 64 位应用程序依赖于“Microsoft.Windows.Common-Controls”和 processorArchitecture="x86"是否可以? 如果我的应用程序“使用”像 comctl32.dll 这样的 DLL 来显示控件,我认为它必须是相同的体系结构,因为 64 位不能在没有 thunk 的情况下绑定(bind) 32 位。

编辑:原来是我弄错了:我用工具“Resource Hacker”查看了DLL,它是一个32位的应用程序,所以我通过SysWOW64看到了32位的DLL,同时假设它是 64 位 DLL。正如预期的那样,真正的 64 位 DLL 包含 processorArchitecture="amd64"

最佳答案

Windows 10 不检查标识您的应用程序的 processorArchitecture 属性。您可以忽略它。

dependentAssembly 元素下的属性必须具有正确的值。但是,为了简单起见,您可以使用 processorArchitecture="*"

如果您想明确一点,amd64 是 x86-64 架构的正确值。仅记录 ia64 显然是 Microsoft 文档中的遗漏。我已经提交了 pull request纠正这一点。

shell32.dll 在我的 Windows 10 副本中指定了 amd64

关于windows - 64 位应用程序的应用程序 list ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54091782/

相关文章:

windows - SQL加: how to change directory and show current working directory

c - 如何将 posix 线程添加到 windows 上的 eclipse (MinGW)

google-chrome-extension - 如何将 "legacy packaged app"更改为 "extension"?

c# - 如何手动编辑 Visual Studio 项目的 list 以明确指定引用的程序集?

python - 无服务器 - Numpy - 无法找到好的绑定(bind)路径格式

c++ - 无法在 Eclipse 中运行 SDL 程序,但可以在 Windows 资源管理器中运行

google-chrome-extension - 如何通过内容安全策略允许外部脚本加载到 Chrome 扩展 popup.html 中?

java - 尽管进行了多次尝试,但链接外部 jar 文件时出现问题

java - Eclipse RCP应用程序仅以管理员身份启动

java - .jar 文件不包含 manifest.mf 中的 Main-Class 属性