DLL问题:vb6和vb.net编写智能标签 [英] dll problem: vb6 and vb.net writing smart tags

查看:67
本文介绍了DLL问题:vb6和vb.net编写智能标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




简而言之,我的问题是:如何制作一个我编译的dll来自

vb.net代码注册和工作就像在VB6中编译为ActiveX dll一样?


我的visual basic.net副本的IDE没有为我提供

选项来构建一个类库(dll) - 相反我可以使用命令

行(虽然我不知道如何复制注册COM

Interop选项在IDE中显示为灰色,这可能是我的问题。)


我正在尝试构建智能标记(一个将被Office识别的dll

产品 - 在我的情况下Word和Excel)。我可以从VB6成功地让他们工作

,但我真的想用.NET代替。从VB6,

我只做了A)编译一个activeX DLL,和B)手动添加

注册表的智能标记键中的两个必要条目。在这个

点,Word会自动识别我的dll并在适当的时候执行

内的代码。


来自VB.NET, IA)从命令行编译一个dll,B)运行regasm

dllname.dll,和C)手动添加智能标记键中的两个条目

注册表。但是,Word不承认我的vb.net

smarttag dll甚至存在,更不用说它里面的文字。


那么,什么是VB6编译器当它编译一个activeX DLL时(我假设它正在制作某些注册表项?)我该如何从命令行为vb.net复制




非常感谢您的任何知识!


-Casey

Hi,

In a nutshell, my question is: how do i make a dll that I compile from
vb.net code register and work like one compiled as an ActiveX dll in VB6?

The IDE of my copy of visual basic.net does not provide me with the
option to build a class library (dll)--instead I can use the command
line (though I don''t know how to replicate the "Register for COM
Interop" option that is grayed-out in the IDE, which may be my problem).

I am trying to build smart tags (a dll that will be recognized by Office
products--in my case Word and Excel). I can get them working
successfully from VB6, but I really want to use .NET instead. From VB6,
I did nothing more than A) compile an activeX DLL, and B) Manually add
two neccessary entries in the Smart Tags key of the registry. At this
point Word automatically recognizes my dll and executes the code within
it as appropriate.

From VB.NET, I A) compile a dll from the command line, B) run "regasm
dllname.dll", and C) Manually add the two entries in the Smart Tags key
of the registry. However, Word does not recognize that my vb.net
smarttag dll even exists, much less the words within it.

So, what is the VB6 compiler doing when it compiles an activeX DLL (I
assume it''s making certain registry entries?) and how do I replicate
that from the command line for vb.net?

Thanks very much for any knowledge you have!

-Casey

推荐答案

2004-11-30,C Williams< no **** @ thank.you>写道:
On 2004-11-30, C Williams <no****@thank.you> wrote:


简而言之,我的问题是:如何制作一个我从
vb.net代码寄存器编译的dll并且像在VB6中编译为ActiveX dll的一个?

我的visual basic.net副本的IDE没有为我提供构建类库(dll)的
选项 - 而是我可以使用命令
行(虽然我不知道如何复制IDE中的注册COM
Interop选项,这可能是我的问题)。

我正在尝试构建智能标签(一种将被Office
产品识别的dll - 在我的例子中是Word和Excel)。我可以从VB6成功地让他们工作,但我真的想用.NET代替。从VB6开始,我只做了A)编译activeX DLL,以及B)在注册表的智能标记键中手动添加两个必要条目。在这一点上,Word会自动识别我的dll并在适当的时候执行它。

从VB.NET,IA)从命令行编译一个dll,B)运行regasm
dllname.dll和C)手动添加注册表的智能标记键中的两个条目。但是,Word不承认我的vb.net
smarttag dll甚至存在,更不用说它里面的文字。

那么,VB6编译器在编译activeX DLL时做了什么(我假设它正在制作某些注册表项?)我如何从vb.net的命令行复制


非常感谢您的任何知识有这个!

-Casey
Hi,

