VB6 Interface implemented in C#

  • Thread starter Thread starter Raghu
  • Start date Start date
R

Raghu

I need to implement an interface that is created with VB6 in my C#
component. It is not an option to redefine the interface in C#.

Will be there be any threading issues associated with VB6 in my C#
component?

Thanks.
Raghu/..
 
I need to implement an interface that is created with VB6 in my C#
component. It is not an option to redefine the interface in C#.

Will be there be any threading issues associated with VB6 in my C#
component?

You should mark your C# component with the STAThread attribute when
interop'ing with VB6.
 
Thanks Patrick.

How about the otherway around.

If I have a VB component that implements VB interface, I need to call that
VB component in my C# sharp code using VB interface, will there be any
threading issues? Do I need to worry about any thing?

Thanks.
Raghu/..
 
Thanks Patrick.

How about the otherway around.

If I have a VB component that implements VB interface, I need to call that
VB component in my C# sharp code using VB interface, will there be any
threading issues? Do I need to worry about any thing?

I don't think so. Do you plan on creating multiple threads of execution
in your C# app?
 
I don't explicitely use threads in C# code. The C# code simply delegates to
the work to VB object.

However another client (which is multi-threaded) will definitely create
multiple objects of C#. Is this a concern?

Thanks.
Raghu/..
 
However another client (which is multi-threaded) will definitely create
multiple objects of C#. Is this a concern?

And those multiple threads will be calling the VB6 COM object? To be
honest, you're getting into territory I'm not familiar with. The bulk
if my development has been in VB6 where I'm stuck with STA only. Not
sure what's going to happen if different threads in a free-threaded
object try and interop with an STA object. Sorry.
 
Back
Top