473,626 Members | 3,325 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dll problem: vb6 and vb.net writing smart tags

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
Nov 21 '05 #1
10 1258
On 2004-11-30, C Williams <no****@thank.y ou> wrote:
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


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]
Nov 21 '05 #2
On 2004-11-30, C Williams <no****@thank.y ou> wrote:
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


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

--
Tom Shelton [MVP]
Nov 21 '05 #3
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:
On 2004-11-30, C Williams <no****@thank.y ou> wrote:
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


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]

Nov 21 '05 #4
On Tue, 30 Nov 2004 23:12:35 GMT, C Williams <no****@thank.y ou> wrote:

¤ 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!

If this is an Office Add-in you may want to take a look at the following MS KB article:

http://support.microsoft.com/default...b;en-us;302896
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #5


Actually the following article is probably a bit more applicable:

Building Smart Tags in Microsoft Visual Basic .NET
http://msdn.microsoft.com/library/de...dc_stvbnet.asp
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #6
In article <D8************ *************** *******@microso ft.com>, Bonj wrote:
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.


He can't check the register for com interop box though... He says it is
greyed out... I suspect that it is the VB.NET standard product - but I
don't have that to confirm. If so, then he'll need to do this stuff
manually from the command line...

--
Tom Shelton [MVP]
OS Name: Microsoft Windows XP Professional
OS Version: 5.1.2600 Service Pack 2 Build 2600
System Up Time: 39 Days, 19 Hours, 33 Minutes, 47 Seconds
Nov 21 '05 #7
Thanks, Tom. I might not be understanding it correctly, but the
documentation says:

Tlbexp.exe generates a type library but does not register it. This is in
contrast to the Assembly Registration tool (Regasm.exe), which both
generates and registers a type library. To generate and register a type
library with COM, use Regasm.exe.

Because I think I need to get my library registered, I tried adding the
/tlb flag to regasm, but again to no avail.
Tom Shelton wrote:
On 2004-11-30, C Williams <no****@thank.y ou> wrote:
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
successfull y 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

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

Nov 21 '05 #8
I actually have read this article and found it quite useful. The only
problem with it is that it instructs the user to click "Register for COM
Interop" and then compile a class library. I can't do that, though, and
am trying to figure out how to do so from the command line.

Any help would be appreciated!

Paul Clement wrote:

Actually the following article is probably a bit more applicable:

Building Smart Tags in Microsoft Visual Basic .NET
http://msdn.microsoft.com/library/de...dc_stvbnet.asp
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)

Nov 21 '05 #9
Okay, I have discovered two solutions for those who are interested. Tom
was right--I just didn't take it far enough.

1)compile dll using vbc.exe and then run "regasm name.dll /tlb: name.tlb
/codebase "

The /codebase is important, even though I did not strong name my dll and
it gives a warning when regasm exectues. Not sure what's up with
that...but it works.

The other way is far simpler--change my version of Visual Basic so that
it allows the "register for com interop" option. Thank you Herfried Wagner!
http://dotnet.mvps.org/dotnet/faqs/?...raries&lang=en

C Williams wrote:
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

Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
3125
by: C Williams | last post by:
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).
16
1625
by: yuraukar | last post by:
I am trying to create a garbage collection class in C++ to collect instances of a specific class (so no general gc). The approach is to use smart pointers and a mark and a simple sweep gc. smartptr<B> pB; pB = new B(args); The constructor of B has been adjusted to register new instances with the garbage collector. The constructor of smartptr has also been adjusted to register new instances of smart pointers with the garbage
1
1556
by: Ja NE | last post by:
sometimes people just forget to close formating tag while writing message in forum (or enywhere else) so I wrote those lines (for <b>, <i> and <a> tags) $i_open = substr_count($tekst, "<i>"); $i_close = substr_count($tekst, "</i>"); if($i_open > $i_close) { $tekst = "$tekst </i>"; }
1
1815
by: Jyothi | last post by:
Hi All, Can anybody tell me how to create smart tags like what we see in MS word application? TIA, Jyothi
8
1939
by: Inigo Jimenez | last post by:
I have an ASP .net web application installed in a Windows 2003 server. This web application has a webform that has a Datagrid. This Datagrid is filled with the data of a SQL table. I have a button that inserts a new row in the SQL table and then refresh the datagrid.
1
1219
by: C Williams | last post by:
Hi, I have downloaded the 2003 Smart Tag SDK and am attempting to run its samples. I installed the sdk and registered the visual basic.net sample. However, no office apps (word, excel, ppt) recognize the sample smart tags that should be installed. I have checked and double-checked the paths in the registry entries and in the security settings batch file, and they are correct. Also, I have read everything I can find on msdn about...
1
609
by: jmarr02s | last post by:
I am trying to enable the Person Name Smart Tag, but after I open up my table in Design view and select the field (in this case CustomerName field), click in the Smart Tag text box, click the Build button to launch the Smart Tags window, and select Person Name at the top of the Smart Tags window...under Actions (at the bottom of the Smart Tags window) I only see "Send Mail". How do I change MS Access or my database so all of the...
6
2091
by: shror | last post by:
hi every body, i have a problem dealing with a quiz system in php. the idea is that am building a quiz system by giving a question and choices in radio buttons, and after selecting the answer the other question is loaded and in the final page a report is displayed showing all questions and the correct answers and the score but the problem here is that am not able to pass the answer of the first question to the second page question,...
0
1252
by: cruster | last post by:
Hey folks. I'm developing an ASP.NET custom control and have assciated a custom ControlDesigner with it. I'm using smart tags in design time like this: public override DesignerActionItemCollection GetSortedActionItems() { if (_actions == null) { _actions = new DesignerActionItemCollection();
0
1058
by: PSiegmann | last post by:
Hi group, I have the problem, that smart tags don't seem to work on all controls. I rightclick on it, there is an entry in the context menu, but it is grayed. I can't click on it. Any ideas? Here is a screenshot of it:
0
8266
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8199
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8705
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8638
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7196
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2626
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.