Solved

Size and filemapping

Posted on 2002-03-26
2
167 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
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

Suggested Solutions

Title # Comments Views Activity
Event ID 10010 3 69
Best way to accomplish this task? 3 88
windbg taking it's time 32 93
Need a simple RegEx to search for two words 27 45
This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

838 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