473,888 Members | 1,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dotNet dlls in VB6?

OK, this is a rather strange request

Is it possible to use dot-net dlls in VB6 projects?
Is anyone doing this or is this completely useless?

thx

Peter


Nov 21 '05 #1
4 1431
Peter,

It is absolutely possible to use .NET dlls in VB6 projects. However,
you have to design your classes correctly so that they work with COM interop
correctly. Basically this means defining interfaces using Automation
compatable types, and then implementing them.

For more information, check out the tutorial in the .NET framework
documentation titled "COM Interop Part 2: C# Server Tutorial", located at
(watch for line wrap):

http://msdn.microsoft.com/library/de...ertutorial.asp

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Peter Plumber" <Kl******@gmxdo t.net> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
OK, this is a rather strange request

Is it possible to use dot-net dlls in VB6 projects?
Is anyone doing this or is this completely useless?

thx

Peter

Nov 21 '05 #2
One way would be to expose the managed code(.Net) functionality thru
COM for the unmanaged world(VB). There are possibly better ways than
this as this would require code change in .Net modules (comvisible
attribute).

---------
Ajay Kalra
aj*******@yahoo .com

Nov 21 '05 #3
"Peter Plumber" <Kl******@gmxdo t.net> schrieb:
Is it possible to use dot-net dlls in VB6 projects?


<URL:http://msdn.microsoft. com/library/en-us/cpguide/html/cpconexposingne tframeworkcompo nentstocom.asp>
<URL:http://msdn.microsoft. com/library/en-us/vbcn7/html/vaconCOMInterop erability.asp>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #4
This is definitely supported, and is pretty straightforward if you're using
the Visual Studio IDE.

Here's an overview
1. Create a VB class library project.
2. Add a new item using the "Com class" template.
3. Compile your project.

What this does is create the class, apply a comclass attribute, set the
correct GUID's for com interop, creates a VB6 class which wraps the VB.Net
class, registers the vb6 class.

Here's some docs you can look up:
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconmarshaling datawithcominte rop.asp

Did this give you the info you needed?

--------------------
Date: Mon, 21 Mar 2005 17:02:06 +0100
From: Peter Plumber <Kl******@gmxdo t.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113X-Accept-Language: en-us, en
MIME-Version: 1.0
Subject: dotNet dlls in VB6?
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <#X************ **@TK2MSFTNGP12 .phx.gbl>
Newsgroups: microsoft.publi c.vb.general.di scussion,micros oft.public.dotn et.languages.vb ,
microsoft.publi c.dotnet.langua ges.csharpNNTP-Posting-Host: 83-64-137-178.work.xdsl-line.inode.at 83.64.137.178
Lines: 1
Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GXA01.phx.gbl!T K2MSFTNGP08.phx .gbl!TK2MSFTNGP 1
2.phx.gblXref: TK2MSFTNGXA02.p hx.gbl microsoft.publi c.dotnet.langua ges.vb:266599 microsoft.publi c.dotnet.langua ges.csharp:3147 25
microsoft.publi c.vb.general.di scussion:542781X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb

OK, this is a rather strange request

Is it possible to use dot-net dlls in VB6 projects?
Is anyone doing this or is this completely useless?

thx

Peter



Nov 21 '05 #5

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

Similar topics

1
1961
by: Alex | last post by:
Dear colleagues I am going to deploy dotnet framework in our company. For this I need to do a risk assessment of dotnet framework. Thus I have following question: Is there an available risk assessment of dotnet framework? Is there a document which describes what and where exactly is installed dotnet framework? Which system files are replaced etc.?
2
2972
by: assi | last post by:
Hello all We are developing a large dotnet application, which includes ~ 120 assemblies. (total size of all binaries is ~ 20MB). Our application also references the following dotnet assemblies: System,System.XML, System.Windows.Forms, System.Drawing, System.Data, System.Design. We use dotnet framework 1.1 During initialization, the application scans a directory and loads the assemblies (using Assembly.LoadFrom). It then scans all...
3
1229
by: Peter Plumber | last post by:
OK, this is a rather strange request Is it possible to use dot-net dlls in VB6 projects? Is anyone doing this or is this completely useless? thx Peter
5
1815
by: Jozsef Bekes | last post by:
Hi All, I have a question about how to use the final product I build with dotnet. I used to work with VC++ 6, and there was an option in the project settings to either use the MFC dlls or build the exe in a way that the MFC dlls are not needed (if I am not mistaken, the term was statically linked and dynamically linked). I wonder how it works with dotnet. If I build an exe and take it to a machine without dotnet installed (98, 2000 or...
3
3012
by: Takeshi | last post by:
Hi All, I am impressed with the aesthetic (UI) appeal of DotNet, but not by much else, like it's new fangled languages etc... I have a legacy C++ 3tier application, which uses C++ DLLs. I would like to use the DotNet frontend (e.g. the PL provided by infragistics). However, I don't want to start messing about with Managed C++ etc. Is there anyway I can use my C++ DLLs (and C++ code of my application) and "bind" them to a DotNet UI? ...
3
1666
by: gg | last post by:
My standard version of dotnet 2003 basic does Not have vbc.exe have class library template produce dll when outputtype is changed to classlib for .vbproj it seems that standard version is not designed to build components although the professional version is according to http://www.greymatter.com/Buyers/dotnet/guide.asp Is that correct? does that apply to MFC based DLL I want to make available
3
1870
by: Jim Horvath | last post by:
I know how to create exe applications in dotnet that use functions supplied by pre-existing dlls. How do you turn that around? I want to create an exe program that will be the pre-existing piece. It's functionality can then be extended (using new dlls) without re-compiling the exe. My proposed program is a test sequencer for an industrial control application. I want the exe to handle common housekeeping functions (stepping through...
7
2085
by: Peted | last post by:
Hi, im hoping someone cane provide or point to a definitive accurate explantion of dotnet compilation when run and the best way to optimise peformace when dotnet code is run first time and execution speed after compliation. Ive searched the net and seem to find various opinions on what actually happens when you compile and run a c# dotnet application. What im looking for is basicly how to make dotnet dlls load as fast as
8
1998
by: Derek Hart | last post by:
I am unclear about what all the requirements are to call a simple vb.net application, installed in the GAC, from COM (such as writing vba in Word to call the dotnet dll). I believe I have installed the dll in the GAC. It is in there and has a public token. I did not create a key-value pair. I believe it is strong named, as it shows up in the GAC. How do I browse the objects of it? I would like to call it late bound, but the errors I...
0
9961
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
10780
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...
1
10887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7991
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
7148
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5825
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...
0
6015
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4248
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3252
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.