473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 1406
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.com
"Peter Plumber" <Kl******@gmxdot.net> wrote in message
news:%2****************@TK2MSFTNGP12.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******@gmxdot.net> schrieb:
Is it possible to use dot-net dlls in VB6 projects?


<URL:http://msdn.microsoft.com/library/en-us/cpguide/html/cpconexposingnetframeworkcomponentstocom.asp>
<URL:http://msdn.microsoft.com/library/en-us/vbcn7/html/vaconCOMInteroperability.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/cpconmarshalingdatawithcominterop.asp

Did this give you the info you needed?

--------------------
Date: Mon, 21 Mar 2005 17:02:06 +0100
From: Peter Plumber <Kl******@gmxdot.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.public.vb.general.discussion,microsoft.p ublic.dotnet.languages.vb,
microsoft.public.dotnet.languages.csharpNNTP-Posting-Host: 83-64-137-178.work.xdsl-line.inode.at 83.64.137.178
Lines: 1
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSF TNGP08.phx.gbl!TK2MSFTNGP1
2.phx.gblXref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.languages.vb:266599 microsoft.public.dotnet.languages.csharp:314725
microsoft.public.vb.general.discussion:542781X-Tomcat-NG: microsoft.public.dotnet.languages.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
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...
2
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:...
3
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
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...
3
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...
3
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...
3
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....
7
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...
8
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...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.