<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Simple Inter-Process Communication In VB.Net</title>
	<atom:link href="http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/</link>
	<description>because all great software begins with an original idea</description>
	<lastBuildDate>Tue, 17 Nov 2009 18:40:12 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: anoriginalidea</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1840</link>
		<dc:creator>anoriginalidea</dc:creator>
		<pubDate>Wed, 01 Jul 2009 03:29:26 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1840</guid>
		<description>Hi Mitch,

Applications written as Winforms or WPF have to have their UI elements (such as labels and textboxes) updated on the &quot;UI Thread&quot;.

Because &quot;Say Something&quot; is invoked by a non-ui thread, you have to to &quot;marshall&quot; the update onto the ui thread.

There are two ways to do this (as I noted in a previous comment):
 
One way is to put a reference to your display form in a “Shared” variable, then use the “BeginInvoke” method on the form to update the text property.

Another way is to store the “say” text in a collection, exposed as a shared variable, then use a timer on the Winform to periodically bind (read the data from) the collection if the data changes.

Hope this helps

Regards

Julian</description>
		<content:encoded><![CDATA[<p>Hi Mitch,</p>
<p>Applications written as Winforms or WPF have to have their UI elements (such as labels and textboxes) updated on the &#8220;UI Thread&#8221;.</p>
<p>Because &#8220;Say Something&#8221; is invoked by a non-ui thread, you have to to &#8220;marshall&#8221; the update onto the ui thread.</p>
<p>There are two ways to do this (as I noted in a previous comment):</p>
<p>One way is to put a reference to your display form in a “Shared” variable, then use the “BeginInvoke” method on the form to update the text property.</p>
<p>Another way is to store the “say” text in a collection, exposed as a shared variable, then use a timer on the Winform to periodically bind (read the data from) the collection if the data changes.</p>
<p>Hope this helps</p>
<p>Regards</p>
<p>Julian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mitch</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1839</link>
		<dc:creator>Mitch</dc:creator>
		<pubDate>Tue, 30 Jun 2009 21:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1839</guid>
		<description>This is a great article, but I&#039;m having some difficulties. I&#039;ve followed your directions and got two applications communicating well.  However, in the &quot;SaySomething&quot; sub, instead of a simple console.writeline command, I decided to call another subroutine that is in the code for one of my forms. This subroutine is attempting to change the form in some way -- add text to a label, change the opacity of the form, whatever -- however, I can&#039;t seem to manipulate the form at all. Does anyone know why?  PLEASE HELP.</description>
		<content:encoded><![CDATA[<p>This is a great article, but I&#8217;m having some difficulties. I&#8217;ve followed your directions and got two applications communicating well.  However, in the &#8220;SaySomething&#8221; sub, instead of a simple console.writeline command, I decided to call another subroutine that is in the code for one of my forms. This subroutine is attempting to change the form in some way &#8212; add text to a label, change the opacity of the form, whatever &#8212; however, I can&#8217;t seem to manipulate the form at all. Does anyone know why?  PLEASE HELP.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bobbie</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1838</link>
		<dc:creator>Bobbie</dc:creator>
		<pubDate>Mon, 29 Jun 2009 16:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1838</guid>
		<description>I ran into alot of grief getting this to work on XP. Turned out what worked was
&lt;pre&gt;
        Dim properties As IDictionary = New Hashtable()
        properties.Add(&quot;authorizedGroup&quot;, &quot;Users&quot;)
        properties.Add(&quot;portName&quot;, &quot;myClient&quot;)
        properties.Add(&quot;rejectRemoteRequests&quot;, True)
        Dim ipcCh As IpcChannel
        ipcCh = New IpcChannel(properties, Nothing, Nothing)
&lt;/pre&gt;
instead of
&lt;pre&gt;
        ipcCh = New IpcChannel(&quot;IPChannelName&quot;)
&lt;/pre&gt;

I hope this saves someone else the 2 hours of grief I had trying to get it to work.

Oh, and I also had to use
&lt;pre&gt;
        ChannelServices.GetChannel(&quot;myClient&quot;)
&lt;/pre&gt;
instead of
&lt;pre&gt;
        Dim ipcCh As New IpcChannel(&quot;myClient&quot;)
        ChannelServices.RegisterChannel(ipcCh, False)
&lt;/pre&gt;
on the receiving end.</description>
		<content:encoded><![CDATA[<p>I ran into alot of grief getting this to work on XP. Turned out what worked was</p>
<pre>
        Dim properties As IDictionary = New Hashtable()
        properties.Add("authorizedGroup", "Users")
        properties.Add("portName", "myClient")
        properties.Add("rejectRemoteRequests", True)
        Dim ipcCh As IpcChannel
        ipcCh = New IpcChannel(properties, Nothing, Nothing)
</pre>
<p>instead of</p>
<pre>
        ipcCh = New IpcChannel("IPChannelName")
</pre>
<p>I hope this saves someone else the 2 hours of grief I had trying to get it to work.</p>
<p>Oh, and I also had to use</p>
<pre>
        ChannelServices.GetChannel("myClient")
</pre>
<p>instead of</p>
<pre>
        Dim ipcCh As New IpcChannel("myClient")
        ChannelServices.RegisterChannel(ipcCh, False)
</pre>
<p>on the receiving end.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Thompson</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1835</link>
		<dc:creator>Keith Thompson</dc:creator>
		<pubDate>Tue, 26 May 2009 16:20:53 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1835</guid>
		<description>Hi,

Sorry if this is a naive question... I&#039;m just getting into this... I got everything working ok, but I need multiple clients to be able to send messages to the server, but if I try sending a message from a client, whilst the server is dealing with another, I get an exception.  I&#039;ve tried setting &quot;WellKnownObjectMode.SingleCall&quot;, to allow an instance per client (I think!), but I still get the same error.  Do I need to / can I set up a range of ports to use?  Do I need to set up the client to wait until the port is free?  Any help would be very gratefully accepted</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Sorry if this is a naive question&#8230; I&#8217;m just getting into this&#8230; I got everything working ok, but I need multiple clients to be able to send messages to the server, but if I try sending a message from a client, whilst the server is dealing with another, I get an exception.  I&#8217;ve tried setting &#8220;WellKnownObjectMode.SingleCall&#8221;, to allow an instance per client (I think!), but I still get the same error.  Do I need to / can I set up a range of ports to use?  Do I need to set up the client to wait until the port is free?  Any help would be very gratefully accepted</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wos</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1759</link>
		<dc:creator>wos</dc:creator>
		<pubDate>Thu, 18 Sep 2008 15:57:49 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1759</guid>
		<description>Hey there!

It&#039;s me again - found a solution.
Problem was that I was using windowsform - object in the &quot;SaySomething&quot; method.
Sure it&#039;s just fired by the server side, but as there are two instances of the program with the windowsform - object being public, my application did it once for the form in Instance I and then for form in instance II.

If anyone needs the solution code, just mail.

Nice evening to ya all.</description>
		<content:encoded><![CDATA[<p>Hey there!</p>
<p>It&#8217;s me again &#8211; found a solution.<br />
Problem was that I was using windowsform &#8211; object in the &#8220;SaySomething&#8221; method.<br />
Sure it&#8217;s just fired by the server side, but as there are two instances of the program with the windowsform &#8211; object being public, my application did it once for the form in Instance I and then for form in instance II.</p>
<p>If anyone needs the solution code, just mail.</p>
<p>Nice evening to ya all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wos</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1758</link>
		<dc:creator>wos</dc:creator>
		<pubDate>Thu, 18 Sep 2008 14:35:53 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1758</guid>
		<description>Hey Dude!

Great job, thank you very much!
There is just one thing I can&#039;t deal with - if you wanna combine server and client in one program, the code in the &quot;SaySomething&quot; method is done twice, ain&#039;t it?

Thanks for the help,

wos</description>
		<content:encoded><![CDATA[<p>Hey Dude!</p>
<p>Great job, thank you very much!<br />
There is just one thing I can&#8217;t deal with &#8211; if you wanna combine server and client in one program, the code in the &#8220;SaySomething&#8221; method is done twice, ain&#8217;t it?</p>
<p>Thanks for the help,</p>
<p>wos</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anoriginalidea</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1738</link>
		<dc:creator>anoriginalidea</dc:creator>
		<pubDate>Thu, 17 Jul 2008 22:24:13 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1738</guid>
		<description>Hi Steve,

There are a few ways to communicate between threads in this scenario.

One way is to put a reference to your display form in a &quot;Shared&quot; variable, then use the &quot;BeginInvoke&quot; method on the form to update the text property.
 
Another way is to store the &quot;say&quot; text in a collection, exposed as a shared variable, then use a timer on the Winform to periodically bind (read the data from) the collection if the data changes.

Regards

Julian</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>There are a few ways to communicate between threads in this scenario.</p>
<p>One way is to put a reference to your display form in a &#8220;Shared&#8221; variable, then use the &#8220;BeginInvoke&#8221; method on the form to update the text property.</p>
<p>Another way is to store the &#8220;say&#8221; text in a collection, exposed as a shared variable, then use a timer on the Winform to periodically bind (read the data from) the collection if the data changes.</p>
<p>Regards</p>
<p>Julian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Schoonover</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1737</link>
		<dc:creator>Steve Schoonover</dc:creator>
		<pubDate>Thu, 17 Jul 2008 21:55:40 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1737</guid>
		<description>This example worked fine for my purposes. I did use the console app for the Server portion like this example shows. 

What I would like to do is use a Windows Form instead of a console app to display my values passed through the SaySomething method. When I attempt to create a Form and startup my application as a Windows Application (not a console app) I am unable to reference and modify the label on the Server form. I&#039;ve determined the CommunicationService Class is a separate thread from the one launched through the Server form I&#039;ve created. 

Is there a way to have this SaySomething method in the Server app reference the new Windows form I&#039;ve created?

Thanks for any help.

Steve</description>
		<content:encoded><![CDATA[<p>This example worked fine for my purposes. I did use the console app for the Server portion like this example shows. </p>
<p>What I would like to do is use a Windows Form instead of a console app to display my values passed through the SaySomething method. When I attempt to create a Form and startup my application as a Windows Application (not a console app) I am unable to reference and modify the label on the Server form. I&#8217;ve determined the CommunicationService Class is a separate thread from the one launched through the Server form I&#8217;ve created. </p>
<p>Is there a way to have this SaySomething method in the Server app reference the new Windows form I&#8217;ve created?</p>
<p>Thanks for any help.</p>
<p>Steve</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Leland</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1671</link>
		<dc:creator>David Leland</dc:creator>
		<pubDate>Thu, 20 Mar 2008 00:47:56 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1671</guid>
		<description>Great article and sample code.  I have a requirement to create an &quot;Instant Messenger&quot; application and as such need the &quot;Server&quot; and &quot;Client&quot; pieces to reside within a single program.  Can&#039;t seem to find the magic combination - any suggestions would be greatly appreciated.

Dave</description>
		<content:encoded><![CDATA[<p>Great article and sample code.  I have a requirement to create an &#8220;Instant Messenger&#8221; application and as such need the &#8220;Server&#8221; and &#8220;Client&#8221; pieces to reside within a single program.  Can&#8217;t seem to find the magic combination &#8211; any suggestions would be greatly appreciated.</p>
<p>Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anoriginalidea</title>
		<link>http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1667</link>
		<dc:creator>anoriginalidea</dc:creator>
		<pubDate>Tue, 04 Mar 2008 23:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://anoriginalidea.wordpress.com/2007/08/09/simple-inter-process-communication-in-vbnet/#comment-1667</guid>
		<description>Mark,

Simply add a reference to &quot;System.Runtime.Remoting&quot; and ipc remoting bliss will be yours.

Have fun!</description>
		<content:encoded><![CDATA[<p>Mark,</p>
<p>Simply add a reference to &#8220;System.Runtime.Remoting&#8221; and ipc remoting bliss will be yours.</p>
<p>Have fun!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
