Memory-mapped files -> Checking for duplicate filenames in C#
Working on an app that will use memory-mapped files for some inter-(or is
it intra?)application communication, and I want to make sure when I
randomly generate a memory-mapped memory-only file, I don't accidentally
generate or get a duplicate that already exists (that ultra-rare case when
the planets align and something like that might happen). Any ideas on how
to prevent that? System.IO.MemoryMappedFiles does not appear to have a
File.Exists() method...I guess I could try OpenOrCreate() and deal with
any access violations, etc., but this would be getting nasty quick.
No comments:
Post a Comment