Solved

Size and filemapping

Posted on 2002-03-26
2
173 Views
Last Modified: 2013-12-03
Hi

Two questions about filemapping.

Is it possible to determine the size of a mapped file, when I just have a handle to the mappedfile.

Is it possible to increase the size of a mapped file. If I map lets say win.ini could I then append a section to the ini-file which would be saved physical to win.ini
0
Comment
Question by:koger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 6896300
>>Is it possible to determine the size of a mapped file, when I just have a handle to the mappedfile

You should be able to get that using 'GetFileSize()'...
0
 
LVL 20

Accepted Solution

by:
Madshi earned 200 total points
ID: 6896762
If you only have the handle of the file mapping object, but not the handle of the file itself, then you can't get the size. Well, maybe by using undocumented functions, but not with official stuff.

Also you can't change the size of a file mapping. Sorry for the bad news. You have to unmap and remap to change the size.

Regards, Madshi.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question