unmanaged.dll.manifest文件的用途是什么?

时间:2022-11-17 07:30:01

I observe unmanaged.dll files having a unmanaged.dll.manifest file tagging along. On opening this files in an editor, it seems to be normal XML with links to certain other dependent managed? assemblies. This seems to be like a recent change.. don't remember seeing them earlier.

我观察unmanaged.dll文件有一个unmanaged.dll.manifest文件标记。在编辑器中打开这个文件时,它似乎是普通的XML链接到某些其他依赖托管?组件。这似乎是最近的变化..不记得早些时候看到它们。

  • Why are these files needed? (If I had to make a guess, it would be to load dependent managed assemblies and/or the CLR)
  • 为什么需要这些文件? (如果我不得不猜测,那就是加载依赖的托管程序集和/或CLR)

  • What other useful information can these files contain? Would they contain any links to dependent unmanaged dlls too (which would be nice)
  • 这些文件包含哪些其他有用的信息?它们是否包含依赖非托管dll的任何链接(这将是很好的)

.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.DebugMFC" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

1 个解决方案

#1


4  

What you are seeing is called "Side-by-side assemblies" (SxS). Microsoft has extended the .NET side-by-side machinery to unmanaged DLLs, and now calls them "platform assemblies". Rather than performing linkage by DLL name, DLLs are now loaded through the manifest. The equivalent of the .NET GAC is the folder \windows\WinSxS; this allows simultaneous installation of multiple versions of the DLL on one system, and different applications binding against different versions of the same DLL. It also includes the redirection capabilities that .NET offers; this is primarily what the manifests do (allowing redirection).

你所看到的被称为“并排组件”(SxS)。 Microsoft已将.NET并行机制扩展到非托管DLL,现在将其称为“平台程序集”。现在,DLL不是通过DLL名称执行链接,而是通过清单加载。 .NET GAC的等价物是文件夹\ windows \ WinSxS;这允许在一个系统上同时安装多个版本的DLL,并且不同的应用程序绑定到同一DLL的不同版本。它还包括.NET提供的重定向功能;这主要是清单所做的事情(允许重定向)。

The DLLs referred to in the manifest (e.g. Microsoft.VC90.DebugCRT) are also unmanaged (i.e. native code)

清单中引用的DLL(例如Microsoft.VC90.DebugCRT)也是非托管的(即本机代码)

Application manifests serve other purposes as well. I don't know the details, but recall that selection of themes in XP is also indicated in manifests.

申请表明也有其他用途。我不知道细节,但回想一下XP中的主题选择也在清单中表示。

#1


4  

What you are seeing is called "Side-by-side assemblies" (SxS). Microsoft has extended the .NET side-by-side machinery to unmanaged DLLs, and now calls them "platform assemblies". Rather than performing linkage by DLL name, DLLs are now loaded through the manifest. The equivalent of the .NET GAC is the folder \windows\WinSxS; this allows simultaneous installation of multiple versions of the DLL on one system, and different applications binding against different versions of the same DLL. It also includes the redirection capabilities that .NET offers; this is primarily what the manifests do (allowing redirection).

你所看到的被称为“并排组件”(SxS)。 Microsoft已将.NET并行机制扩展到非托管DLL,现在将其称为“平台程序集”。现在,DLL不是通过DLL名称执行链接,而是通过清单加载。 .NET GAC的等价物是文件夹\ windows \ WinSxS;这允许在一个系统上同时安装多个版本的DLL,并且不同的应用程序绑定到同一DLL的不同版本。它还包括.NET提供的重定向功能;这主要是清单所做的事情(允许重定向)。

The DLLs referred to in the manifest (e.g. Microsoft.VC90.DebugCRT) are also unmanaged (i.e. native code)

清单中引用的DLL(例如Microsoft.VC90.DebugCRT)也是非托管的(即本机代码)

Application manifests serve other purposes as well. I don't know the details, but recall that selection of themes in XP is also indicated in manifests.

申请表明也有其他用途。我不知道细节,但回想一下XP中的主题选择也在清单中表示。