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 / November 2005

Tip: Looking for answers? Try searching our database.

Events from .net DLL not reaching VB6 app

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Todd Beaulieu - 18 Nov 2005 11:56 GMT
I have a VB6 app that instantiates a .net DLL class, sinking the events. It
never receives the events, however.

This very code has been working for almost one year on a number of servers.
The problem server is a new box that we're trying to bring up with our
applications installed. I get no errors. I can call the .net DLL. It does
it's work and then raises the event, but the VB6 app never receives it. I've
put logging in all over the place, so I know the .net DLL is executing the
code to raise the event.

Now, I know I've seen this very issue before, but I can't figure out how to
solve it. I could have sworn that the fix was to re-register (regasm) the
.net DLLs in the correct order (implemented interfaces first, then main
DLL), but nothing has helped.

Note that I'm having another, seemingly-related issue with this same box
(see post entittled "At witt's end!!!! QueryInterface for interface xxx
failed.").
Dmytro Lapshyn [MVP] - 18 Nov 2005 12:51 GMT
Todd,

Will you be able to check if the .NET's assembly type library is properly
registered on that box?
I remember that one might need to register the type library separately for
.NET COM-visible assemblies.

Signature

Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

>I have a VB6 app that instantiates a .net DLL class, sinking the events. It
> never receives the events, however.
[quoted text clipped - 17 lines]
> (see post entittled "At witt's end!!!! QueryInterface for interface xxx
> failed.").
Todd Beaulieu - 18 Nov 2005 13:32 GMT
Thank you for helping.

Just to be thorough (yes, I have done this a number of times), I just
repeated the entire exercise. I unregistered the TLB with regserver and
unregistered the DLL with regasm.

I then copied the exact version that's running on another box and used
regasm with /tlb option.

Same deal. It invokes, but I'm not receiving it's com events, as I am on the
other box. UGH.

> Todd,
>
> Will you be able to check if the .NET's assembly type library is properly
> registered on that box?
> I remember that one might need to register the type library separately for
> .NET COM-visible assemblies.
Dmytro Lapshyn [MVP] - 18 Nov 2005 15:22 GMT
If you open the DLL in OLE View (View Typelib...), can you see the source
interface for the events?

Signature

Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

> Thank you for helping.
>
[quoted text clipped - 16 lines]
>> for
>> .NET COM-visible assemblies.
Todd Beaulieu - 21 Nov 2005 12:07 GMT
Yeah, I can see the events. The DLL is working fine on my machine and on a
set of production servers already in service. The coding must be sound and
correct, since it's all working. It's got to be environmental.

> If you open the DLL in OLE View (View Typelib...), can you see the source
> interface for the events?
[quoted text clipped - 19 lines]
> >> for
> >> .NET COM-visible assemblies.
Dmytro Lapshyn [MVP] - 23 Nov 2005 09:50 GMT
Well, I remember I have had problems with the /tlb option. So what I would
recommend to try first is to export a separate tlb file and register it with
a third-party tool such as regtlib.exe

Signature

Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

> Yeah, I can see the events. The DLL is working fine on my machine and on a
> set of production servers already in service. The coding must be sound and
[quoted text clipped - 28 lines]
>> >> for
>> >> .NET COM-visible assemblies.

Rate this thread:







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.