473,465 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using VB.NET object in VB 6.0 project

Hello, My company is experimenting with adding VB.NET classes to currently
existing VB 6 code. The idea is to gradually migrate to a purely object
oriented solution. When I run the code in development environment it works
fine - but when I sent the dll (NET) I created and the Interop.dlls along
with the exe to be reviewed, the reviewer got an error "Could not create
ActiveX control". I asked if he had registered them and it turned out
registering gave an error (~ could not load library...).
I assume if the entire .NET framework was installed on the test machine it
would work but I would like to know what could be done outside of running a
full 'install' of the application to be tested. ie. we want to just 2
click on the exe, run it and have it invoke the .NET dll.
Also, do we have to register the tlb file on the target machine?

Any help would be GREATLY appreciated!

Nov 22 '05 #1
3 2414
Mr Sir,

Did you know that there is a special upgraders newsgroup for vb

microsoft.public.dotnet.languages.vb.upgrade

Probably you find your answer there faster.

It is not very active however I thought, that almost every question is
answered.

I hope you get your solution.

Cor

"Mr Sir" <so*****@somewhere.com>
Hello, My company is experimenting with adding VB.NET classes to currently
existing VB 6 code. The idea is to gradually migrate to a purely object
oriented solution. When I run the code in development environment it
works
fine - but when I sent the dll (NET) I created and the Interop.dlls along
with the exe to be reviewed, the reviewer got an error "Could not create
ActiveX control". I asked if he had registered them and it turned out
registering gave an error (~ could not load library...).
I assume if the entire .NET framework was installed on the test machine it
would work but I would like to know what could be done outside of running
a
full 'install' of the application to be tested. ie. we want to just 2
click on the exe, run it and have it invoke the .NET dll.
Also, do we have to register the tlb file on the target machine?

Any help would be GREATLY appreciated!


Nov 22 '05 #2
"Mr Sir" <so*****@somewhere.com> wrote:
Hello, My company is experimenting with adding VB.NET classes to currently
existing VB 6 code. The idea is to gradually migrate to a purely object
oriented solution. When I run the code in development environment it works
fine - but when I sent the dll (NET) I created and the Interop.dlls along
with the exe to be reviewed, the reviewer got an error "Could not create
ActiveX control". I asked if he had registered them and it turned out
registering gave an error (~ could not load library...).
I assume if the entire .NET framework was installed on the test machine it
would work but I would like to know what could be done outside of running a
full 'install' of the application to be tested. ie. we want to just 2
click on the exe, run it and have it invoke the .NET dll.
Also, do we have to register the tlb file on the target machine?

Any help would be GREATLY appreciated!


Sounds like you already created the CCW (COM Callable
Wrapper) and moved it with the assembly over to the Testing
Machine. However I see no evidence that you registered the
assembly on the test machine with Regasm.exe (analogous to
using regsrv32.exe for a COM Component). This really is a
step that should be performed by the application's setup
project.

In general:

To make .NET assemblies available to applications that use
COM you need to use this:

NET Framework Tools Assembly Registration Tool (Regasm.exe)
http://msdn.microsoft.com/library/de...lregasmexe.asp

..NET Framework Developer's Guide Registering Assemblies
with COM
http://msdn.microsoft.com/library/de...ieswithcom.asp
see also
..NET Framework Tools Type Library Exporter (Tlbexp.exe)
http://msdn.microsoft.com/library/de...rTlbExpexe.asp

You may also have to add some code/attributes to the .NET
code to supply additional COM metadata/functionality.

..NET Framework Developer's Guide: Exposing .NET Framework
Components to COM
http://msdn.microsoft.com/library/de...nentstocom.asp

Visual Studio: Deployment Projects
http://msdn.microsoft.com/library/de...entproject.asp

This article might also illuminate some of the issues you
are dealing with

Microsoft Office and .NET Interoperability
http://msdn.microsoft.com/library/de...ce11012001.asp
Nov 22 '05 #3
Best help for you and your coworkers on the project is to go to your local
bookstore today and get Rockford Lhotka and BIlly Hollis' "Professional
Visual Basic Interoperability: COM and VB6 to .Net"

I think it only had a .Net1.0 version ... if it's at your store get it
anyway. The main stuff you need is in it and the differences will be more
easy to figure out after you've read the first several chapters of this
book.

If it's not at your store then rush it from amazon, they've got a deal on it
because of the death of WROX press.

There are other Interop books, some with lots more neat-geeky code that will
make you think that your money will go farther on them ... but it sounds
like you need a crash course and you need it in a syntax that will make it
work for you. This is the book.

Robert Smith
Kirkland, WA
www.smithvoice.com.
"Mr Sir" <so*****@somewhere.com> wrote in message
news:Ch*********************@read2.cgocable.net...
....

Any help would be GREATLY appreciated!


Nov 22 '05 #4

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

Similar topics

0
by: Nashat Wanly | last post by:
HOW TO: Call a Parameterized Stored Procedure by Using ADO.NET and Visual C# .NET View products that this article applies to. This article was previously published under Q310070 For a Microsoft...
14
by: Curtis Tammany | last post by:
Hello- Can someone tell me if DSOFile.dll can be accessed within ASP.NET? DSOFile.dll is registered and I have no problem using it in my .ASP scripts. I have tried the following: Dim...
4
by: Terry | last post by:
I'm building some dll assemblies that have in them the implementation of an abstract class defined in a different assembly. I'm trying to create objects of the type defined in the dlls with...
3
by: Ben Terry | last post by:
I have imported a legacy C++ project into a VisualStudio.NET 2003 solution. I have some new C# projects in the solution as well. I am using the managed extensions in my C++ project so that I can...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
0
by: Al Fatykhov | last post by:
Using MABLE logic engine with existing .NET applications. MABLE web services provide an interface to MABLE business objects and logic. Let us review some technical details of the MABLE web...
1
by: Diffident | last post by:
Hello All, I have a question as to why my users are noticing error when I am building the project on the production system. Here is the problem's background. In order to build the project on...
0
by: tony | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. In this user control we have a class...
4
by: Praveen Chandra | last post by:
Hi, I just wanted to put down the issue with more detailed information so that you can help us get to the right Microsoft resource for a solution! Here is the problem description... Our...
5
by: jehugaleahsa | last post by:
Hello: I am trying to find what is the very best approach to business objects in Windows Forms. Windows Forms presents an awesome opportunity to use DataTables and I would like to continue doing...
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
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,...
0
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...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.