471,317 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

streams across applications

What is the best method for passing streams between applications? I
could, of course, write the contents of the stream to a file and pick it
up on the other end, but with the amount of data I'll be pushing around,
that really isn't all that feasible.

I know that MemoryStreams work well for this sort of thing, but I'm not
sure how to read from a stream in a separate application.

Lee Crabtree
Feb 20 '06 #1
3 1039
Hello, Lee!

LC> I know that MemoryStreams work well for this sort of thing, but I'm not
LC> sure how to read from a stream in a separate application.

Application specific memory is specific for the application, it means that other apps cannot write/read directly to this memory.

OTOH you can use MMF ( memory mapped file ) to have the functionality you desire.
Also if you want stream functionality you can use NetworkStream.
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 20 '06 #2
You could use Remoting, or a MemoryMappedFile stream. MMF requires wrapping
the native win32 API. but you can find some pretty good C# implementations
of same. You can also use Named Pipes, which also requires API calls, and
there is at least one decent C# implementation of that too.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Lee Crabtree" wrote:
What is the best method for passing streams between applications? I
could, of course, write the contents of the stream to a file and pick it
up on the other end, but with the amount of data I'll be pushing around,
that really isn't all that feasible.

I know that MemoryStreams work well for this sort of thing, but I'm not
sure how to read from a stream in a separate application.

Lee Crabtree

Feb 20 '06 #3
Named pipes are supported through the System.Runtime.Remoting.Channels.Ipc
namespace classes in V2 of the framework.

Willy.
"Peter Bromberg [C# MVP]" <pb*******@yahoo.nospammin.com> wrote in message
news:FA**********************************@microsof t.com...
| You could use Remoting, or a MemoryMappedFile stream. MMF requires
wrapping
| the native win32 API. but you can find some pretty good C#
implementations
| of same. You can also use Named Pipes, which also requires API calls, and
| there is at least one decent C# implementation of that too.
|
| Peter
|
| --
| Co-founder, Eggheadcafe.com developer portal:
| http://www.eggheadcafe.com
| UnBlog:
| http://petesbloggerama.blogspot.com
|
|
|
|
| "Lee Crabtree" wrote:
|
| > What is the best method for passing streams between applications? I
| > could, of course, write the contents of the stream to a file and pick it
| > up on the other end, but with the amount of data I'll be pushing around,
| > that really isn't all that feasible.
| >
| > I know that MemoryStreams work well for this sort of thing, but I'm not
| > sure how to read from a stream in a separate application.
| >
| > Lee Crabtree
| >
Feb 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Roy Smith | last post: by
3 posts views Thread by Tron Thomas | last post: by
4 posts views Thread by Cowboy \(Gregory A. Beamer\) | last post: by
2 posts views Thread by noone | last post: by
4 posts views Thread by =?Utf-8?B?RmFyaWJh?= | last post: by
4 posts views Thread by valentin tihomirov | last post: by
reply views Thread by rosydwin | last post: by

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.