473,769 Members | 4,846 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shared Named Memory

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
Feb 15 '06 #1
9 18378
Alan,

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

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Maxwell200 6" <al******@newsg roup.nospam> wrote in message
news:ea******** ******@TK2MSFTN GP11.phx.gbl...
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

Feb 15 '06 #2
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

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


"Maxwell200 6" wrote:
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

Feb 15 '06 #3
Why not to use Shared Property Manager (SharedProperty GroupManager,
SharedPropertyG roup, and SharedProperty) for this reason?
But it's available with the assembly System.Enterpri seServices
Alan,
No, not really. You should be using remoting and a singleton for
something like this (with a named pipe channel).
Is there a concept of shared named memory in .NET to allow multiple
program use the name and then set/retrieve values?


--
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


Feb 15 '06 #4
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
Feb 16 '06 #5
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Michael Nemtsev" <Mi************ @discussions.mi crosoft.com> wrote in
message news:5F******** *************** ***********@mic rosoft.com...
Why not to use Shared Property Manager (SharedProperty GroupManager,
SharedPropertyG roup, and SharedProperty) for this reason?
But it's available with the assembly System.Enterpri seServices
Alan,
No, not really. You should be using remoting and a singleton for
something like this (with a named pipe channel).
> Is there a concept of shared named memory in .NET to allow multiple
> program use the name and then set/retrieve values?


--
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

Feb 16 '06 #6
Thank you for help.

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

Thank you,
Max
"Vadym Stetsyak" <va*****@ukr.ne t> wrote in message
news:%2******** *******@TK2MSFT NGP11.phx.gbl.. .
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

Feb 16 '06 #7
>Do you know any sample that shows me how to use Memory Mapped files in C#?

Here's one: http://www.winterdom.com/dev/dotnet/index.html
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Feb 16 '06 #8
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: "Maxwell200 6" <al******@newsg roup.nospam>
References: <ea************ **@TK2MSFTNGP11 .phx.gbl> <#Y************ *@TK2MSFTNGP11. phx.gbl>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: <uP************ **@tk2msftngp13 .phx.gbl>
Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
NNTP-Posting-Host: toronto-hse-ppp3700345.symp atico.ca 65.95.109.110
Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!tk 2msftngp13.phx. gbl
Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.langua ges.csharp:3865 58
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp

Thank you for help.

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

Thank you,
Max
"Vadym Stetsyak" <va*****@ukr.ne t> wrote in message
news:%2******* ********@TK2MSF TNGP11.phx.gbl. ..
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



Feb 17 '06 #9
Morantex
9 New Member
There is a complete solution to your problem in this product, it is currently in beta:

http://www.morantex.com/Persistore.aspx

this is a feature rich component that makes shared memory and data persistence very easy to use, it has many innovative features.

Regards
Hugh


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



--------------------[color=blue]
>From: "Maxwell200 6" <alanalan@newsg roup.nospam>
>References: <ea80QbkMGHA.32 60@TK2MSFTNGP11 .phx.gbl>[/color]
<#Y9Y91sMGHA.34 4@TK2MSFTNGP11. phx.gbl>[color=blue]
>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: <uPSZIfzMGHA.29 92@tk2msftngp13 .phx.gbl>
>Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
>NNTP-Posting-Host: toronto-hse-ppp3700345.symp atico.ca 65.95.109.110
>Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GP08.phx.gbl!tk 2msftngp13.phx. gbl
>Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.langua ges.csharp:3865 58
>X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.csharp
>
>Thank you for help.
>
>Do you know any sample that shows me how to use Memory Mapped files in C#?
>
>Thank you,
>Max
>
>
>"Vadym Stetsyak" <vadym_s@ukr.ne t> wrote in message
>news:%23Y9Y91s MGHA.344@TK2MSF TNGP11.phx.gbl. ..[color=green]
>> 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[/color]
>
>
>[/color]
May 2 '06 #10

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

Similar topics

6
3278
by: Tom | last post by:
We have a VERY simple .NET C# Form Application, that has about a 23MB Memory Footprint. It starts a window runs a process and does a regular expression. I have done a GC.Collect to make sure that, no memory is lying around. GC reports only 84k of allocations. Starting 5-10 of this apps is going to start taking a considerable amount of memory. Is there a way to reduce this? Tom
14
8217
by: phil_gg04 | last post by:
Dear C++ Experts, Over the last couple of months I have been writing my first program using shared memory. It has been something of an "in-at-the-deep-end" experience, to say the least. At present the shared memory contains a few fixed-size structs, but I really need to be able to store more complex variable-sized data in there. So the next task is to work out how to store C++ objects, and if possible STL containers, in this shared...
3
2806
by: Grandpa Pete | last post by:
How can I share resources across all users of a web service for read/write access. *Situation* *one*: I want to have an in memory counter that all users of the webservice could access. Call it g_count. Then I create a web method called Update_g_count.
0
9589
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10047
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9995
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8872
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6674
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5304
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3962
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
3
2815
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.