473,569 Members | 3,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Seeking Advice for Inter-Application Communication (VB6 to C#)

I need to communicate between two applications. The legacy application is in
VB6. New development is in C#. Here's the scenario:

The VB6 app will be pumping document files into a folder. We'll be writing a
new (C#) class for this new feature.

The C# Application (as distinct from the file pumper class just mentioned)
needs notification for each file pumped into the folder in order to process
the file.

(FileSystemWatc her is not going to do it for us. The C# Application needs
certain meta-information regarding each file, that the VB6 application is in
possession of. Yes, pairing a companion tag file together with each document
file might do the job, but is this really the best way to communicate
between two applications? By passing files around?)

So what is the best way to set up a 'conduit' beteen two applications? The
pattern I'm trying to achieve would have the source application initiate an
activity which would trigger an event raised in the target application to
notify the target application that the activity has occurred.

Thanks for any advice which you can offer!

- Joseph Geretz -
May 26 '06 #1
5 4120
On Fri, 26 May 2006 11:57:55 -0400, "Joseph Geretz"
<jg*****@nospam .com> wrote:
I need to communicate between two applications. The legacy application is in
VB6. New development is in C#. Here's the scenario:

The VB6 app will be pumping document files into a folder. We'll be writing a
new (C#) class for this new feature.

The C# Application (as distinct from the file pumper class just mentioned)
needs notification for each file pumped into the folder in order to process
the file.

(FileSystemWat cher is not going to do it for us. The C# Application needs
certain meta-information regarding each file, that the VB6 application is in
possession of. Yes, pairing a companion tag file together with each document
file might do the job, but is this really the best way to communicate
between two applications? By passing files around?)

So what is the best way to set up a 'conduit' beteen two applications? The
pattern I'm trying to achieve would have the source application initiate an
activity which would trigger an event raised in the target application to
notify the target application that the activity has occurred.

Thanks for any advice which you can offer!

- Joseph Geretz -


have a look at
http://www.codeproject.com/dotnet/VB...select=1114812
--
Ludwig Stuyck
http://www.coders-lab.be
May 26 '06 #2
Well, from VB6 to C# you could:
* Enable COM for the relevant C# code and invoke that from the VB
* Use HttpListener to create a primitive web-server and communicate perhaps
via xml posts / response
* Use sockets (not so easy from VB6, but can be done maneagably via
3rd-party dlls)
* Use a backend polling store (db / file system / msmq)

If you want callback (I'm assuming the last line should have read "...notify
the source application..." ) then COM is probably your best bet (from VB6),
as IIRC simple events like EventHandler pose no real problems. Long term
something like Indigo might help (sorry... WCF; force of habit ;-p) , *if*
somebody produces a VB6/WCF plug-in. Personally I doubt that anyone will
bother too much, as it is often far too tempting to switch to VB.Net or C#
instead.

Oh, and "tut tut" to the cross-post.

Hope this helps,

Marc
May 26 '06 #3
Interoperate between VB6, I assume it is a COM object, with C#. The new
features put it in C#.

chanmm

"Joseph Geretz" <jg*****@nospam .com> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
I need to communicate between two applications. The legacy application is
in VB6. New development is in C#. Here's the scenario:

The VB6 app will be pumping document files into a folder. We'll be writing
a new (C#) class for this new feature.

The C# Application (as distinct from the file pumper class just mentioned)
needs notification for each file pumped into the folder in order to
process the file.

(FileSystemWatc her is not going to do it for us. The C# Application needs
certain meta-information regarding each file, that the VB6 application is
in possession of. Yes, pairing a companion tag file together with each
document file might do the job, but is this really the best way to
communicate between two applications? By passing files around?)

So what is the best way to set up a 'conduit' beteen two applications? The
pattern I'm trying to achieve would have the source application initiate
an activity which would trigger an event raised in the target application
to notify the target application that the activity has occurred.

Thanks for any advice which you can offer!

- Joseph Geretz -

May 26 '06 #4
Hi Marc,

Thanks for your reply.
If you want callback (I'm assuming the last line should have read
"...notify the source application..." )
No, what I'd like is for the ability to have both applications share a
single instance of a class, so that a method called by the source
application, will cause an event to be raised to the target application.
This is not a new concept. Certainly, if I'd have the two applications
engineered as separate Forms in a single application this would be eminently
possible. What I'm looking for is a way to use this design pattern in an
inter-application scenario.
Oh, and "tut tut" to the cross-post.
vb.com - source application is VB6
csharp.com - target application is in C#
..interop - ties it all together

Why would you deny this discussion to any of these groups?

- Joseph Geretz -

"Marc Gravell" <ma**********@g mail.com> wrote in message
news:eX******** ******@TK2MSFTN GP02.phx.gbl... Well, from VB6 to C# you could:
* Enable COM for the relevant C# code and invoke that from the VB
* Use HttpListener to create a primitive web-server and communicate
perhaps via xml posts / response
* Use sockets (not so easy from VB6, but can be done maneagably via
3rd-party dlls)
* Use a backend polling store (db / file system / msmq)

If you want callback (I'm assuming the last line should have read
"...notify the source application..." ) then COM is probably your best bet
(from VB6), as IIRC simple events like EventHandler pose no real problems.
Long term something like Indigo might help (sorry... WCF; force of habit
;-p) , *if* somebody produces a VB6/WCF plug-in. Personally I doubt that
anyone will bother too much, as it is often far too tempting to switch to
VB.Net or C# instead.

Oh, and "tut tut" to the cross-post.

Hope this helps,

Marc

May 26 '06 #5
Re source / target - I see what you mean; I read that line twice on Friday,
and thought I had it straight, but now I see what you mean. Lack of caffeine
(on me) last week I guess. Given your requirements, I maintain that COM
interop would be a viable (and simple) solution.

Also - it wasn't my intent to suggest that it was / wasn't relevant to those
groups... but cross-posting is just a major PITA for everyone except the
original poster. I can't see if somebody has already given the 100% perfect
solution (in another group) without going to a lot of hastle to look in
those groups. Seeing as there are more readers that original posters (=1),
then this means that either lots of people only see 1/10th of the replies,
or they also need to go out of their way. OK, some news clients will make
this easy. But some won't. Thats all. I'll shut up now ;-p

Best of luck,

Marc
May 30 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1921
by: Naser | last post by:
How can I change the text of a textbox in a form of a .NET application, By clicking a button in a form of an other .NET stand alone application? I know that DDE is no longer supported in the .NET framework. I may use XML to do that but I don't know how? please help me
5
3832
by: Mark Fisher | last post by:
I have a Java desktop GUI application that the user can run multiple times. In order to keep one instance of the application distinct from another, I'd like to put the instance number of the application in the title bar. For example, the user starts the application, and the title bar says "Control Panel". The user starts another instance...
14
3277
by: Wolfgang Keller | last post by:
Hello, as a non-developer I am currently participating in an industrial "research" project to develop a so-called "web application". This application serves at the same time as middleware to connect several other "conventional" enterprise-applications such as ERP, SCADA etc. and to provide a GUI frontend to the users. The developers are...
4
4953
by: Viper Venom | last post by:
Dear All: I am trying to write an application that consist 2 executables 1) Server.exe 2) Client.exe I start the server.exe first and then start the two client exe by code and kill both of the client when the server exit (This is already done)
2
1367
by: PeteZ | last post by:
Hi, I was of the understanding that Session variables were GLOBALLY scoped across all Applications on a specific web site and that data obtained and stored in "variables" were available for other applications - it seems I was wrong. It appears that the data is held on a per-application instance ie. Each applications data is "sand-boxed"...
0
1019
by: msnews.microsoft.com | last post by:
Ok, I am looking for suggestions here. I have a .NET (1.1) application and I need to allow a non-.NET application to communicate with it so they can control my application. The other application uses VBScript 5.6 and can control COM applications. Here are my requirements: 1) My application can be run independent of the other...
11
4327
by: Olie | last post by:
This post is realy to get some opinions on the best way of getting fast comunication between multiple applications. I have scowered the web for imformation on this subject and have just found conflicting views and far from ideal solutions. My application has to send small amounts of data about 50bytes to multiple client applications. The...
0
910
by: mohitjaitly | last post by:
Hi, I need to ask how can I develop web pages in ASP.NET and use them as COMPONENTS and call them or directly use them from some other APPLICATION.I should be able to use design and functionality of those pages in this new application.
2
1292
by: gireesh21 | last post by:
Hi every one, I am using vb.net for my application & i nee to communicate with the other application which is in VB 6.0, at runtime they sholud communicate each other. can any one please suggest me the method is need to follow for communication. gireesh
0
7703
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.