473,387 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

VB6 Interface implemented in C#

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
5 1980
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Chris Dunaway | last post by:
I have a simple interface with two methods, MethodA, and MethodB. I also have a class with implements the interface. The class provides a full implementation for MethodA but for special reasons,...
12
by: Steve W. | last post by:
I just read the section (and did the exercise) in the C# Step by Step book that covers Explict Interface Implementation (where you specify in the method implementation the specific interface that...
21
by: Helge Jensen | last post by:
I've got some data that has Set structure, that is membership, insert and delete is fast (O(1), hashing). I can't find a System.Collections interface that matches the operations naturally offered...
0
by: Scott James | last post by:
This seems like a strange one, but perhaps someone can shed some light. I have an interface: ItciEngine implemented by class tciEngine. Two public methods in this class pass an object I've...
2
by: Lee | last post by:
Assuming I have an interface defined: public interface IDTPersistableCollection: IList<IDTPersistableObject> { //Few specific properties defined } When I try to create an object based on...
15
by: Gustaf | last post by:
Using VS 2005. I got an 'IpForm' class and an 'IpFormCollection' class, containing IpForm objects. To iterate through IpFrom objects with foreach, the class is implemented as such: public class...
20
by: Luc Kumps | last post by:
(Sorry about the previous post, it got transmitted before it was complete) We try to separate implementation and interface defintions, but we run into a problem. I hope the guru's can solve this,...
7
by: p_shakil | last post by:
Hi, I would like to know the interface concept in Python.How the Interface is defined and implemented in Python?. How to access the interface fromn Client? Thanks PSB
7
by: tshad | last post by:
I am trying to understand Interfaces and why I would use them. I have an example from a book that is explaining it. I just can't seem to see why I would use it. In my example, it has 2...
9
by: msbs1984 | last post by:
Difference Between Interface and Abstract Class?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.