Solved

Interchangeable Code Library for VB6.0 and VB .Net

Posted on 2006-11-20
5
226 Views
Last Modified: 2012-05-05
I have an application that is currently written in VB 6. It is due for a groud up re-write but at the moment I am having to add functionality still in 6. I have other applications that work in conjunction with it and I want to create a shared code library. This would be OK if the other applications were developed using 6 but I am having to use .Net. Is it possible to create a shared .Net library that I can use with 6, or failing that, can I access the classes and objects compiled within the VB 6 application file (EXE) in my .Net apps.. The reason I need to make this so difficult is because of an auto update routine for the main application that is done on very restricitve networks, therefore I cannot create installers for DLL's or make registry changes.
0
Comment
Question by:whittinga2
  • 3
  • 2
5 Comments
 
LVL 96

Expert Comment

by:Bob Learned
Comment Utility
You can have a .NET assembly that can be used with VB6, and you can have a VB6 library that you can access from .NET.  It is really up to you which direction you want to take.

Bob
0
 

Author Comment

by:whittinga2
Comment Utility
How can I use a .Net assembly in VB 6?
0
 
LVL 96

Expert Comment

by:Bob Learned
Comment Utility
Here is a good article describing the steps:

This article explains the step by step procedure of how to use a .NET Assembly with COM Client.
http://www.codeproject.com/useritems/COM_Interoperability.asp

The important piece is the regasm, that will register a .NET assembly in the registry for use in COM applications.

Bob
0
 

Author Comment

by:whittinga2
Comment Utility
I presume this means that it has to be registered on each machine I want to use it on. This is the major problem and the reason why I don't think I am able to do this. The networks that the auto upgrade will be working on will not allow writing to the registry. I think that I am probably unable to do what I need to. Code duplication here I come...
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
Comment Utility
Yes, you presume correctly, and that is the mess of DLL hell--when a DLL/Assembly needs to be registered before it can be used.  

Bob
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now