I\'ve used C# to solve the following requirement.. - create an app the can receive a lot of data fast - you must be able to analyse the received data while more are incoming
The reason that the code does not compile is because it uses a non-existing overload. Either create a filestream yourself and pass it to the correct overload (assuming 2000 will be your new size):
FileStream fs = new FileStream("C:\MyFile.dat", FileMode.Open);
MemoryMappedFile mmf = MemoryMappedFile.CreateFromFile(fs, "someName", 2000,
MemoryMappedFileAccess.ReadWriteExecute, null, HandleInheritablity.None, false);
Or use this overload to skip the filstream creation:
MemoryMappedFile mmf = MemoryMappedFile.CreateFromFile("C:\MyFile.dat",
FileMode.Open, "someName", 2000);