Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB 6.0 >>> VB.NET / April 2006

Tip: Looking for answers? Try searching our database.

Vb to .NET - Are we using the correct approach?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luis Garavello - 12 Apr 2006 21:48 GMT
Hi all,

I recently started dealing with VS .NET, and so far everything is going
good. but a friend of mine approached me with a problem I still can't
find an answer.

He has a VB6 Graph app plotting a chart that uses some DLL files for
"lines". Anytime he needs a new type of "line", he compiled a new DLL,
register it using Regsvr32, and that's all.

He thought of upgrading it to .NET 2003 (or even 2005 if possible). His
idea is that we could try to upgrade one of the DLL he already have and
see the amount of problems it would have.

We did an upgrade of one chosen DLL, resolved all the problems that VS
.NET presented (all of them related to Redim statement or an array size
from 1 to something)

We compiled the DLL, and then we tried to register. Using Regsvr32, it
returns a warning that the DllRegisterServer entry point was not found.
We tried to open the program, and all the DLL created by VB6 are okay,
but the new one are not working.

So we think we may have some problems in the approach. So I would like
to hear some opinions of the following subjects:

- Are we going the right way to upgrade the app? Does a VB6 app works
without problems with a .NET DLL, does the .Net DLL need some changes
to be accepted or the VB6 app would have so much trouble with a .NET
DLL that is better to try to upgrade the app first?

- It seems that regsvr32 is not what we should use to make the .NET DLL
available? If so, any way to make the .NET DLL be registered just like
a VB6 DLL?
Chris Lane - 13 Apr 2006 19:39 GMT
Hi,

I am not an expert but here goes:

regsvr32.exe wouldn't work on a .net dll because it isn't a COM object.

http://samples.gotdotnet.com/quickstart/howto/doc/Interop/Building_Samples_COM2N
ET.aspx


http://msdn.microsoft.com/vbasic/reference/Interop/default.aspx

Regards,

Chris

> Hi all,
>
[quoted text clipped - 30 lines]
> available? If so, any way to make the .NET DLL be registered just like
> a VB6 DLL?
Richard K Bethell - 20 Apr 2006 14:59 GMT
Making a COM object in .NET is quite a tricky enterprise. You have to do a
lot of work in code declaring interfaces and whatnot, signing it as a strong
object (where you lose some of the benefits of side by side assemblies), and
then generating a type library.

You'd be better off working from the other angle - upgrade the executable
engine, and then bring the DLLs along after.

> Hi all,
>
[quoted text clipped - 30 lines]
> available? If so, any way to make the .NET DLL be registered just like
> a VB6 DLL?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.