In a nutshell, my question is: how do i make a dll that I compile from
vb.net code register and work like one compiled as an ActiveX dll in VB6?

The IDE of my copy of visual basic.net does not provide me with the
option to build a class library (dll)--instead I can use the command
line (though I don''t know how to replicate the "Register for COM
Interop" option that is grayed-out in the IDE, which may be my problem).

I am trying to build smart tags (a dll that will be recognized by Office
products--in my case Word and Excel). I can get them working
successfully from VB6, but I really want to use .NET instead. From VB6,
I did nothing more than A) compile an activeX DLL, and B) Manually add
two neccessary entries in the Smart Tags key of the registry. At this
point Word automatically recognizes my dll and executes the code within
it as appropriate.

From VB.NET, I A) compile a dll from the command line, B) run "regasm
dllname.dll", and C) Manually add the two entries in the Smart Tags key
of the registry. However, Word does not recognize that my vb.net
smarttag dll even exists, much less the words within it.

So, what is the VB6 compiler doing when it compiles an activeX DLL (I
assume it''s making certain registry entries?) and how do I replicate
that from the command line for vb.net?

Thanks very much for any knowledge you have!

-Casey




我不是这个出口 - 我从来不需要创建一个COM Callable

Wrapper(CCW),但我相信一旦你编译你的程序集你就会想要

也运行tlbexport。这应该生成一个类型库,以便它可以从COM调用$

-

Tom Shelton [MVP]



I''m not an export on this - I''ve never needed to create a COM Callable
Wrapper (CCW), but I believe once you compile your assembly you''ll want
too run tlbexport on it. This should generate a typelibary so that it
can be called from COM.

--
Tom Shelton [MVP]


2004-11-30,C Williams< no **** @ thank.you>写道:
On 2004-11-30, C Williams <no****@thank.you> wrote:


简而言之,我的问题是:如何制作一个我从
vb.net代码寄存器编译的dll并且像在VB6中编译为ActiveX dll的一个?

我的visual basic.net副本的IDE没有为我提供构建类库(dll)的
选项 - 而是我可以使用命令
行(虽然我不知道如何复制IDE中的注册COM
Interop选项,这可能是我的问题)。

我正在尝试构建智能标签(一种将被Office
产品识别的dll - 在我的例子中是Word和Excel)。我可以从VB6成功地让他们工作,但我真的想用.NET代替。从VB6开始,我只做了A)编译activeX DLL,以及B)在注册表的智能标记键中手动添加两个必要条目。在这一点上,Word会自动识别我的dll并在适当的时候执行它。

从VB.NET,IA)从命令行编译一个dll,B)运行regasm
dllname.dll和C)手动添加注册表的智能标记键中的两个条目。但是,Word不承认我的vb.net
smarttag dll甚至存在,更不用说它里面的文字。

那么,VB6编译器在编译activeX DLL时做了什么(我假设它正在制作某些注册表项?)我如何从vb.net的命令行复制


非常感谢您的任何知识有!

-Casey
Hi,

In a nutshell, my question is: how do i make a dll that I compile from
vb.net code register and work like one compiled as an ActiveX dll in VB6?

The IDE of my copy of visual basic.net does not provide me with the
option to build a class library (dll)--instead I can use the command
line (though I don''t know how to replicate the "Register for COM
Interop" option that is grayed-out in the IDE, which may be my problem).

I am trying to build smart tags (a dll that will be recognized by Office
products--in my case Word and Excel). I can get them working
successfully from VB6, but I really want to use .NET instead. From VB6,
I did nothing more than A) compile an activeX DLL, and B) Manually add
two neccessary entries in the Smart Tags key of the registry. At this
point Word automatically recognizes my dll and executes the code within
it as appropriate.

From VB.NET, I A) compile a dll from the command line, B) run "regasm
dllname.dll", and C) Manually add the two entries in the Smart Tags key
of the registry. However, Word does not recognize that my vb.net
smarttag dll even exists, much less the words within it.

