Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

.NET Class DLL and VB6 COM client

12 views
Skip to first unread message

paul

unread,
Sep 18, 2002, 12:31:31 PM9/18/02
to
I have a similar issue to a message posted earier in this
newsgroup.

Trying to instantiate an instance of a .NET interop DLL, I
am getting a 'cannot find file' error from VB6 which I
believe is really 'cannot find Registry entry'. That is,
the registration of COM is incomplete.

Has the MSDN article "Raising events handled by a COM
sink" been updated? I had to fix minor syntax with it to
get it to work. I have it working as a .NET COM interop
project. I can call the DLL from a .NET client. However,
my VB6 client cannot instantiate it.
I get the error:

?err.Description
Automation error
The system cannot find the file specified.
?hex(err.Number)
80070002

The VB6 client can define the object using WithEvents, so
it appears the event sink interface of the .NET Class DLL
has been properly hooked up.

Also, are there any additional steps to deploy the server
project on the development box? That is, are the
tlbexp.exe and regasm.exe steps handled for me by Visual
Studio? It appears they are since I have the tlb.

If there is a complete sample of developing a .NET Class
DLL withevents, and a VB6 client, a pointer to it would be
appreciated.

thanks,

- Paul -


Santhosh Pillai [MS]

unread,
Sep 18, 2002, 3:05:38 PM9/18/02
to
Paul,

The documentation bug has been brought to the notice of the appropriate
team(s) here in Microsoft. As you probably know,

(1) The Sample code will not work (TlbExp fails) unless the Assembly name is
EventSrc, because of
[ComSourceInterfaces("EventSource.ButtonEvents, EventSrc")]

(2) For the VB.NET code even above change will not help. TlbExp again fails
saying that it could not find the type "EventSource.ButtonEvents" in the
assembly EventSrc.

Changing <ComSourceInterfaces("EventSource.ButtonEvents, EventSrc")> to
<ComSourceInterfaces(GetType(ButtonEvents))> should work.

Thanks,
Santhosh
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
©2002 Microsoft Corporation. All rights reserved.

"paul" <pa...@dmaxx.com> wrote in message
news:21fb01c25f30$d83a17f0$39ef2ecf@TKMSFTNGXA08...

Paul

unread,
Sep 19, 2002, 10:42:13 PM9/19/02
to
Santhosh,

Thanks for the help. #2 did the trick. I can now call
my .NET DLL from VB6 with events.

I can now convert my real applications.

regards,

- Paul -

>.
>

0 new messages