vb6清单添加tlb com [英] vb6 manifest adding tlb com
问题描述
我正在处理一个vb6项目,想要创建一个清单,所以不需要注册。
我使用MMM(使我的清单)工具扫描您的VB6项目的dll依赖和生成清单。
I am working on a vb6 project and want to create a manifest so no registering is required. I use MMM (Make My Manifest) tool which scans your VB6 project for dll dependencies and generates the manifest.
但是,MMM不包括tlb文件,我有一个Client.dll和Client.tlb编写的.net,它已经暴露在COM和我的VB6程序中使用。
However, the MMM does not include tlb files, and I have a Client.dll and Client.tlb written in .net that which has been exposed to COM and used in my VB6 program.
我不想让你使用Regasm,因为如果没有对注册表的注册,这将是很好。
I don't want to you use Regasm as it would be nice if no register to the registry is done.
我试图通过mt工具在命令行中生成一个单独的清单,'mt.exe -tlb:Client.tlb -dll:Client.dll -out:Client.manifest'
I tried to generate a seperate manifest for the via the mt tool in command line, 'mt.exe -tlb:Client.tlb -dll:Client.dll -out:Client.manifest'
然后我想我可以合并2清单通过:'mt.exe -manifest program.exe.manifest client.manifest -out:program.exe.manifest'
Then I thought I could merge the 2 manifest via: 'mt.exe -manifest program.exe.manifest client.manifest -out:program.exe.manifest'
但是,当我运行程序时,我收到一个消息框,说'运行时错误-2147220999(800401f9):自动化错误,错误在Dll'
However, when I run the program I'm getting an message box that says ' Run-time error -2147220999 (800401f9): Automation error , Error in the Dll'
我在上面做正确的事情,任何人有类似的经验,任何帮助赞赏。
Am i doing things correctly above, anyone had similar experience, any help appreciated.
推荐答案
UMMM 如何实现的简短说明:
Here is a short description how UMMM does it:
-
首先,对于.Net dll,它生成一个清单到一个临时文件与这
First, for the .Net dll it generates a manifest to a temp file with this
mt.exe -nologo -managedassemblyname:"{dotnet_dll}" -nodependency -out:"{dotnet_dll}.manifest"
然后将此清单嵌入到.Net dll中作为RT_MANIFEST资源2与此
Then embeds this manifest into .Net dll as RT_MANIFEST resource 2 with this
mt.exe -nologo -manifest "{dotnet_dll}.manifest" -outputresource:"{dotnet_dll}";2
assemblyIdentity
标签并将其添加到中的reg-free清单,从VB6可执行文件中引用.Net dll。 dependency \dependentAssembly
这样的标签
Finally references the .Net dll from the VB6 executable by extracting assemblyIdentity
tag from .Net dll manifest and adding it to the reg-free manifest inside dependency\dependentAssembly
tag like this
<dependency>
<dependentAssembly>
<assemblyIdentity name="PdfSigner" version="1.0.0.0" processorArchitecture="msil" />
</dependentAssembly>
</dependency>
这样 clrClass
标签汉语提示出现在.Net dll嵌入清单,而不是在VB6可执行清单。
This way clrClass
tags Hans mentions appear in the the .Net dll embedded manifest and not in the VB6 executable manifest.
这篇关于vb6清单添加tlb com的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!