Solved

Size and filemapping

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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 …
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

810 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