Size and filemapping

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
kogerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
MadshiConnect With a Mentor Commented:
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
 
jkrCommented:
>>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
All Courses

From novice to tech pro — start learning today.