473,467 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

VB.NET Remoting Programming Challenge

I have created a very simple and short (70 lines) demo to demonstrate
how to send data between instances of the same applications running on
the same box. Here is a link to a .zip file that contains the whole
project.

http://mysite.verizon.net/johnheitmu...ameBoxChat.zip

I have gotten this to work by using the WM_COPYDATA message and
calling the SendMessage() function in User32.dll. This satisfies my
immediate nee, but I would be really interested to see if anybody
knowledgeable about .NET Remoting could rewrite this simple demo using
Remoting. My thought is that the technique of invoking User32.dll
may not work with future OS versions.

Thanks,
John

Mar 9 '08 #1
6 2138
My sympathies re lack of responses on best IPC practices. I've been watching
these posts hoping for some good ideas and a useful discussion. No joy.

I've tried a few non-.net things, and I've found named pipes and WM_COPYDATA
to be the least offensive. Nothing in .net has satisfied me. Remoting is/was
the way to go in recent times, but it looks like DCOM (ugh!) warmed over.
WCF is next in line to save the day, but I don't know (I am at .net 2005 fw
2), and I am dubious. I seem to recall reading about fw 3 or 3.5 providing
stream io for pipes, but I don't know anything about it. Pipes are good for
point to point, but your situation sounds like you need a broadcast.

I want a .net equivalent of an activex exe.

Mar 10 '08 #2
"John Heitmuller." <jo*************@jrfcorp.netwrote in news:def2d542-
df*************************@u69g2000...legrou ps.com:
I have gotten this to work by using the WM_COPYDATA message and
calling the SendMessage() function in User32.dll. This satisfies my
immediate nee, but I would be really interested to see if anybody
knowledgeable about .NET Remoting could rewrite this simple demo using
Remoting
Which part of remoting are you having trouble with?

You could also use WCF as well, which is more or less remoting's
replacement.

--
sp**********@rogers.com (Do not e-mail)
Mar 10 '08 #3
/signed

I've had no luck finding out the "proper" way to do inter-process
communication.

..NET Remoting seems a bit abstract and lacking in useful examples.

--
David Streeter
Synchrotech Software
Sydney Australia
"AMercer" wrote:
My sympathies re lack of responses on best IPC practices. I've been watching
these posts hoping for some good ideas and a useful discussion. No joy.

I've tried a few non-.net things, and I've found named pipes and WM_COPYDATA
to be the least offensive. Nothing in .net has satisfied me. Remoting is/was
the way to go in recent times, but it looks like DCOM (ugh!) warmed over.
WCF is next in line to save the day, but I don't know (I am at .net 2005 fw
2), and I am dubious. I seem to recall reading about fw 3 or 3.5 providing
stream io for pipes, but I don't know anything about it. Pipes are good for
point to point, but your situation sounds like you need a broadcast.

I want a .net equivalent of an activex exe.
Mar 10 '08 #4
Hi, thanks for your reply.
Which part of remoting are you having trouble with?
My SameBoxChat.exe example uses a single executable to handle both
sending and receiving data between applications. I like the technique
demonstrated in SameBoxChat.exe because the code is simple, there is
very little IPC processing overhead to the app, and it is very fast.

The purest in me feels that making direct calls to the User32.dll
builds in an OS dependency that may cause problems down the road. So,
what I'm looking for is a way to accomplish the same thing with a
single peer-to-peer send/receive VB.Net app using the .Net framework
to manage the interprocess communications.

I've looked at the WCF docs in VisualStudio 2008. The parts of WCF
that seem relevant to an example like SameBoxChat.exe look very
similar to Remoting under 2.0 of the .Net Framework.

I also agree with David's reply, ".NET Remoting seems a bit abstract
and lacking in useful examples." I was hoping that if it is possible
to build a simple demo of a peer-to-peer send/receive VB.Net app using
the .Net Framework, my example might prompt someone into do it. I've
been programming for 20+ years. If I cannot figure it out, its not
simple. But, I would love to be shown up and proved wrong. 8-)

Thanks,
John
Mar 10 '08 #5
On 2008-03-10, AMercer <AM*****@discussions.microsoft.comwrote:
My sympathies re lack of responses on best IPC practices. I've been watching
these posts hoping for some good ideas and a useful discussion. No joy.

