适用于64位应用程序的应用程序清单

时间:2019-01-08 12:25:35

标签: windows manifest

我已经创建了一个64位Windows应用程序,并希望包含一个应用程序清单。

我比较了其他供应商的几个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”获得清单?

  2. Microsoft describes处理器的体系结构如下:

  

指定处理器。对于32位Windows,有效值为x86   和ia64(用于64位Windows)。可选。

这对我很困惑。为什么未列出amd64 / x86-64?我有64位Windows,但没有Intel Itanium体系结构。

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

1 个答案:

答案 0 :(得分:0)

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

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

如果要明确,amd64是x86-64体系结构的正确值。显然,仅记录ia64是Microsoft文档中的遗漏。我已经提交了pull request来纠正该问题。

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