Shared Named Memory

M

Maxwell2006

Hi,

Is there a concept of shared named memory in .NET to allow multiple program
use the name and then set/retrieve values?

Thank you,
Alan
 
N

Nicholas Paldino [.NET/C# MVP]

Alan,

No, not really. You should be using remoting and a singleton for
something like this (with a named pipe channel).

Hope this helps.
 
G

Guest

You are most likely referring to MemoryMapped Files, which in done through
P/invoke to the MapViewOfFile and related APIs. You can find several good C#
implementations of this.
Peter
 
G

Guest

Why not to use Shared Property Manager (SharedPropertyGroupManager,
SharedPropertyGroup, and SharedProperty) for this reason?
But it's available with the assembly System.EnterpriseServices
Alan,
No, not really. You should be using remoting and a singleton for
something like this (with a named pipe channel).

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
V

Vadym Stetsyak

Hello, Maxwell2006!

M> Is there a concept of shared named memory in .NET to allow multiple
M> program use the name and then set/retrieve values?

AFAIK there is no built-in mechanism for this...

To use shared memory you can use memory mapped files ( mmf ), where file name will be the name of the shared memory.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 
N

Nicholas Paldino [.NET/C# MVP]

Well, the reason for this is because it is only really applicable for
COM+ applications. Applications outside of COM+ are not able to use it.
 
M

Maxwell2006

Thank you for help.

Do you know any sample that shows me how to use Memory Mapped files in C#?

Thank you,
Max
 
T

TerryFei

Hi Max,
I hope the following article is also helpful for you:
Title: DevGlobalCache - A way to Cache and Share data between processes
URL: http://www.codeproject.com/dotnet/globalcache.asp

Best Regards,

Terry Fei [MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security



--------------------
From: "Maxwell2006" <[email protected]>
References: <[email protected]>
Subject: Re: Shared Named Memory
Date: Thu, 16 Feb 2006 15:30:09 -0500
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.languages.csharp
NNTP-Posting-Host: toronto-hse-ppp3700345.sympatico.ca 65.95.109.110
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.languages.csharp:386558
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

Thank you for help.

Do you know any sample that shows me how to use Memory Mapped files in C#?

Thank you,
Max
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top