I've tried a few non-.net things, and I've found named pipes and WM_COPYDATA
to be the least offensive. Nothing in .net has satisfied me. Remoting is/was
the way to go in recent times, but it looks like DCOM (ugh!) warmed over.
Remoting is much more elegant then dcom...
WCF is next in line to save the day, but I don't know (I am at .net 2005 fw
2), and I am dubious. I seem to recall reading about fw 3 or 3.5 providing
3.0 is 2.0 warmed over. You can use WCF from 2005 just fine - but it
requires framework 3.0, which is just 2.0 with some additional libraries
(actually its the same with 3.5 - it's runtime 2.0 sp1 and some
additonal stuff and a new compiler).
stream io for pipes, but I don't know anything about it. Pipes are good for
point to point, but your situation sounds like you need a broadcast.
Named pipes are supported in 3.5 (I don't think they were in 3.0).
I want a .net equivalent of an activex exe.
WCF/Remoting is yoru equivalent.

--
Tom Shelton
Mar 10 '08 #6
"John Heitmuller." <jo*************@jrfcorp.netwrote in news:9b2c0e7a-
de*************************@c33g2000...legrou ps.com:
The purest in me feels that making direct calls to the User32.dll
builds in an OS dependency that may cause problems down the road. So,
what I'm looking for is a way to accomplish the same thing with a
single peer-to-peer send/receive VB.Net app using the .Net framework
to manage the interprocess communications.
There is no reason why in remoting you could not host the client/server
in the same .exe. Your client just needs to expose an endpoints.

Unfortunately remoting out of the box is not bidirectional, so you'll
need to build some logic in the app to handle 2-way messaging.
I've looked at the WCF docs in VisualStudio 2008. The parts of WCF
that seem relevant to an example like SameBoxChat.exe look very
similar to Remoting under 2.0 of the .Net Framework.
Similar, yet very different. WCF allows for multiple communications
channels and the ability to do bidirectional communications out of the
box.

WCF also has a Peer-to-Peer channel which maybe applicable in your
situation.
I also agree with David's reply, ".NET Remoting seems a bit abstract
and lacking in useful examples."
A bit perhaps - The company I work at use remoting extensively; it's not
mysterious once you build an application ro two.
I was hoping that if it is possible
to build a simple demo of a peer-to-peer send/receive VB.Net app using
the .Net Framework, my example might prompt someone into do it. I've
been programming for 20+ years. If I cannot figure it out, its not
simple. But, I would love to be shown up and proved wrong. 8-)
If remoting is too complex, there are alternative frameworks available
such as Genuine Channels and RemObjects.

--
sp**********@rogers.com (Do not e-mail)
Mar 11 '08 #7

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

Similar topics

0
by: Samuel | last post by:
Jrobots is programming game for smart people- check your level. This month winners of entry-level category (CADETS) get two prizes each worth $30 dollars! New Software Development Kit, sample...
0
by: richard | last post by:
The Python Game Programming Challenge (otherwise known as PyWeek) is only a week away from starting! Theme voting has started! http://www.mechanicalcat.net/tech/PyWeek/1 Richard
6
by: Samuel | last post by:
New Prizes for October Jrobots Programming Challenge. Jrobots is programming game hosted at <http://www.cfxweb.net/~jrobots> CFXweb. You play by programming in basic Java your own robot to...
7
by: candy_init | last post by:
The aim is to make a program in C which can calculate the value of a determinant of any specified order.The program should work in the following way: INPUT: N: 5 (order of the determinant) Enter...
0
by: richard | last post by:
The date for the second PyWeek challenge has been set: Sunday 26th March to Sunday 2nd April (00:00UTC to 00:00UTC). The PyWeek challenge invites entrants to write a game in one week from...
78
by: wkehowski | last post by:
The python code below generates a cartesian product subject to any logical combination of wildcard exclusions. For example, suppose I want to generate a cartesian product S^n, n>=3, of that...
4
by: Mark Tarver | last post by:
Prompted by a post on Catalan numbers in Qilang, I got into looking at ordinal numbers as defined by John von Neumann - see http://en.wikipedia.org/wiki/Ordinal_numbers 0 = {} 1 = {0} = {{}} 2...
0
by: Richard Jones | last post by:
The next PyWeek game programming challenge starts next Sunday at 00:00UTC. If you're interested, there's definitely still time to sign up to the challenge. http://www.pyweek.org/ Theme voting...
0
by: Richard Jones | last post by:
The fourth Python Game Programming Challenge (PyWeek) has now concluded with judges (PyWeek being peer-judged) declaring the winners: Individual: Which way is up? by Hectigo...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
0
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.