Search code examples
winapifat32

Does Win32 support memory-mapped files (CreateFileMapping) on FAT file systems?


I'm concerned about the dangers of using memory-mapped IO, via CreateFileMapping, on FAT filesystems. The specific scenario is users opening documents directly from USB sticks (yeah, you try and ban them doing this!).

The MSDN Managing Memory-Mapped Files article doesn't say anything about file system constraints.

Update

I didn't have any real reason to be concerned but a vague feeling that I'd read about problems with them at some point (my career spans over 25 years so I have a lot of vague depths in my memory, all the way back to 8-bit micros!). The issue of whether or not they should be supported is pretty important for me to recommend so I wanted to ask if anyone could corroborate my concerns. Thanks for putting my mind at rest.


Solution

  • Yes it does. It even supports mapping of files on CDFS or on network drives. What is the source of your doubts?