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 6687037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:14:29+00:00 2026-05-26T05:14:29+00:00

In Delphi 7, I open a file with CreateFileMapping then get a pointer by

  • 0

In Delphi 7, I open a file with CreateFileMapping then get a pointer by using MapViewOfFile.

How can I expand the memory and add some characters to the memory and have it saved to that file?

I have already opened the file with appropriate modes (fmOpenReadWrite, PAGE_READWRITE),
and if I overwrite the characters, it gets saved to the file, but I need to add extra values in the middle of the file.

  • 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-26T05:14:29+00:00Added an answer on May 26, 2026 at 5:14 am

    If the file mapping is backed by an actual file and not a block of memory, then you can resize the file in one of two ways:

    1. call CreateFileMapping() with a size that exceeds the current file size. The file will be resized to match the new mapping.

    2. use SetFilePointer() and SetEndOfFile() to resize the file directly, then call CreateFileMapping() with the new size.

    Both conditions are described in the documentation for CreateFileMapping().

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

Sidebar

Related Questions

I want to create and then open a txt file using the ShellExecute command.
(Using Delphi 5) I am attempting to open a log file using the following
Using the following explorer.exe /select, c:\path\to\file.txt I can open Windows Explorer and select the
in visual basic i can open a binary(exe) file with below way : Strx$
I have a Delphi unit that is statically linking a C .obj file using
How do I display an Outlook message file using Delphi 2010? Is there a
For some time I've noticed how much the File Open and File save dialogs
I have a Delphi 2006 app that writes to a file and then regularly
When debugging I always want Delphi to open my application in the second monitor
Visual studio type library I'm trying from Delphi to open up Visual Studio (for

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.