So, what is the VB6 compiler doing when it compiles an activeX DLL (I
assume it''s making certain registry entries?) and how do I replicate
that from the command line for vb.net?

Thanks very much for any knowledge you have!

-Casey




另外请注意,文档中有相关信息......

查找关于COM Callable Wrappers和tlbexport的信息。


-

Tom Shelton [MVP]



As a further note, there is information on this in the documentation...
Look for information on COM Callable Wrappers and tlbexport.

--
Tom Shelton [MVP]

你不需要这样做,检查

项目属性中的注册COM Interop框,它会为你做。然后,如果你想在另一台机器上使用它,你需要重新计算它是b $ b(而不是regsvr32)。

" Tom Shelton"写道:
You don''t need to do this, check the ''Register for COM Interop'' box in
Project Properties and it''ll do it for you. You then need to regasm it
(rather than regsvr32) if you want it on another machine.
"Tom Shelton" wrote:
2004-11-30,C Williams< no **** @ thank.you>写道:
On 2004-11-30, C Williams <no****@thank.you> wrote:


简而言之,我的问题是:如何制作一个我从
vb.net代码寄存器编译的dll并且像在VB6中编译为ActiveX dll的一个?

我的visual basic.net副本的IDE没有为我提供构建类库(dll)的
选项 - 而是我可以使用命令
行(虽然我不知道如何复制IDE中的注册COM
Interop选项,这可能是我的问题)。

我正在尝试构建智能标签(一种将被Office
产品识别的dll - 在我的例子中是Word和Excel)。我可以从VB6成功地让他们工作,但我真的想用.NET代替。从VB6开始,我只做了A)编译activeX DLL,以及B)在注册表的智能标记键中手动添加两个必要条目。在这一点上,Word会自动识别我的dll并在适当的时候执行它。

从VB.NET,IA)从命令行编译一个dll,B)运行regasm
dllname.dll和C)手动添加注册表的智能标记键中的两个条目。但是,Word不承认我的vb.net
smarttag dll甚至存在,更不用说它里面的文字。

那么,VB6编译器在编译activeX DLL时做了什么(我假设它正在制作某些注册表项?)我如何从vb.net的命令行复制


非常感谢您的任何知识有!

-Casey
Hi,

In a nutshell, my question is: how do i make a dll that I compile from
vb.net code register and work like one compiled as an ActiveX dll in VB6?

The IDE of my copy of visual basic.net does not provide me with the
option to build a class library (dll)--instead I can use the command
line (though I don''t know how to replicate the "Register for COM
Interop" option that is grayed-out in the IDE, which may be my problem).

I am trying to build smart tags (a dll that will be recognized by Office
products--in my case Word and Excel). I can get them working
successfully from VB6, but I really want to use .NET instead. From VB6,
I did nothing more than A) compile an activeX DLL, and B) Manually add
two neccessary entries in the Smart Tags key of the registry. At this
point Word automatically recognizes my dll and executes the code within
it as appropriate.

From VB.NET, I A) compile a dll from the command line, B) run "regasm
dllname.dll", and C) Manually add the two entries in the Smart Tags key
of the registry. However, Word does not recognize that my vb.net
smarttag dll even exists, much less the words within it.

So, what is the VB6 compiler doing when it compiles an activeX DLL (I
assume it''s making certain registry entries?) and how do I replicate
that from the command line for vb.net?

Thanks very much for any knowledge you have!

-Casey



我不是出口 - 我从来不需要创建一个COM Callable
Wrapper (CCW),但我相信一旦你编译你的程序集,你会想要
运行tlbexport。这应该生成一个类型库,以便它可以从COM调用。

- 汤姆谢尔顿[MVP]



I''m not an export on this - I''ve never needed to create a COM Callable
Wrapper (CCW), but I believe once you compile your assembly you''ll want
too run tlbexport on it. This should generate a typelibary so that it
can be called from COM.

--
Tom Shelton [MVP]



这篇关于DLL问题:vb6和vb.net编写智能标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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