By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,448 Members | 1,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,448 IT Pros & Developers. It's quick & easy.

VB6 Interface implemented in C#

P: n/a
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/..
Nov 15 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
In article <#d**************@TK2MSFTNGP12.phx.gbl>,
Ra***@nospamzzzqcsi.com says...
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.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 15 '05 #2

P: n/a
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/..
"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om...
In article <#d**************@TK2MSFTNGP12.phx.gbl>,
Ra***@nospamzzzqcsi.com says...
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.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

Nov 15 '05 #3

P: n/a
In article <uT**************@TK2MSFTNGP09.phx.gbl>,
Ra***@nospamzzzqcsi.com says...
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?

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 15 '05 #4

P: n/a
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/..

"Patrick Steele [MVP]" <pa*****@mvps.org> wrote in message
news:MP************************@msnews.microsoft.c om...
In article <uT**************@TK2MSFTNGP09.phx.gbl>,
Ra***@nospamzzzqcsi.com says...
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?

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele

Nov 15 '05 #5

P: n/a
In article <e5**************@TK2MSFTNGP09.phx.gbl>,
Ra***@nospamzzzqcsi.com says...
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.

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 15 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.