5
生成清单文件以用于免注册的COM
我有一些使用清单文件的应用程序(某些本机应用程序,.NET),以便可以完全隔离地部署它们,而无需任何全局COM注册。例如,对dbgrid32.ocx com服务器的依赖关系在myapp.exe.manifest文件中的声明如下,该文件与myapp.exe位于同一文件夹中: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity type="win32" name="myapp.exe" version="1.2.3.4" /> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="dbgrid32.ocx" version="5.1.81.4" /> </dependentAssembly> </dependency> </assembly> dbgrid32.ocx和它自己的dbgrid32.ocx.manifest文件一起部署到同一文件夹: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity type="win32" name="dbgrid32.ocx" version="5.1.81.4" /> <file name="dbgrid32.ocx"> <typelib tlbid="{00028C01-0000-0000-0000-000000000046}" version="1.0" helpdir=""/> <comClass progid="MSDBGrid.DBGrid" clsid="{00028C00-0000-0000-0000-000000000046}" description="DBGrid Control" /> </file> …