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 / .NET Framework / Interop / October 2005

Tip: Looking for answers? Try searching our database.

problems calling vb6 queued component in vb.net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jeff Bishop - 06 Oct 2005 16:57 GMT
Hello Everyone,

I am having problems getting a component that was written in VB6 to work
inside of vb.net.  It is a queued component.  Can someone send me some
sample code that would work in this instance?  Here are some questions:

1.  Should GetObject still work inside of vb.net?  If so, what should the
variable be declared as as far as a new vb.net datatype goes?

2.  Do you have to make any changes in application configuration or include
any references/Imports to get this queued component to work?

Any help is sincerely appreciated.

Jeff
Robert Jordan - 06 Oct 2005 17:20 GMT
Hi Jeff,

> I am having problems getting a component that was written in VB6 to work
> inside of vb.net.  It is a queued component.  Can someone send me some
[quoted text clipped - 5 lines]
> 2.  Do you have to make any changes in application configuration or include
> any references/Imports to get this queued component to work?

First you need the TLB of the VB6 queued component.
From this TLB you create an interop assembly with
TlbImp. This assembly has to be added to your project.

The QC can be instantiated with (C# syntax, I don't
know much about VB.NET, sorry!):

using System.Runtime.InteropServices;
using YourInteropAssemblyNamespace;

ISomeInterface qc = (ISomeInterface)
  Marshal.BindToMoniker ("queue:/new:" + progId);

- progId is the programm id of your VB6 QC.
- ISomeInterface is the interface of your VB6 QC.

When you use VB.NET's "Strict Off" you may be able to access
the QC w/out an interop assembly, but I'm not sure.

Rob
Jeff Bishop - 06 Oct 2005 17:53 GMT
Do you know of a good tool for making a tlb file from a compiled vb dll?  I
saw some things on the net on this and it looked rather scary.

> Hi Jeff,
>
[quoted text clipped - 28 lines]
>
> Rob
Robert Jordan - 06 Oct 2005 18:13 GMT
>  Do you know of a good tool for making a tlb file from a compiled vb dll?  I
> saw some things on the net on this and it looked rather scary.

Ups! You can generate the interop assembly from the DLL
as well, because the TLB is built in.

Rob

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.