1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 
5 using Microsoft.Win32.SafeHandles;
6 using System;
7 using System.Runtime.InteropServices;
8 
9 internal partial class Interop
10 {
11     internal partial class Kernel32
12     {
13         [DllImport(Libraries.Kernel32, EntryPoint = "CreateFileMappingW", CharSet = CharSet.Unicode, SetLastError = true)]
CreateFileMapping( SafeFileHandle hFile, ref SECURITY_ATTRIBUTES lpFileMappingAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, string lpName)14         internal static extern SafeMemoryMappedFileHandle CreateFileMapping(
15             SafeFileHandle hFile,
16             ref SECURITY_ATTRIBUTES lpFileMappingAttributes,
17             int flProtect,
18             int dwMaximumSizeHigh,
19             int dwMaximumSizeLow,
20             string lpName);
21 
22         [DllImport(Libraries.Kernel32, EntryPoint = "CreateFileMappingW", CharSet = CharSet.Unicode, SetLastError = true)]
CreateFileMapping( IntPtr hFile, ref SECURITY_ATTRIBUTES lpFileMappingAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, string lpName)23         internal static extern SafeMemoryMappedFileHandle CreateFileMapping(
24             IntPtr hFile,
25             ref SECURITY_ATTRIBUTES lpFileMappingAttributes,
26             int flProtect,
27             int dwMaximumSizeHigh,
28             int dwMaximumSizeLow,
29             string lpName);
30     }
31 }
32