Garbage collector messes up events?? HELP!

H

hakan_cn

Hi all!

Sorry for the cross-post, I really have a difficult problem and need
some help badly.

I have a VB6 ActiveX component (dll) that listens to a real-time data
feed of stock quotes (built in an OCX) and then passes them on using
events.

The consumer of these VB6 events is a C# dll using .NET 2.0

The consumer of the C# dll is a C++ software, Wealth-Lab
This is the steps involved:
Ocx -> VB6 Dll -> C# Dll -> Wealth-Lab

The only reason why I use the VB6 Dll is because I can not use the ocx
directly in VS2005. I have the source-code for the VB6 Dll and the C#
Dll. The Ocx and Wealth-Lab is software's from other vendors

All event wires OK and the C# dll runs just fine getting all
real-time events from the VB6 dll... for approx three minutes. Then,
for
apparently no reason, the events stop coming in. This is the problem.

To make things more interesting, I created a C# windows application
that takes the event from the VB6 dll and just displays them in a
listbox. There is no problem with the C# windows application. The
events just keep coming in. There is only one way to stop them, to kill
the application. Both the C# Dll and the C# application uses the same
class to communicate with the VB6 Dll.

However, I need to get it to run with the C# dll.

I have a long shot theory that the Garbage Collector for some reason
sweeps away the event object, but I can not confirm anything...

Please help. I'm in a really stressful situation!

I'm using VS6 SP6 and VS2005.

Thanks for your help!

/Hakan
 
W

Willy Denoyette [MVP]

Why not directly bind the OCX to the Wealth-Lab application?

Willy.

| Hi all!
|
| Sorry for the cross-post, I really have a difficult problem and need
| some help badly.
|
| I have a VB6 ActiveX component (dll) that listens to a real-time data
| feed of stock quotes (built in an OCX) and then passes them on using
| events.
|
| The consumer of these VB6 events is a C# dll using .NET 2.0
|
| The consumer of the C# dll is a C++ software, Wealth-Lab
| This is the steps involved:
| Ocx -> VB6 Dll -> C# Dll -> Wealth-Lab
|
| The only reason why I use the VB6 Dll is because I can not use the ocx
| directly in VS2005. I have the source-code for the VB6 Dll and the C#
| Dll. The Ocx and Wealth-Lab is software's from other vendors
|
| All event wires OK and the C# dll runs just fine getting all
| real-time events from the VB6 dll... for approx three minutes. Then,
| for
| apparently no reason, the events stop coming in. This is the problem.
|
| To make things more interesting, I created a C# windows application
| that takes the event from the VB6 dll and just displays them in a
| listbox. There is no problem with the C# windows application. The
| events just keep coming in. There is only one way to stop them, to kill
| the application. Both the C# Dll and the C# application uses the same
| class to communicate with the VB6 Dll.
|
| However, I need to get it to run with the C# dll.
|
| I have a long shot theory that the Garbage Collector for some reason
| sweeps away the event object, but I can not confirm anything...
|
| Please help. I'm in a really stressful situation!
|
| I'm using VS6 SP6 and VS2005.
|
| Thanks for your help!
|
| /Hakan
|
 
H

hakan_cn

Hi! Sorry for the delay.

I've tried that. Just adding the ocx to a VB6 form in a dll and tie it
togeather with Wealth-Lab.
I have the same problem, but now it's the ocx events that suddenly
stops after three to four minutes. .NET is not involved anymore.

Any thoughts?

/Hakan

P.s. I know that since this now have nothing to do with .NET, I should
switch groups. I just want to answer you and say thanks for the reply.
D.s.

Willy Denoyette [MVP] skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top