Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7570875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:31:40+00:00 2026-05-30T15:31:40+00:00

In my windows app, I want to use memory mapped files. There is various

  • 0

In my windows app, I want to use memory mapped files. There is various article/blogs on net that has enough information for creating memory mapped files. I am creating 2 memory mapped file and now I want to do some actions on these files like reading its content, append some content into it, delete some content from it. There may be more info on net for all these, but unfortunately I couldn’t find anything.
Below is the function I am using to write a memory mapped file.

 // Stores the path to the selected folder in the memory mapped file
        public void CreateMMFFile(string folderName, MemoryMappedFile mmf, string fileName)
        {
            // Lock
            bool mutexCreated;
            Mutex mutex = new Mutex(true, fileName, out mutexCreated);
            try
            {
                using (MemoryMappedViewStream stream = mmf.CreateViewStream())
                {
                    using (StreamWriter writer = new StreamWriter(stream, System.Text.Encoding.Unicode))
                    {
                        try
                        {
                            string[] files = System.IO.Directory.GetFiles(folderName, "*.*", System.IO.SearchOption.AllDirectories);
                            foreach (string str in files)
                            {
                                writer.WriteLine(str);
                            }
                        }
                        catch (Exception ex)
                        {
                            Debug.WriteLine("Unable to write string. " + ex);
                        }
                        finally
                        {
                            mutex.ReleaseMutex();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Unable to monitor memory file. " + ex);
            }
        }

If anyone can help me, that would be really appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:31:41+00:00Added an answer on May 30, 2026 at 3:31 pm

    I think the class you’re looking for is the MemoryMappedViewAccessor. It provides methods for reading and writing to your memory-mapped file. A delete is nothing more than a series of carefully orchestrated writes.

    It can be created from your MemoryMappedFile class using the CreateViewAccessor method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to use blob-leasing mechanism in my Windows Azure cloud app. I am
I want to use modal pop-up windows in our web app in Ruby on
I have a windows forms app with a textbox control that I want to
I want to deveplop an app for Windows Mobile 5.0 and above that can
We want to write a Windows/OS X app that sends podcast ratings info from
I want to use Boost C++ in a Windows 8 Metro app and I
I'm developing a Windows Phone 7 app with Azure. I want let users use
I want to use a timer in a windows mobile app. Of course, this
I want to use Server.MapPath in my Web Form (Windows Form App) But it
In a Windows 8 Metro App I want the ListViewItems/Tiles to open a link

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.