473,545 Members | 1,734 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 18369
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
3249
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....
14
8183
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...
3
2788
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
7390
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7647
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7410
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...
0
7742
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5318
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4940
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...
0
3441
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...
1
1007
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
692
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...

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.