}
- [DllImport("kernel32.dll", SetLastError = true)]
+ [DllImport("kernel32", SetLastError = true)]
static extern bool SetHandleInformation (IntPtr hObject, int dwMask, int dwFlags);
static void ConfigureWindowsFD (IntPtr handle, HandleInheritability h)
{
};
}
+#if MOBILE
+ public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access,
+ HandleInheritability inheritability,
+ bool leaveOpen)
+#else
[MonoLimitation ("memoryMappedFileSecurity is currently ignored")]
public static MemoryMappedFile CreateFromFile (FileStream fileStream, string mapName, long capacity, MemoryMappedFileAccess access,
MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability inheritability,
bool leaveOpen)
+#endif
{
if (fileStream == null)
throw new ArgumentNullException ("fileStream");
[MonoLimitation ("CreateNew requires that mapName be a file name on Unix")]
public static MemoryMappedFile CreateNew (string mapName, long capacity)
{
+#if MOBILE
+ return CreateNew (mapName, capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages, 0);
+#else
return CreateNew (mapName, capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages, null, 0);
+#endif
}
[MonoLimitation ("CreateNew requires that mapName be a file name on Unix")]
public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access)
{
+#if MOBILE
+ return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, 0);
+#else
return CreateNew (mapName, capacity, access, MemoryMappedFileOptions.DelayAllocatePages, null, 0);
+#endif
}
+#if MOBILE
+ public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access,
+ MemoryMappedFileOptions options,
+ HandleInheritability handleInheritability)
+#else
[MonoLimitation ("CreateNew requires that mapName be a file name on Unix; options and memoryMappedFileSecurity are ignored")]
public static MemoryMappedFile CreateNew (string mapName, long capacity, MemoryMappedFileAccess access,
MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity,
HandleInheritability inheritability)
+#endif
{
return CreateFromFile (mapName, FileMode.CreateNew, mapName, capacity, access);
}
}
[MonoTODO]
+#if MOBILE
+ public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, HandleInheritability inheritability)
+#else
public static MemoryMappedFile CreateOrOpen (string mapName, long capacity, MemoryMappedFileAccess access, MemoryMappedFileOptions options, MemoryMappedFileSecurity memoryMappedFileSecurity, HandleInheritability inheritability)
+#endif
{
throw new NotImplementedException ();
}
}
}
+#if !MOBILE
[MonoTODO]
public MemoryMappedFileSecurity GetAccessControl ()
{
{
throw new NotImplementedException ();
}
+#endif
[MonoTODO]
public SafeMemoryMappedFileHandle SafeMemoryMappedFileHandle {