如何注册不RegAsm.exe类型库 [英] How to Register a Type Library without RegAsm.exe

查看:464
本文介绍了如何注册不RegAsm.exe类型库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有可能以注册类型库,而无需使用的 RegAsm工具。这里是我的情况,希望这将解释为什么我想这样做:

I want to know if it's possible to register a type library without using the RegAsm tool. Here is my situation, which will hopefully explain why I want to do this:

我正在开发的.NET程序集,将提供一些现代的功能,为旧的VB6应用程序。我已经成功注册了组装和使用RegAsm像这样在我的开发机器的类型库:

I'm developing an assembly in .NET that will provide some modern functionality for our older VB6 applications. I have successfully registered the assembly and the type library on my development machine using RegAsm like so:

regasm.exe MyAssembly.dll /tlb /codebase

上面的命令生成的类型库(MyAssembly.tlb),并将其注册,以及注册程序集。我需要的类型库中注册,这样我可以有智能感知在VB6。

The above command generates the type library (MyAssembly.tlb) and registers it as well as registering the assembly. I need the type library registered so that I can have Intellisense in VB6.

我的问题,这种方法是我生成的类型库文件时没有控制的同一水平,因为我做的 TlbExp.exe 。特别是,我需要使用TlbExp的/名称标志的指定我的属性名称正确的情况下(RegAsm屠夫他们)。所以,如果我用TlbExp生成我的TLB文件,有没有什么办法,我可以从组装登记程序分别注册了吗?

My problem with this method is that I don't have the same level of control when generating the type library file as I do with TlbExp.exe. In particular, I need to use TlbExp's /names flag to specify the proper case of my property names (RegAsm butchers them). So if I use TlbExp to generate my tlb file, is there any way that I can register it separately from the assembly registration process?

编辑: da_m_n的答案是正确的问题,我问。不过,我只是因为RegAsm可以注册一个类型库,这是需要注册才能引用它在VB6的TLB错误的假设下。所以现在我注册组件,并与固定名称引用未注册,TlbExp生成的TLB。

da_m_n's answer is correct for the question I asked. However, I was under the faulty assumption that just because RegAsm could register a type library that it was necessary to register the tlb in order reference it in VB6. So for now I'm registering the assembly and referencing the unregistered, TlbExp-generated tlb with the fixed names.

推荐答案

使用Regtlib.exe将注册tlbexp生成TLB文件。

Use regtlib.exe to register the tlbexp generated tlb file.

这篇关于如何注册不RegAsm.exe类型库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